2
$\begingroup$

how would I apply all ofthis into an animation? I would like to animate a lightbulb switching on and off but it seems some of the properties discussed are not available outside the compositor.

https://www.youtube.com/watch?v=-Ya-7olrPyc

$\endgroup$
2
  • $\begingroup$ You can use drivers to drive nodes input values. Right click on a slot and choose 'add driver' $\endgroup$
    – lemon
    Mar 1 '17 at 7:31
  • $\begingroup$ how do i do that? $\endgroup$ Mar 1 '17 at 7:41
1
$\begingroup$

The principle is the following but can be more or less complex starting from the video as it will surely involve several drivers and to do it in material and compositing nodes settings.

Here the cube's color is changing depending on the position of an empty along Y (the effect is visible in rendering mode):

enter image description here

In this example, I add a driver to the 'fac' value of a mix shader:

enter image description here

Then open a view and set it to 'graph editor' (1), then set it to 'drivers' mode (2), select your object (the lamp in your case), then its material and the 'fac'. Then (4), open the right panel (N) and choose the 'drivers' tab:

enter image description here

Add for instance an empty. Then in the driver panel, use it as input (variable) object (1), and for example choose its Y position to drive the result. Set (2) the driver to 'scripted expression' then set the expression to (var > 0) so that the output is 1 when the empty.Y is above 0, and is 0 when it is below 0.

enter image description here

Doing that, the mix shader node is driven by this previous driver's output. So you can animate a lamp this way, just moving an empty.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.