Hello fellow seekers!
I was wondering how to manage different shapes (each with their own transformation, material, etc.)
from a single Blender (.glb) file with Babylon’s instantiateModelsToScene()
The idea is to import one .glb file containing all the needed shapes, use (and reuse/copy) the ones that are needed. But I can’t seem to get it to work. I am not sure if this is even possible?
I don’t like the idea of having to create a separate .glb file for each shape.
This is the output of the .glb import using: LoadAssetContainerAsync()
Note that there are 7 geometries, and that is correct (first screenshot). But there are 8 meshes, why is that?
–
Alternatively I’ve played with another import method: ImportMeshAsync() (see below log) and I tried to copy the objects when I needed them with .clone(), but that also failed.
I am not sure which import method to use, probably depends on performance, but I will decide at a later stage. What’s the proper way to manage multiple shapes from a single asset file? Ideally in both methods?