Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Forums Adobe After Effects Expressions Linear expression -Including Limits

  • Linear expression -Including Limits

  • Nithish kumar

    May 3, 2020 at 10:18 am

    I’ve got this scene where I rotate the orange rectangle to make a complete 360 according to the duration of the comp with linear expression
    But as you can see the rotation value at the end of the timeline is not exactly 360.
    I know linear interpolates between the high and low values and so doesn’t include the limits themselves.


  • Dan Ebberts

    May 3, 2020 at 4:17 pm

    Try it this way:

    t = thisComp.duration – thisComp.frameDuration;

    Say your comp duration is 10 frames. The first frame would be frame 0 and the last would be frame 9. Frame 10 would be one frame beyond the end of your comp, so you want your linear() range to end one frame before the duration of your comp. I think ☺


  • Nithish kumar

    May 4, 2020 at 10:18 am

    So what you mean by this is interpolating to the last-1 frame instead of last frame. Right ??

    And a side question

    can this effect can be achieved using time or any another way other than linear expression ?

    i.e rotate a.full 360 from start to finish of timeline

    Later I may add a counter slider to be mulripled with this value to make that many rotations

  • Dan Ebberts

    May 4, 2020 at 11:11 am

    >So what you mean by this is interpolating to the last-1 frame instead of last frame. Right ??

    No, the last frame. Try this. Create a 1-second 30 fps comp. Drag the time indicator all the way to the right and look at the time for the last frame. 00:29, right? Now hit the Page Down key. The time goes to 01:00, but you are now outside of the comp.


  • Nithish kumar

    May 4, 2020 at 11:20 am

    Yep. Now I get it

    Can you also answer my side question ?

  • Dan Ebberts

    May 4, 2020 at 11:30 am

    You don’t have to use linear()–you can do that same calculation by hand, but you still have to deal with the time of the last frame being comp duration minus one frame.


  • Nithish kumar

    May 4, 2020 at 5:27 pm

    Okay. I have a proper scene where I gotta use these things but unfortunately it all messed up. So I was verifying them with this simple scene. Lemme try on that and get back.

    Thanks, Dan…..For your patience…

    And sorry I will be coming back for more fruits of your knowledge

Viewing 1 - 7 of 7 posts

Log in to reply.

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