# How to link a variable of a material to another material?

Let's say I have two materials "material1" and "material2". How do I achieve that material1's roughness(or anything else) is the same as material2's and changing material2's roughness will change both?

I think the easiest way to do this - is using node-groups. This is instruction:

1. Add a node with your parameter for roughness it will be Value node:

1. Select your node than press Ctrl+G. It will create a node group with output from value node:

1. To exit from node-group press Tab and connect node group to roughness socket.

1. In N-pannel you can change name to any that you like:

1. And finally, in outer material nodes you can add same node-group from Add(Shift+A)->Group menu.

1. New node will have number near node-group name. It indicates how many copies of this node-group you use.