I wonder if maybe the Attribute node in Cycles can bring in a Custom Property of an object.
I have a model that has an LED light, and I wish I could change the color of the LED on different instances of the model, without using different materials.
I wonder if maybe the Attribute node in Cycles can bring in a Custom Property of an object.
I have a model that has an LED light, and I wish I could change the color of the LED on different instances of the model, without using different materials.
Since V2.92, Cycles and Eevee feature an Attribute Node.
Add a Custom Property to your object.
Set the Type to Object and type in the name of your custom property.
These objects share the same material :
An alternative to using the pass ID is using the object name and an OSL script. It is not very elegant either, but at least allows for setting multiple values. I have explained it here.
Use the object's pass ID.
That's a less than elegant, jerry-jigged way of doing it, but I've managed to animate the emission of some cartoon stars independently with this, even they're sharing the same material.
I collect the objects pass ID with the Object Info node, then perform some operations on it so I can operate under an arbitrarily defined range of 100 to 110. You can use any range you want. Notice I have only 10 different brightness levels on my shader. If you need something smoother, get yourself a wider range.
After doing that, it's just a matter of setting the object's pass IDs and the material will react accordingly on a per-object basis. You can even animate them by hitting I on the pass ID field.
This approach has lot's of limitations, though:
But it's the best I've found until now.