Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions Looping Expression

  • Looping Expression

    Posted by Gigi Marzo on May 28, 2020 at 2:13 pm

    Hi, I’m approaching to world of animation. So I’d like to loop an expression.
    I’ll try to be clearer,
    I have this expression (bounce, to apply to scale and/or position) and I want to loop (cycle) it.

    amp = .06;
    freq = 2;
    decay = 7;

    n = 0;
    if (numKeys > 0){
    n = nearestKey(time).index;
    if (key(n).time > time){
    n--;
    }
    }
    if (n == 0){
    t = 0;
    }else{
    t = time - key(n).time;
    }

    if (n > 0){
    v = velocityAtTime(key(n).time - thisComp.frameDuration/10);
    value + v*amp*Math.sin(freq*t*2*Math.PI)/Math.exp(decay*t);
    }else{
    value;
    }

    and I’d like to loop with simple expression like that:

    loopOut ("pingpong")

    How I do it?

    Thank u in advance 🙂

    Adirai Maji replied 5 years, 11 months ago 2 Members · 1 Reply
  • 1 Reply
  • Adirai Maji

    May 31, 2020 at 9:02 am

    Simple method would be pre-comp the layer and apply keyframe on time-remapping and apply loopOut() to time-remapping.

    ==================================================================================================
    Thanks in Advance…

    – Adirai Maji

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