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

Free Support Forum - aspose.com

Convert OBJ to 3D PDF

Hi,

We are trying to create 3D PDF from Wavefront (OBJ) file and MTL file using Aspose 3D for .Net (evaluation version). But we see that coloring information and the texture is not as of the source in the generated PDF. We are passing the below configuration in the ObjLoadOptions

  • EnableMaterials and FlipCoordinateSystem as true and pass the
  • LookupPaths of the MTL file location. And then load using Scene Object and do PDFSaveOptions. Are we missing any configuration while loading? Please let us know.

Thanks,
Siva

1 Like

@sivakp13

Please try to use the API with free 30-days temporary license. In case you still experience any issue, please share your sample files along with sample code snippet. We will test the scenario in our environment and address it accordingly.

We will evaluate with the temporary license. Our Wavefront object has reference to MTL and texture file JPG. When we convert the OBJ to 3D PDF, we dont see the texture file being used.

The code snippet is pretty straightforward:
// Initialize an object
ObjLoadOptions loadObjOpts = new ObjLoadOptions();
// Import materials from external material library file
loadObjOpts.EnableMaterials = true;
// Flip the coordinate system.
loadObjOpts.FlipCoordinateSystem = true;
// Configure the look up paths to allow importer to find external dependencies.
loadObjOpts.LookupPaths = new List(new string[] { dataDir});
Scene scene = new Scene();
scene.Open(dirPath + “sample.obj”, loadObjOpts);
PdfSaveOptions options = new PdfSaveOptions();
MemoryFileSystem mfs = new MemoryFileSystem();
options.FileSystem = mfs;
scene.Save(dirPath + “output_2.pdf”, options);
Is this option supported in Aspose 3D while conversion?

Thanks,
Siva

@sivakp13

Can you please share your sample source file in .zip format with us? We will test the scenario in our environment and address it accordingly.

Did you guys figure out how to solve this? I am having the exact same problem where there is no textures.
obj_giraffe_ball.zip (15.2 KB)
My program coverts an obj to pdf and then adds some text to a new page at the bottom from a text file.

Just to be clear I’ve attached my example program, .obj, .mtl., and my c# program in the zip file

@LawrenceAspose

Thanks for contacting support.

We need to investigate this scenario in details which is why we have logged an investigation ticket as THREEDNET-1054 in our issue tracking system. We will look into its 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.