Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions Control Expression Start

  • Control Expression Start

    Posted by Aaron Esterling on December 20, 2010 at 10:31 pm

    I’m using this great “Bouncy Scale In” expression from mographwiki.net but can’t control when it starts. Currently, it starts at the beginning of the comp regardless of where the layer starts.

    I’ve tried to modify it using a couple methods I’ve found on the forums, but I either break it or it doesn’t do anything. Any help would be appreciated. Thanks!

    k=16; // final scale
    a=5; // how quickly the bounce ends
    b=20; // how many bounces it'll do (that is, the bounce speed)
    x=k*(1-Math.exp(-a*time)*Math.cos(b*time));
    [x,x]

    Gavin Mcdonald replied 13 years, 9 months ago 3 Members · 5 Replies
  • 5 Replies
  • Dan Ebberts

    December 20, 2010 at 10:51 pm

    This is how you’d change it to start at the layer’s in point:

    k=16; // final scale
    a=5; // how quickly the bounce ends
    b=20; // how many bounces it’ll do (that is, the bounce speed)
    t = time-inPoint;
    x=k*(1-Math.exp(-a*t)*Math.cos(b*t));
    [x,x]

    Dan

  • Aaron Esterling

    December 20, 2010 at 10:52 pm

    Thanks for the quick reply, Dan. Works great!

  • Gavin Mcdonald

    August 8, 2012 at 9:55 pm

    What if you want it to reverse at a layer out point?

  • Dan Ebberts

    August 8, 2012 at 10:04 pm

    This should do it:

    k=16; // final scale
    a=5; // how quickly the bounce ends
    b=20; // how many bounces it’ll do (that is, the bounce speed)
    t = (time < (inPoint+outPoint)/2) ? time – inPoint : outPoint – time;
    x=k*(1-Math.exp(-a*t)*Math.cos(b*t));
    [x,x]

    Dan

  • Gavin Mcdonald

    August 9, 2012 at 2:12 pm

    Thanks Dan,
    It actually looked real weird reverse bouncing. So all I wanted it to do was scale down so I had to duplicate the layer and fade between adjusting the out layers bounces to 1.

    You’re a legend.

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