Wed, 03/20/2024 - 14:14
I have written the Step to GLB conversion application.
I have a step file with Tessellated data.
The file is getting exported as GLB but the UV data is missing in it.
UV data is not getting generated for tessellated geometry types. For ManifoldSolid_Brep its working.
I have attached the sample file. Can you help here to export the UV data for this kind of geometry.
Attachments:
Thu, 03/21/2024 - 09:42
Originated system knows much more about the model, so that generation of UV coordinates would be better done there. Unfortunately, STEP Recommended Practices for tessellated geometry puts completely out of scope texturing and defines only vertex normals:
Therefore, it would be better using another format for exporting triangulation from originating system (like glTF, OBJ or similar) instead of STEP. Or export B-Rep instead of tessellated representation to STEP file.
As for dealing with what you already have - OCCT doesn't provide any tool for automatic generation of UV coordinates for existing triangulation.
The first search in the Web suggests using xatlas C++ library, which is able to generate UV texture coordinates, but I've never used it personally.