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

@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.