[Stephen Mendenhall] “When the slider is at “0”, I want layer A to be 100% opacity and layers B and C at 30% opacity.
When the slider is at “45”, I want layer A to drop to 30% opacity and Layer B to raise to 100% opacity.
When the slider is at “90”, I want layer B to return to 30% opacity and layer C to raise to 100% opacity.”
You will need a separate expression on the opacity property of each layer.
There is a function called “linear” which translates one range of values to another. In this case, we’ll use it to translate your input control values to your output opacity values. The basic syntax is this:
linear(input, minimumInput, maximumInput, outputBegin, outputEnd);
Here’s an example:
linear(time,0,10,50,100);
Translated to English, this says “As the value of time goes from 0 seconds to 10 seconds, return an output from 50 to 100. Thus, time=0 will return 50, time=5 will return 75, and time=10 will return 100.
Alt+click the opacity stopwatch and enter expressions like the following:
LAYER A
control = thisComp.layer("Contol Layer").effect("Slider Control")("Slider");
linear(control, 0, 45, 100, 30);
LAYER B (this one is a little trickier because you have to see whether you’re coming into 45 or going out of it)
control = thisComp.layer("Contol Layer").effect("Slider Control")("Slider");
if (control < 45) linear(control, 0, 45, 30, 100)
else linear(control, 45, 90, 100, 30);
LAYER C
control = thisComp.layer("Contol Layer").effect("Slider Control")("Slider");
linear(control, 45, 90, 30, 100);
Walter Soyka
Designer & Mad Scientist at Keen Live [link]
Motion Graphics, Widescreen Events, Presentation Design, and Consulting
@keenlive | RenderBreak [blog] | Profile [LinkedIn]