Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions Transition based on position

  • Transition based on position

    Posted by Lukasz Pason on February 25, 2010 at 12:39 am

    I’m a total noob at expressions and what I am trin to do is have a linear wipe start when the x position of a null reaches a certain point and complete at another. I have looked around for advice and tried to put something together but I just can’t wrap my head around it. Any help would be great!!!

    Dan Ebberts
    replied 16 years, 2 months ago
    2 Members · 3 Replies
  • 3 Replies
  • Dan Ebberts

    February 25, 2010 at 1:27 am

    It’s probably going to look like this:

    nullX = thisComp.layer(“Null 1”).transform.position[0];
    startX = 100;
    endX = 200;

    linear(nullX,startX,endX,0,100)

    adjust startX and endX to fit your situation. You may have to reverse the 0 and the 100 in the last line.

    Dan

  • Lukasz Pason

    February 25, 2010 at 5:42 am

    You’re brilliant.

    I see posts from you on most every thread I have looked at. Thank you so much Dan for helping me and this community!!

    So I know that you are just setting variables with nullx, startx and endx. What I dont understand is what the other piece is. Could you explain it at all?

    Cheers,
    Lukasz

    nullX = thisComp.layer("Null 1").transform.position[0];
    startX = 100;
    endX = 200;

    linear(nullX,startX,endX,0,100)

    Motion Designer / DJ / Father
    http://www.lukaszpason.com
    http://www.krop.com/lukasz

  • Dan Ebberts

    February 25, 2010 at 2:23 pm

    linear(param1,param2,param3,param4,param5) just does a range conversion, converting the range defined by param2 and param3 to the range defined by param4 and param5. That is, as param1 varies between param2 and param3, the output varies linearly between param4 and param5.

    If param1 is less than param2, the output is clamped at param4. If param1 is greater than param3, the output is clamped at param5.

    It’s one of the “interpolation methods” if you want to look it up in AE’s help. More here:

    https://help.adobe.com/en_US/AfterEffects/9.0/WS3878526689cb91655866c1103906c6dea-7a06a.html

    Dan

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