Is it normal that once I put the material to an object it stops animating? (custom shader)

So the animation works fine, as it should but when I try to apply the texture to the character then it stops animating. For example if I put the texture on the head then only the head stops moving.

Original Post on Discord

by user 483253293477265409

That’s definitely not normal. Is the material set to use gpuInstancing?

Are you only changing textures or the whole material?

the whole material

by user 483253293477265409

I tried with and without and it does the same thing

by user 483253293477265409

by user 483253293477265409

by user 483253293477265409

Ah changing the whole material on a skinnedMesh might be an issue here where skinning matrices etc would have to re-set on the material. We never had such a case so far (changing skinned mesh materials at runtime) - would you mind sending a small repo scene again with that model and your code where you change the material?

I need to check what threejs does here exactly: three.js docs

can you try this? material.skinning = true; ?

on the material that you change/assign?

where can I access the code of the material? I was doing it just in the unity editor, I didn’t think/know that I needed to change code for the textures

by user 483253293477265409

Ah ok I thought you were changing the material via typescript.

What material are you assigning then? With which shader?

custom shader

by user 483253293477265409

Ah that’s what i thought - unfortunately dont support custom shaders skinning right now

oh ok

by user 483253293477265409

Changed the channel name: Is it normal that once I put the material to an object it stops animating? (custom shader)