Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions What does “Linear()” do?

  • Colin Braley

    November 11, 2005 at 3:38 am

    linear() is an interpolation method. (By the way, I don’t have AE in front of me so I can’t currently check on/test any of this.) linear() usually takes 5 arguments (things in parentheses). These are: linear(t, tMin, tMax, value1, value2). What it does is it looks at the value t and as t varies from tMin to tMax it makes value change from value1 to value2. That sounds kindof confusing but with an example it isn’t too hard to figure out. For instance:

    //this would be an expression for opacity

    linear(time, 0, 2, 0, 100)

    this expression would make opacity go from 0 to 100 as time went fron 0 to 2. Usually linear() will be used with time but sometimes you can use it for other things such as in the following example:

    //This would be an expression for scale

    pos = thisComp.layer(“random layer”).position;

    linear(pos[0], 10, 200, 50, 150)

    this expression would make the scale of the layer vary from 50 to 150 as the x coordinate of random layer’s position varied from 10 to 200. There are other interpolation methods such as ease(), easeIn(), and easeOut(). Check the manual on these for once you understand linear() these are pretty self-explanatory.
    ~Colin

We use anonymous cookies to give you the best experience we can.
Our Privacy policy | GDPR Policy