Controling nodes of one material from another?

I am trying to figure out if there’s a way to control an RGB input in one material from a different material so that I can change the color in both materials at once with out having to copy the color go into the other material and pasting it in the correct field. Is that possible to set up using something like the attribute node? I tried it but i wasn’t quite sure what to replace .default_value with to make it use the current color.

I would think that this could be done using Drivers… If you select your color and Right click on it you will see the “Add Driver” option…

however because your wanting to controll a color you will have to use the “single Property” option in the drivers menu… and you will have to input a “data path” to do it…

it’s kind of complex if you have never done it before… even then… I’m not sure if it will work the way your wanting it to… but no point in not giving it a try…

I thought about that but using drivers however I haven’t been able to use them for material based operations, only shape key or modifier operations. I’ll see if its possible to do so with color

Take a look here as Nathan goes over using Driver with the “copy data path” options…

Even though here Nathan discusses Quaternion and Euler Rotation… at about 3:00 he begins his discussion of the use of the “single property” settings in the Drivers panel… this may be exactly what your looking for…

Anyway… Nathan can explain it way better than I can so…

I’m thinking there might be an easier way!

Add an Input > RGB node.
With only that node selected, hit Ctrl-G to make it a node group.
Give that node group a catchy name, like “ColorController” or so.
Now add that ColorController node group to all materials that need to share the same color and feed it into the respective color channels. Now all you have to do is change the color value in one of the ColorController node groups. Changes to one ColorController should propagate across all instances of it in all materials it is used in.

Perfect Ikari, I didn’t realize that groups could be used across materials like that. Trying to figure out the correct datablock was becoming tiring since when you try to copy data block of a color it doesn’t work unlike copying a location or scale value as in the rigging video above.

Yeah, I recently kinda stumbled across this accidentally when I had a more complex node group added to multiple materials and suddenly wondered why all materials looked the same…:rolleyes:

Aaaaaa… Hey that works Great!.. Good going Samuraishi !!! … thanks for the share on this!