Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Trigger Mr. Ebbert’s Squash and Stretch?

  • Trigger Mr. Ebbert’s Squash and Stretch?

    Posted by Greg Digenti on November 8, 2008 at 8:14 pm

    I notice that in Dan Ebbert’s expression, the Squash and Stretch motion is triggered at the start of the layer. But the layers that I need to squash and stretch need to do so at various points of the animation and splitting them would be far too tedious (several layers each with a mask, all of them parented to a Null which is controlling the scale and motion).

    Is there a way to trigger it using a slider or something? I’m trying to avoid keyframing the animation because it doesn’t look as smooth.

    Thanks in advance.

    Jamie Zahn replied 15 years, 10 months ago 4 Members · 4 Replies
  • 4 Replies
  • Mike Clasby

    November 9, 2008 at 4:21 am

    Here is an expression for having a marker trigger Dan’s squish and squash. Put the expression on Scale. (Copy the expression, Alt-Click the Scale stopwatch, Paste):

    n = 0;
    if (marker.numKeys > 0){
    n = marker.nearestKey(time).index;
    if (marker.key(n).time > time){
    n–;
    }
    }

    if (n == 0){
    value;
    }else{
    max_dev=20; // max deviation in pixels
    spd=35; //speed of oscillation
    decay=10; //how fast it slows down
    t = time – marker.key(n).time;
    s = max_dev*Math.sin(spd*(t))/Math.exp(decay*t);
    value + [s,s];
    }

    So wherever you place a marker you’ll get the old squish and squash. Hit the asterisk (*) key on the numeric pad to drop a marker wherever you are on the timeline.

    There are other ways to trigger expressions, but this is easy and very flexible.

    Note: No marker, no squish and squash. Five markers give five squish and squashes.

    Also if you’re talking a diferent expression, just drop that in below the }else{.

  • Greg Digenti

    November 9, 2008 at 11:03 pm

    Perfect! Thanks a lot!

  • Enrique Vazquez woolfolk

    October 11, 2009 at 1:51 am

    Wow, very very usefeul. Thank you so much for this.

  • Jamie Zahn

    July 5, 2010 at 12:56 pm

    It sounds really simple, however, nothing happened when I pasted the scale expression and added a marker. Can you post a screen grab of an example that I may use as a reference?
    Thanks

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