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

Free Support Forum - aspose.com

Convert STL to GLB results in invalid attribute: "/meshes/0/primitives/0/attributes/NORMAL_0”

Hello,
We are trying to convert STL files to GLB. I’'ve attached a sample STL but the same error happens with all of our other stl files

The code is very straightforward (maybe too straightforward)
Aspose.ThreeD.License license = new Aspose.ThreeD.License();
license.SetLicense(“Aspose.3D.NET.lic”);
var scn = new Aspose.ThreeD.Scene(input.FullName); //stl file input is of type System.IO.FileInfo
outputFormat = Aspose.ThreeD.FileFormat.GLTF2_Binary;
scn.Save(output.FullName, outputFormat);

abe_lincoln.stl.zip (8.1 MB)

Thank you in advance,

@rcamachophysna

We have tested the scenario in our environment while using Aspose.3D for .NET 21.3 and did not notice any exception. The output was generated fine without any error. Could you please make sure that you are using the latest version of the API and let us know in case issue still persists.

abe_lincoln.gltf.zip (1.0 KB)
Thank you for your reply. We’re using Aspose.3D version 21.3. The error is not a runtime exception but the resulting glb file being invalid (containing invalid attributes). We run the converted glb file through several validators like Khronos or this one https://gltf-viewer.donmccurdy.com/ Both validators report errors on the resulting GLB file

@rcamachophysna

We have logged an issue as THREEDNET-879 in our issue tracking system. We will further look into its details and keep you posted with the status of its correction. Please be patient and spare us some time.

We are sorry for the inconvenience.

Hello, @asad.ali, I see the status of THREEDNET-879 has changed to resolved. Could you please let me know what the resolution is and, hopefully, the version number that contains this fix?
Thank you

@rcamachophysna

Please try the latest 21.4v as this bug was already fixed in THREEDNET-862 which we later found in our logs. We converted this input file with 21.4v and the generated file was able to pass the official glTF validator.

@asad.ali thank you for your reply. 21.4 fixed the NORMAL_0 issue and several of out STL files started converting correctly. However in several we now see validation errors like this:
image.png (351.1 KB)
Here is an STL file that reproduces the issue.


Thank you

@rcamachophysna

We have logged another ticket as THREEDNET-884 in our issue tracking system for the file that you have shared. We will further look into its details and keep you posted with the status of its correction. Please be patient and spare us some time.

We are sorry for the inconvenience.