# Group materials together and make transparent?

I have an object with multiple materials assigned to its various faces and want to adjust the global opacity of said object. So far I can only adjust the materials individually.

Can anyone help figure this out?

Cheers, Dan

• Hello, is this for Cycles, Eevee, or in the 3D viewport ? Or all three ? – Gorgious Aug 28 '20 at 13:53
• Hi, this is for Eevee – Dan Abel Aug 28 '20 at 13:56
• Add a driver to the alpha/transparency channels of all the materials you want to control – Ron Jensen Aug 28 '20 at 14:07
• hi Ron thanks for your message although I'm fairly new. How do I do this? – Dan Abel Aug 28 '20 at 14:37

Here are two solutions.

Make sure each material has a blend mode set to alpha Blend or Hashed (Or clip if you don't want the material to be semi transparent before going into full transparency). These settings will only appear if Eevee if set as your render engine.

## First solution (with a driver)

Create a value node and put it into a node group with Node > Make Group (CTRL G).

Rename the group and plug it into the principled BSDF of each of your materials. (To add in a material, choose Add > Group > group name )

Now for ease of use you can access it in the N panel on the right of the viewport.

Get back into your node group by clicking on the icon on its top right. Right click in the "prop" field and choose "Copy as new Driver". Right click in the "Value" node's field and choose "Paste Driver". The field should now be purple.

Tweak the new prop to change the opacity of all the materials at once.

## Second method : With the object color

The method is the same as the previous one, but you have to replace the value node by an "Object info" node and plug its "Color" output into the group output.

Go into the object properties, viewport display, and adjust the value of its viewport color to modify the opacity.

## Conclusion

Use the first method if you want to control the opacity of your materials across several objects, use the second one if you want to control the opacity of your materials on a specific object.

If you want a quick fix, without a need to restructure your project, you could write a simple Python script to change given object (or multiple objects by wrapping it in another loop).

import bpy

for material_slot in bpy.data.objects['Cube'].material_slots:
material_slot.material.blend_method = 'BLEND'
material_slot.material.node_tree.nodes["Principled BSDF"].inputs[19].default_value = .3


You can get this specific part ["Principled BSDF"].inputs[19] by right-clicking on a property in the node editor and choosing Copy Data Path.