Change color of a sub mesh of an instance

Hello,

I want to create a merged mesh from a sphere and a torus, after creating the merged mesh I want to create n instances from this mesh. Every instance can have a different color and after creating the instance I’m able to change to color of it with the instanced buffers. But I want to only change the color of the sphere in the instance, the torus should stay the same color always. I didn’t manage to achieve this, is it possible?

Thanks for your help!

you would need to use either a custom material and store in a dedicated attribute maybe a color mask helping you to pick colorTorus or colorSphere for instance.

The second solution is to do it in 2 drawcalls with two instancedMesh (sphere and torus)