Hello, I have another problem.
I have an object that, if I instantiate it in Blender and then export it as glTF, when I load the object in the sandbox, the instantiated object is an InstancedMesh, which is expected. However, if I instantiate that object in the BabylonJS scene and then export the instantiated object as glTF, when I load the object in the sandbox, the instantiated object is a regular Mesh. How can I make it so that upon export the instantiated object is considered an instance in glTF, the same as an instance from Blender for example?
Thank you.
1 Like
cc @bghgary, I’m not sure what is considered an instance in a glTF file…
IIRC glTF doesn’t support instances.
glTF has explicit support for instancing via EXT_mesh_gpu_instancing which corresponds to thin instances in Babylon.js.
The core glTF spec doesn’t explicitly define how to instance meshes, but we interpret nodes pointing to the same mesh as instances in the glTF loader. The glTF exporter in Babylon.js doesn’t currently handle this case, which is why it doesn’t work for you. Here is the issue tracking this ask:
Contributions welcome!
2 Likes
Got it. Thanks
Today I learned a new thing
2 Likes