Having different colors for different objects using the same Material

Hello ! I would like to know if there is a way for me to assign different objects to have the same material but then they each exhibit their own color? The reason why I’m asking is because I’m trying to get a user to create a simple room using cube blocks and my way of having the user create different colors is to let the cube blocks each have its own materials but that would affect the performance if I have too many materials. Thank you!

Hey, you can share the same material between all your meshes. Then you can define vertex color per mesh.

It is a bit tricky because you will have to change the mesh vertex buffer but it is doable :slight_smile:

Okay, I’ll give it a shot ! Thanks !:slight_smile:

In case anyone is interested, I managed to use Deltakosh’s advice to share materials yet have different colors. I used this playground example as a guide.
Once again, thank you so much Deltakosh :smile:

1 Like