[2024] How To Use The After Effects Linear Expression

The linear expression in After Effects allows you to map one range of numbers to another, offering a powerful tool to translate values. By selecting the desired property and inputting the appropriate values in the expression, you can remap and customize animations to achieve your desired look.

January 22, 2024
[2024] How To Use The After Effects Linear Expression
"Video editors relying on templates lack genuine skill and creativity."

What do you think? Submit your opinion to see what others have to say!

"It's Like Video Editing On Steroids!"
- Sebastian Navarro, FreeVisuals Editor
Endorsed by Adobe, Motion Array is the ULTIMATE tool for creating high-quality videos! Browse 15M+ assets for Premiere Pro, After Effects, FCPX & DaVinci!

Linear Expression In Adobe After Effects

Linear Expression in After Effects

Basic Linear Expression

linear(variable, variable_min, variable_max, value1, value2);

Example: Remapping Rotation to Scale

linear(rotation, 0, 90, 100, 200);

What It Does

The linear expression in After Effects allows you to map one range of numbers to another range of numbers. Think of it as a way to translate values. It's when your vision can truly come together, especially if you've set everything up correctly. With the linear expression, you'll have all the options and avenues you'd ever want to get the right look.

Here's how it works:

The linear expression is written as:linear(variable, variable_min, variable_max, value1, value2)

  1. variable: This is the input value you want to remap.
  2. variable_min and variable_max: These define the range of your input value.
  3. value1 and value2: These define the range of your output value.

To use the linear expression in After Effects:

  1. Locate the Property: First, select the property you want to apply the expression to. This could be position, scale, rotation, or any other animatable property.
  2. Activate Expressions: Hold down the "Alt" key (or "Option" on Mac) and click on the stopwatch icon next to the property name. This will activate expressions for that property.
  3. Enter the Expression: In the expression field that appears, type in your linear expression with the appropriate values.

For instance, if you want to remap a rotation value that varies between 0 and 90 degrees to a scale value that varies between 100% and 200%, you'd use the linear expression to define these ranges and make the conversion.

The idea here is to have everything set up in such a way that you can make the majority of your creative decisions at this phase. Using your various render passes, you should be able to tweak things in a number of different ways. This is definitely the right way to approach the compositing phase of your render, ensuring that you have all the options you'd want at the very end. It makes it so easy to iterate and customize and get the exact feeling you were going for.