# Global Variable/Node across multiple materials?

How can I get a Node input/output (e.g. a single Color/Value) that I can control from the one spot, but have mapped across multiple materials? For example, to control a value (say, Glass Shader IOF, or a Mix Shader Fac) across 30 different materials (that may or may not have different node setups, but all use the input I want as a driving factor somewhere inside).

I've got a few ideas so far, but am not sure which will work and/or which will be the best way to go about it:

• Use a Node Group

I tried setting up an input inside a node group, then using the node group in various locations - however I could only seem to automate/keyframe the 'default' values of things inside the group (these changes didn't flow through into the instances of the group).

• Script node

I could set up a Script Node that returns the value I want - however I imagine this would be tricky to automate, and it would also lock me into OSL, which feels a bit roundabout and also rules out GPU rendering (not essential but it would be nice)

• Driver

I could set up a dummy object or material, set up drivers through to the things I want to control, then keyframe the dummy object and that might achieve what I want. However this again feels a bit roundabout/messy.

Background: I'm working on a model that has a non-trivial number of materials (just over 100, auto-generated from a 3D scanner), and am trying to set up effective backface culling in rendering by using the method described here. This involves scripting the addition and connecting of all the extra nodes (Mix shader controlled by Geometry Backfacing, and a Transparent BSDF node to make the faces be rendered transparent from the back), because doing it manually for all 100+ materials would be a pain. It's not essential, but I was thinking it would be nice to be able to control the overall effect by automating all the Transparent BSDF Alpha amounts - I'm just not sure how I'd go about controlling that from a single point though.

• To supplement this answer, you can then edit the value inside the group simply by pressing Tab when the group is selected (took me a while to find out) – Romuald Brunet Jan 13 at 19:22