Copy link to clipboard
Copied
On my current After Effects project, I'm trying to animate a glow effect within certain parameters. Each part of the glow effect needs to be animated by an audio amplitude that has an ease(value) function on it. The individual parts of the glow need to all have a base value so they're not off when not being effected, but they need to still be intensified when the audio amplitude is inputting values. I'm still learning expressions, and everything I'm doing seems to not be rendering the desired result. I need an expression that can be applied to any individual parameter of the effect, that, when not being effected, has a base value. Otherwise, when being input upon by the amplitude, it will react from said value to another adjustable value, like a ceiling if you will. I hope this is descriptive enough, thand
In the Expression Language Menu>Interpolation in the timeline, you will find the methods for ease, easeIn, easeOut, and linear. For audio visualizers I usually pick the ease method.
Here is how that looks:
ease(t, tMin, tMax, value1, value2)
Here's what that means:
Copy link to clipboard
Copied
You can use linear() to transform a value area to another one - like input is 0 ...100, but output is 51...67.
The same is possible for ease, but with the easing the result might be not what you want. So, try the linear way.
Read more about it in the language reference:
https://helpx.adobe.com/after-effects/using/expression-language-reference.html
*Martin
Copy link to clipboard
Copied
In the Expression Language Menu>Interpolation in the timeline, you will find the methods for ease, easeIn, easeOut, and linear. For audio visualizers I usually pick the ease method.
Here is how that looks:
ease(t, tMin, tMax, value1, value2)
Here's what that means:
If you wanted to animate the Minimum and Maximum value for Glow Intensity from 1.5 to 3.7 and the minimum and maximum values you wanted to use for the Both Channels slider was between .5 and 8 then the expression would look like this:
t = thisComp.layer("Audio Amplitude").effect("Both Channels")("Slider");
ease(t, 1.5, 8, 1.5, 3.7)
Here is the analysis and setup workflow I usually use:
Fortunately most of the properties in the Glow Effect are arrays so all you need is one value. if you wanted to animate a property color you would have to use a 4 place array like this [red, green, blue, alpha] with all values ranging between 0 and 1. You would define a variable for each color using a different linear method for each. Having the Audio drive the color of Color A might look like this:
t = thisComp.layer("Audio Amplitude").effect("Both Channels")("Slider");
c = ease(t, 1.5, 8, 0, 1);
[value[0] + c, c, value[3]-c, 1]
In the array I'm adding the value c to the current value of value[0] which is red, using the value of c for green, subtracting the value of c from value[2] which is red and setting the value of the alpha channel to 1 so the colors will be visible]
I hope that makes some sense.
Copy link to clipboard
Copied
This was exactly what i was looking for. Thank you so much for taking the time to write up a thorough answer!
Get ready! An upgraded Adobe Community experience is coming in January.
Learn more