Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions Auto position animation at the end of the composition

  • Auto position animation at the end of the composition

    Posted by Avinash Ramanath on May 2, 2017 at 10:27 am

    Hi,
    I have many placeholders inside render comp. placeholders duration will be different for each placeholder. I want an expression that will automatically move the position of placeholders from [960,540] to [960,-540] in the last 20 frames of the placeholder comp.

    Thanks

    Avinash Ramanath replied 7 years, 8 months ago 2 Members · 17 Replies
  • 17 Replies
  • Steve Sierra

    May 2, 2017 at 11:48 am

    Hi again,

    I think you could put this in the placeholders’ positions :

    m = timeToFrames(thisLayer.source.duration) + timeToFrames(thisLayer.inPoint) – 20;
    n = framesToTime(m);
    p = framesToTime(20);
    y = ease(time ,n, n+p, [960, 540], [960, -540]);

    if(time>n){
    y
    }else{
    [960,540];
    }

    Cheers !

  • Avinash Ramanath

    May 2, 2017 at 2:37 pm

    Thanks Steve, that worked

  • Avinash Ramanath

    May 4, 2017 at 4:55 am

    Steve, need one more alteration. What should the expression be if it needs to have different in and out animations
    example:

    in – from [960,-540] to [960,540]
    out – from [960,540] to [960,-960]

    Thanks

  • Steve Sierra

    May 4, 2017 at 11:36 am

    Hi,

    I think this is what you need :

    a = thisLayer.inPoint;
    b = timeToFrames(a);
    m = timeToFrames(thisLayer.source.duration) + b – 20;
    n = framesToTime(m);
    p = framesToTime(20);
    x = ease(time ,a, a+p, [960, -540], [960, 540]);
    y = ease(time ,n, n+p, [960, 540], [960, -960]);

    if(time = b){
    x
    }else{
    if(time>n){
    y
    }else{
    [960,540];
    }
    }

    Cheers 😉

  • Avinash Ramanath

    May 4, 2017 at 12:03 pm

    Only out animation is happening, but in animation is not happening.

  • Steve Sierra

    May 4, 2017 at 12:33 pm

    Oups…

    It’s supposed to be :

    a = thisLayer.inPoint;
    b = timeToFrames(a);
    m = timeToFrames(thisLayer.source.duration) + b – 20;
    n = framesToTime(m);
    p = framesToTime(20);
    x = ease(time ,a, a+p, [960, -540], [960, 540]);
    y = ease(time ,n, n+p, [960, 540], [960, -960]);

    if(time = a){
    x
    }else{
    if(time>n){
    y
    }else{
    [960,540];
    }
    }

    I put b in the if condition instead of a… interchanged those varibles at the last minute 😉

  • Avinash Ramanath

    May 4, 2017 at 12:42 pm

    Sorry, Steve, it’s still nor happening.

  • Steve Sierra

    May 4, 2017 at 12:56 pm

    You’re right…
    I don’t know why. I’m only getting the In animation.

    I’ll lokk into it when I have some time, unless someone else helps you out.

    Good luck !

  • Avinash Ramanath

    May 4, 2017 at 1:03 pm

    Appreciate it thanks.

  • Steve Sierra

    May 4, 2017 at 1:05 pm

    I think I got it :

    a = thisLayer.inPoint;
    b = timeToFrames(thisLayer.inPoint);
    m = timeToFrames(thisLayer.source.duration) +timeToFrames(thisLayer.inPoint) – 20;
    n = framesToTime(m);
    p = framesToTime(20);
    x = ease(time ,a, a+p, [960, -540], [960, 540]);
    y = ease(time ,n, n+p, [960, 540], [960, -960]);

    if(time n){y}

    Cheers !

Page 1 of 2

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