Cloning items in one glb

I have a large ‘library’ of models in one glb (let’s pretend it’s a bunch of trees for example named tree1, tree2, tree3, tree4 all of which are just a collection of meshes) which is loaded using “LoadAssetContainer”.

I want to then programmatically create a forest of trees using assets cloned out of the container, what would be the correct workflow to do this? Effectively I suppose doing some kind of filtered instantiateModelsToScene call? Not quite sure where to look on this one.

I think I may have answered my own question, it looks like I use clone on the transform nodes in the AssetContainer to make copies of each individual item as many times as I like.

What I do is pick out the mesh I want and then just clone it:

    let source_mesh = this.scene.getMeshByName(original_mesh_name);
    let cloned_mesh = source_mesh.clone(props.id); //clone the mesh using the clone name

that’s only possible if the assets from the container have been added to the scene though isn’t it?

instantiateModelsToScene might come handy as well

Here’s a PG with instantiateModels

But @Greg_Findon, seems like your’e wanting to load up the GLB and then only render certain objects to screen? I haven’t seen that done (not to say it can’t be!). But maybe possible to instantiate everything but only make visible those that you want.