Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions adding bounce to ease expression (no keyframes)?

  • adding bounce to ease expression (no keyframes)?

    Posted by Tristan Summers on May 2, 2019 at 1:20 pm

    I have two points that are being generated by the size of a text layer.
    I am moving it on screen with:

    p1=thisComp.layer(“CONTROL”).effect(“OFF SCREEN POSITION”)(“Point”);
    p2=thisComp.layer(“CONTROL”).effect(“MAIN POSITION”)(“Point”);
    ease(time,2,3,p1,p2)

    Is there a way to add bounce / inertia expression to the ease expression?

    There are no keyframes.

    p1=thisComp.layer("CONTROL").effect("OFF SCREEN POSITION")("Point");
    p2=thisComp.layer("CONTROL").effect("MAIN POSITION")("Point");
    ease(time,2,3,p1,p2)

    Tristan Summers replied 7 years, 3 months ago 2 Members · 3 Replies
  • 3 Replies
  • Filip Vandueren

    May 2, 2019 at 9:53 pm

    The simplest way would be keep the calculation you already have, hide it , and add another layer that references it with a lagging formula. See the attached example

    inertia = 0.6;
    stiffness = 0.3;
    // you can try differen values between 0-1 for these

    lagValue = calcValue(0);
    f= thisComp.frameDuration;
    will=0;

    for (t=0; t<=time; t+=f) {
    delta = calcValue(t) - lagValue;
    will = will * inertia + delta*stiffness ;
    lagValue +=will
    }

    lagValue;

    function calcValue(t) {
    // Here we are pointing to the value want to base our lag on:
    return thisComp.layer("Green Solid 4").transform.position.valueAtTime(t);
    }

  • Tristan Summers

    May 3, 2019 at 9:03 am

    Great. will try.
    I can see how that watching something else thing will be very useful for more advanced parenting.
    Whilst I wait for nodes, and multi-processing… sigh

  • Tristan Summers

    May 3, 2019 at 1:44 pm

    Now trying to adapt it to be a bounce back to match an ease and whizz keyframe anim.
    TRying to get my head round how a function works vs keyframes

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