-
Map range of values to multiple other values
Hi,
I’ve been trying to figure out a simple way to map a range of values of one parameter to multiple values in another parameter, like a basic interpolation expression, except that I have more than two values that need to be mapped. I’ve used if/else statements, which works, but if there are many values to map, it requires many if/else statements and I’m wondering if there’s a better way?
For example, let’s say the rotation of layer1 goes from 0 to 50 to 60. if I want to make layer 2’s opacity go from 100 to 80 to 20, using layer1’s rotation values as the prompt, is there a single line of code to do this?
something like:t = thisComp.layer(“layer1”).transform.rotation;
linear(t, 0, 50, 60, 100, 80, 20)Thanks.
After Effects templates – lens flares, light leaks, old film effects, digital glitches, VHS glitches, and more: https://CreationEffects.com