Node material and instances

Hello guys,

I have a scene where I load a mesh via asset container to make use of instantiateModelsToScene(). Unfortunately I encountered a problem here. I want to use the same node material for all the instantiated meshes. But this leads break the functionality of separated animations.

Even though I added the instances block to my node material:

Any idea what I am doing wrong?


I don’t think this is related to instances, because it happens for single meshes too, with any node material: Available Mesh BrainStem | Babylon.js Playground ( Probably related to skinning? I’ll have to ping @bghgary again for that :rofl:

1 Like

Oooh, you’ll have to add the bones in the material for it to work: Node Materials and animated meshes. (4.1) - Questions - Babylon.js (

Hi @samevision

Like this? The problem is the cloned animation groups for eyes are not started. I manually triggered play and it worked. The rest of the mesh were actually started, but you didn’t set a different position so their anim are overlapped with the original model.

@carolhmj is correct. instantiateModelsToScene is cloning, not instancing.

Yep adding the proper bone nodes solves the issue, there’s already an example on the linked question but here’s a simpler one: Babylon.js Node Material Editor (
Available Mesh BrainStem | Babylon.js Playground (

1 Like

This function will instance when possible or clone otherwise.

Despite adding all of it, there is still smthg wrong with the eyes

But I added the bones block already - not working :frowning::

The eyes are not my problem here. My problem is that with node material the animation are played synchronously. But I want to be able to play them separately.

With node material:

Without node material:

As you can see without node material the animations are separated. They second one has a delay of one second due to the timeout.

It seems that the missing morph target block caused this problem. It’s working now :slight_smile: :

The eyes are still broken.

Ohhhh :frowning:

It was too early. It is working with the alien model but I noticed that my model is still not working properly.

Alien - this is how it should look like (animations can be played independently):

My model - animations are running synchronously (if you check the animation groups at inspector you will see that the first animation group animates both meshes and the second one does nothing):

What’s wrong with my model or node material?

Eyes will be fixed by NME Fixes by sebavan · Pull Request #12172 · BabylonJS/Babylon.js · GitHub You ll be able to try out on your other models as soon as it as shipped.


Hey there @samevision have you had a chance to try out the fix, did it work for you? :smiley:

1 Like

Hey @carolhmj,

I tested it in my local project and it seems to work now :slight_smile:

1 Like