Hello everyone,
We have a Datasmith interface for our drawings from AutoCAD to transfer them to Twinmotion, which is also possible via a Direct-Link. Since our main projects are in C#, we have wrapped all the necessary functions of the Datasmith SDK.
The new requirement is to replace objects from the drawing with other files. For example, we have a GLTF file (in the form of a GLB) for some trees. These models are too complex for the CAD drawing and would slow it down, so we have stored the same tree again in a high detail level as a GLTF. This tree must be replaced when exporting/creating the *.udatasmith file.
Currently, I am trying to read the GLTF using the glTFLoader from the Khronos Group and assemble the mesh myself for exporting. Unfortunately, this is not working correctly; some faces are missing, and the mapping with the textures is also incorrect. Therefore, my question is: Is there a way to directly load the GLTF file (GLB) into the scene being created during export and then create the *.udatasmith file?
TLDR: Looking for a way to directly import a GLTF file (GLB) into the scene and then export it for Twinmotion using C++/C#.