How to add a material/shader (and make it local to scene) to an imported character?

Godot Version

4.2.2

Question

So I imported a character from blender (monster.glb) and I created an inherited scene from it. I want to add an additional material or shader (as next pass) that only affects one monster, not all monsters using this scene. Checking the “local_to_scene” option does nothing. “make unique” does nothing. How can I do this? Any help appreciated.

You may have to take one instance of your monster, right click it and select “Editable Children” then you can edit just one monster’s mesh instance data, including materials and next pass.

1 Like

Is there to do that in code during runtime?

Should be able to do it in code as you would set any material, the material whose next_pass you want to set should also be “Local To Scene”

1 Like

I can do it for simple shapes but when I try to add a material on an imported character it always adds it to all characters of that type.

are you applying to the material override? I’m not sure if imported materials can be set Local to Scene

1 Like

Yes I just solved it like 30 sec before you replied lol. It was set as “Surface 0” material on the mesh of the imported character and Local to Scene was doing nothing. I set it to Surface Override Material and now local to scene actually works as intended. I still don’t know why they behave like this but at least I found a solution. Thanks for the help!

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.