Hello all. I have some question about shaders\materials and optimizing. I would like to use few characters in one scene, all of them should have same shader but with some variations in color for optimization purpose. Is it possible in blender? I don’t know much about how shaders is calculating so I just want to save some PC resources and compiling times. I am using eevee.
WHat I think to do is to pack my shader node tree inside group and use some input with RGB color node so I could use this node to adjust individual shader’s color. WIll it be more optimized than using separate shaders for each character? Or maybe there is other way to do what I want?
Thank you for reply. So it’s only way to get different color for different objects from same material is to use random values without any control what object should get what color? That’s sad, but it’s better than nothing. All in all instead 10 shaders I will get only 1 for 10 characters. Theoretically it should compile and work 10 faster.
I need it per object not random. I use same base mesh for each character and using shapekeys to make their shapes different. So I need one shader for all of characters but I need control for each character’s diffuse color…
Studying object info node I’ve found out that color output will fit my needs. I can set for each character skin tint by object color (in object properties) and then just use object info color output as multiply value for mixRGB node so base skin will be multplied by objects color. At the end I will get 10 characters with one material but different colors. Thats great.
P.S. Also using object ID as factor for mix rgb I can control strenght of “overlay” skin tint.