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.
Blender Stack Exchange is a question and answer site for people who use Blender to create 3D graphics, animations, or games. It only takes a minute to sign up.Sign up to join this community
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
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.
There's a patch that adds exactly this functionality in the works: