Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions Inertial Bounce on y axis scale only

  • Inertial Bounce on y axis scale only

    Posted by Brad Pickford on October 14, 2011 at 12:33 am

    Hi Everyone,
    I was wondering if anyone can help. I am trying to scale an object up from 0 – 100% and have inertial bounce applied to it. The thing is I only want the bounce to effect the “y” axis. Can’t figure out how to get this done.
    Cheers

    a = .03; f = 4.0; d = 10.0;
    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);amp = a;freq = f;decay = d;
    value+ v*amp*Math.sin(freq*t*2*Math.PI)/Math.exp(decay*t);}else{value;}

    Justin Alexander replied 14 years, 6 months ago 3 Members · 3 Replies
  • 3 Replies
  • Dan Ebberts

    October 14, 2011 at 3:04 am

    I haven’t test this, but I think you would just need to change one line:

    value + [0,v[1]*amp*Math.sin(freq*t*2*Math.PI)/Math.exp(decay*t)];

    Dan

  • Brad Pickford

    October 14, 2011 at 3:10 am

    As always Dan, Spot on. Thanks a million!

  • Justin Alexander

    October 20, 2011 at 10:27 pm

    Hi I have posted a question similar to this but as I am new it is awaiting moderation.

    Is there a way to get this to work without the need for keyframes?

    Would love to be able to apply this to dozens of layers and get it to start at the inPoint, also would be awesome to slightly change the variables with sliders to get a nice randomness about it.

    Would also love to have it do the same in reverse at the outPoint with a quick little ‘bounce’ and then out she goes.

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