how to control the same value on multiple different materials with an object's z location? You can do this with drivers, and I've seen multiple blender channels that use an empty to control the value of multiple lights.
i was wondering how i would use drivers to control the value of multiple math nodes within the margin of -1 to 2 with an empty's z location. the reason i want to do this is because i need to control the transparency factor of multiple objects but only in the viewport so that means not an animation.
also, what i mean by &quot;within the margin of -1 to 2&quot; is that if i move the empty up then the value will only increase up to the value of 2 then after that point, no matter how much i move the empty up, the value wont go past 2.. and same with the -1 value.
there is an equation out there that lets us do this but i have yet to find it. :(
you don't have to tell me the whole equation i just need some better insight on how i would achieve this or maybe someone's experience using a similar driver setup in there own projects. thanks.
Simply use the Map Range node to clamp the results between -1 and 2.

Add a Map Range node with min = -1 and max = 2 values
Check Clamp
Select your empty's Z location and go RMB &gt; Copy Driver
Paste the driver to the Value field of the Map Range node.

The Result of the map range is shown here as a slider