I am using Aspose.3D with php with the intention of converting files to gltf and then display them using model-viewer.js. I can upload, convert to GLTF and then download the given files. However the converted GLTF files appear to be invalid as they do not display in the model-viewer tags nor do they work in an online GLTF editor. https://www.gltfeditor.com/
I have tried with several different source files and formats, yet none of the resultant gltf files are valid.
I have also tried to convert the files to GLB format however get an error message âThe file format is not co (truncatedâŚ)â despite the documentation stating glb is s supported write format.
Can you please confirm the validity of the converted GLTF file formats using the Aspose 3D service and whether GLB files can be written too?
I have tested the GLTF conversion with sample files and noticed it is not displaying in the online GLTF editor. So I have logged a ticket THREEDCLOUD-53 for further investigation and rectification. However, we will appreciate it if you please your sample input files and output GLTF files. We will double check the scenario with our files as well.
I can convert GLB files using the following sample code. Please try the conversion again using the following sample code. If the issue persists then share your input files here. We will look into it and will guide you accordingly.
Thank you for your reply. I have attached a DAE file and the converted GLTF file. I noticed if I try and view it using https://gltf-viewer.donmccurdy.com/ it presents and error saying âTHREE.GLTFLoader: Unsupported asset. glTF versions >=2.0 are supported.â Does the Aspose converter create GLTF v2 files?
I also notice if I include a texture file in a zip such as this one, then there is no reference to the texture file in the converted gltf file. photomodel.zip (771.2 KB)
In regards to the GLB conversion - I am afraid I am not proficient in python/terminal commands, so I am using the PHP solution with the following code based on the test code provided in github:
$testObject = new ThreeDCloudApiTest();
$testObject â testPostConvertByFormat($model);
Using gltf_binary the converted file returns an error âTHREE.GLTFLoader: Legacy binary file detected.â when trying to view it in an online viewer. https://gltf-viewer.donmccurdy.com/
We are investigating the issue and we will update you as soon as we made some significant progress towards issue resolution.
I am afraid currently USDZ format is not supported. We have logged a new feature request (THREEDCLOUD-55) in our issue tracking system. We will notify you as soon as the feature is implemented.