We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Aspose 3D Scene Empty when opening FBX and converting to PDF

Hi,

I had attempted to use different versions of Aspose.3D to create a Scene from an existing FBX file and save it as a PDF. Every time I made those attempts, the same result would be an empty 2 KB PDF file. I had debugged it to see if I can see if there is anything I can change to fix it, but when the scene opens the FBX file, it has nothing in it. No properties outside of filepath and empty lists of nodes. I cant upload an FBX here so I have uploaded the PDF that I generate and the PDF that is generated through the Aspose website.

When it goes through the Aspose website it works fine, so here is my code sample that I pulled from your samples.
Scene document = new Scene();
document.Open(filePath, FileFormat.FBX7500ASCII);
var options = new PdfSaveOptions();
document.Save(filePath.Replace(".fbx", “.pdf”), options);

I have tried different variations:
Scene document = new Scene(filePath);
document.Save(filePath.Replace(".fbx", “.pdf”), FileFormat.PDF);

It is the same result of an empty pdf file. I believe it is the loading of the FBX that is causing the issue and the empty PDF file is the result of an FBX not being loaded.P00-10-PE-B6S-0016.pdf (1.4 KB)
P00-10-PE-B6S-0016 From Aspose Website.pdf (44.7 KB)

@lrafih

You can please add your sample FBX file to .zip archive and share it with us. This way we will be able to test the scenario in our environment and address it accordingly.

P00-10-PE-B6S-0016.zip (167.7 KB)

This is on C#.Net 4.7.2

@lrafih

We tested the scenario in our environment using following code snippet and were unable to notice any issue. Please also check the attached output PDF.

Aspose.ThreeD.Scene document = new Aspose.ThreeD.Scene();
//  We loaded the scene without specifying the file format
document.Open(dataDir + "P00-10-PE-B6S-0016.fbx");
var options = new Aspose.ThreeD.Formats.PdfSaveOptions();
document.Save(dataDir + "P00-10-PE-B6S-0016.pdf", options);

P00-10-PE-B6S-0016.pdf (44.0 KB)

Could you please try using above code snippet with Aspose.3D for .NET 20.12.2 and let us know in case you still face any issue.

I have done exactly this. There is a point where loading the scene loads nothing with no information as to why.

@lrafih

Could you please make sure to use a valid license as well and if you do not have one, please consider applying for a 30-days temporary license. Please let us know if issue still persists.

I dont have a license, but if its a licensing issue, are you telling me that it won’t give me any exception detailing that it is a licensing issue? What is the purpose of having your dlls on Nuget for evaluation purposes when you can’t evaluate it?

It was the license. For future reference, an exception that shows that it needs a license to operate correctly would have made this a bit more palpable than being forced into forums to figure out something so simple over a week of communication.

@lrafih

We really apologize for the inconvenience which has been faced.

Please note that we have already mentioned the limitations of trial version of the API in the documentation under Licensing section. However, we do understand the concerns which you have shared and have logged an improvement ticket as THREEDNET-811 in our issue management system. We will surely work over implementing an exception to throw the error related to invalid or absent license and let you know as soon as it is implemented.

We again apologize for the inconvenience.

I’m having a similar issue when converting a fbx to pdf. Mine works with a smaller fbx file but when I use my 95,000 kb fbx the output pdf appears to be empty when opened with adobe. Now this is kind of strange because the output pdf is actually almost as large as the fbx file which means it isn’t showing some information.

I can’t give you my fbx file that i’m currently using but I can try to create a large fbx file and see if it has the same problem. I did put my temporary license in the bin/release directory.

also here is my code:
using System;
using System.IO;
using System.Collections;
using Aspose.ThreeD;

namespace CSharp.Loading_Saving
{
class Save3DScene
{
public static void Run()
{
//ExStart:Save3DScene
// The path to the documents directory.

        Aspose.ThreeD.TrialException.SuppressTrialException = true;




        string MyDir = @"C:\dev\fbx_files\";
                    
        // Load a 3D document into Aspose.3D
        Scene scene = new Scene();

        // open an existing 3D scene
        scene.Open(MyDir + "big_object.fbx");

        Aspose.ThreeD.Formats.PdfSaveOptions opt = new Aspose.ThreeD.Formats.PdfSaveOptions();

        opt.EmbedTextures = true;
        

        // save Scene to a stream
        //MemoryStream dstStream = new MemoryStream();
        //scene.Save(dstStream, FileFormat.PDF);


        // Rewind the stream position back to zero so it is ready for next reader.
        //dstStream.Position = 0;

        // save Scene to a local path
        scene.Save(MyDir + "big_object.pdf", opt);

        //ExEnd:Save3DScene

        Console.WriteLine("\nConverted 3D document to stream successfully.");

        // beep when done
        int A4 = 440;
        int C4 = 523;
        int E5 = 569;
        Console.Beep(A4, 100);
        Console.Beep(C4, 100);
        Console.Beep(E5, 100);
    }
}

}

Can we purchase assistance? I would like to pay for help with this problem

@LawrenceAspose

Before proceeding further, would you please confirm if you are using the latest version of the API? Also, please note that you need to set the license in code as well in order to remove the trial version limitations.

Aspose.ThreeD.License threeLicense = new ThreeD.License();
threeLicense.SetLicense("templicense.lic");

In case issue still persists even after setting the license, please share a sample FBX file with us so that we can test the scenario in our environment and address it accordingly.

Something is wrong with the texture of this file. Not sure what the issue is. When I load it in blender it still has the textures. Also aspose3d is able to convert to pdf when I set the texture to false but I need the textures.

Here is the file. Blender is able to at least open it and visualize it when you look at the texture tab.

@LawrenceAspose

An investigation ticket as THREEDNET-1089 has been logged in our issue management system to analyze this case. We will further check it in details and let you know as soon as the ticket is resolved. Please be patient and spare us some time.

We are sorry for the inconvenience.