Ae

The Linear Expression

Intermediate

This expression is one of my most commonly used expressions within After Effects. It has a versatility to it that allows me to use it in the most peculiar of places that makes it fun to play with. One of my first tutorials I put out and one of the most valuable, as the linear expression can be used to often for so many different uses.

I always use it with five options, never the three.

SUPPORT MEDIA WORKBENCH ON PATREON FOR EXCLUSIVE DOWNLOADS
I am getting weird responses from the linear expression

You may find you get weird responses from the linear expression if you have your minimum value (tMin) greater than your maximum value (tMax). Make sure that the order goes minimum first, then maximum. You may need to swap your value 1 and value 2 values in order for it to make your output make sense in the context of your expression.

Can the linear expression work with colors

Yes, the linear expression works with color values, allowing you to use an input value to transition between two color values.

Can the linear expression work with arrays

Yes, the linear expression works with array values, however you need to ensure that both values that you are interpolating between are arrays and have the same number of values in each array.

e.g. value = linear(time,0,1,transform.scale – transform.scale,transform.scale);

This expression would result in the following result at 0 seconds…

value = [100,100] – [100,100] = [0,0]

and then at 1 second…

value = [100,100]

The expression resolves any parameters before executing the actual linear expression, so we can write expressions within the parameter. The function only sees the resulting values.

Grab some Merch

Express your inner creative outwardly whilst supporting all that we do...

View Merch store

Need some help

Run into an issue with one of the tutorials or is something not covered in the FAQ?

Contact and Support