We consider using aspose.3d to convert 3d models from and to different formats using memory streams. I tried to convert OBJ (incl. mtl and jpg photo texture) to GLB. The JPG is embedded in the GLB but the texture mapping is missing.
So I tried to load an OBJ from file system and simply export it again into OBJ but the texture coordinates vt are missing in the saved OBJ. model_mesh.zip (2.2 MB)
// load from OBJ (mtl and jpg correctly linked and stored in same directory)
ObjLoadOptions load = new ObjLoadOptions();
load.EnableMaterials = true;
load.LookupPaths = new List<string>() { @"G:\My Drive\Work\" };
Scene scene = new Scene(@"G:\My Drive\Work\model_mesh.obj");
// save to OBJ
ObjSaveOptions options = new ObjSaveOptions();
options.EnableMaterials = true;
options.LookupPaths = new List<string>(new string[] { @"G:\My Drive\Work\" });
scene.Save(@"G:\My Drive\Work\model_mesh_output.obj", options);
How can I load an OBJ (incl. mtl and jpg) from File and memory stream without losing the texture coordinates vt?
An issue as THREEDNET-1113 has been logged in our issue management system for the sake of further investigation. We will look into its details and keep you posted with the status of its rectification. Please be patient and spare us some time.
We would like to share that the issue has been resolved in 22.4 version of the API which will be released next month i.e. April 2022. We will send you a notification as soon as the fix-in version is available.
@asad.ali this is great news! But this is quite a long time, any possibility to get an intermediate build (.net) which I can test/use until the release is available?
We can provide the hotfix before the next release. However, according to our policy, the hotfix can only be provided to the customer having paid support subscription. In case you have paid support subscription, you can create a ticket in paid support forum with reference to the ticket ID and share your concerns there. You will receive a hotfix.