Node "variables" used on different materials

Is there a way to create a “variable” that can be used on different materials within the node editor. Either a single number, e.g. used as a mix factor. Or even an RGB value, which is used in two or more cycles materials, in the node editor.

I have also been looking for a way to do this. As far as I know there is no simple way. I have tried using the get attribute node with custom attributes driven by a custom attribute on a master empty, but with no success.



You can create a node group and share it between different materials.

Bofzevampire, yes node groups are the way to do it. Kaluura sent me a pm explaining the process. Thanks.

Ko, that is a method to share a value within a single material, but it does no good on a separate material.

For everyone who reads this thread in the future and wants to know how node groups work…
create a input value
click on it
press ctrl g

this will make it int its own nodegroup with one output
give it a name

in your second material add in a group > what you called it

now this value is shared between materials… if you need to edit it press tab on the nodegroup to enter edit mode… tab to get out.

Thanks @doublebishop, I should have included a recap of what I learned and how to use it.