Converting OBJ with MTL to USDZ

first I tried with the 3d/saveas/newformat endpoint. But I think there is no way to use a mtl file and a texture -jpeg.

so I try to use the 3d/saveas/saveoptin - but i got error messages when I try it.
All 3 Files (.mtl, .obj and .jpg) are in the Temp-Folder at the storage.

curl --request POST
–url ‘https://api.aspose.cloud/v3.0/3d/saveas/saveoption?storage=temp&newfilename=Arj_2.usdz&name=Arj_2.obj&folder=Temp&isOverwrite=true
–header ‘Authorization: Bearer …’
–header ‘Content-Type: application/json’
–header ‘accept: application/json’
–data ’
{“SaveFormat”:“usdz”,“LookupPaths”: [“Temp”]} ’

all required parameters are set - so I didn’t understand the error message:

{“RequestId”:“”,“Error”:{“Code”:“internalError”,“Message”:“Value cannot be null.\r\nParameter name: target”,“Description”:“Operation Failed. Internal error.”,“DateTime”:“2024-02-06T21:24:55.755166Z”,“InnerError”:null}}%

@aegluke

Please share your input document with us. We will try to reproduce the issue and investigate it.

here you can find the 3 files. I downloaded them from my dashboard.aspose.cloud - Files:
.

when I upload this files to: OBJ to USDZ: online OBJ to USDZ converter for free

i’ll get the textured result.

@aegluke
We have opened the following new ticket(s) in our internal issue tracking system and will deliver their fixes according to the terms mentioned in Free Support Policies.

Issue ID(s): THREEDCLOUD-84

You can obtain Paid Support Services if you need support on a priority basis, along with the direct access to our Paid Support management team.

@aegluke

Please note that you need to pass file names separated by commas. For example:
string name=Arj_2. jpg, Arj_2. mtl, Arj_2. obj;

yes. that works for me and everything is fine :wink:

this should be mentioned in the documentation, Aspose.3D Cloud - API References

I switched to saveas/newformat. I chose saveas/saveoption for the the lookupPath that doesn’t work as described in the documentation: "Some files like OBJ depends on external file, the lookup paths will allows Aspose.3D to look for external file to load. "

Thank you for your support.

1 Like

@aegluke

It is good to know that you managed to accomplish the task. Sure, we will update the documentation accordingly.