Scene Performance Priority Modes Issue

I noticed that there is a way to modify the material in the document, but the material cannot be modified actually

What do you mean? Is it within an animation or something?
I’m not sure what the intermediate mode does just exactly besides freezing meshes, but I experienced that in some cases, it was not the freeze but the dirty mechanism preventing the update.
You could try add this line to see if it makes a difference:

scene.blockMaterialDirtyMechanism = false;

Instead of unfreezing / freezing, try to call material.markDirty(true).

Better handling frozen materials is something on our list:

1 Like

This works, tks

markDirty Only one material takes effect

Yes, it’s a known problem with the current system and is reported in the 4th bullet point in Materials: improve management of frozen materials · Issue #13776 · BabylonJS/Babylon.js · GitHub.

A workaround is to call markDirty in the onUnbind observable: