Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions Squash and stretch

  • Squash and stretch

    Posted by Gigi Marzo on July 10, 2015 at 5:56 pm

    Hi!

    As I wrote a few posts ago, I’m “playing” a little with motion and animation. Obviously beginner which I am, many times I have some problems during the process. Are a couple of days that indeed I wonder how I can make an perpetual Squash and stretch.

    I found on Dan website (Ebberts, of course) the expression, but obviously is short (time), instead I would that be perpetuated over time, even at the same speed (-referring to the example of dan-, not the starting one, it’s really fast, but not even the final one, it’s not very evident, something in between)

    I hope I made myself clear -I’m sorry for my little english-

    thank u in advance!!!

    maxDev = 13; // max deviation in pixels
    spd = 30; //speed of oscillation
    decay = 1.0; //how fast it slows down

    t = time - inPoint;
    x = scale[0] + maxDev*Math.sin(spd*t)/Math.exp(decay*t);
    y = scale[0]*scale[1]/x;
    [x,y]

    Gigi Marzo replied 10 years, 10 months ago 2 Members · 2 Replies
  • 2 Replies
  • Dan Ebberts

    July 10, 2015 at 6:22 pm

    I’m not sure exactly what you’re asking, but if you set decay to 0, it will just keep on going:

    maxDev = 13; // max deviation in pixels
    spd = 30; //speed of oscillation
    decay = 0; //how fast it slows down

    t = time – inPoint;
    x = scale[0] + maxDev*Math.sin(spd*t)/Math.exp(decay*t);
    y = scale[0]*scale[1]/x;
    [x,y]

    But if you’re going to do that, you might as well get rid of the decay altogether:

    maxDev = 13; // max deviation in pixels
    spd = 30; //speed of oscillation

    t = time – inPoint;
    x = scale[0] + maxDev*Math.sin(spd*t);
    y = scale[0]*scale[1]/x;
    [x,y]

    Dan

  • Gigi Marzo

    July 12, 2015 at 7:29 pm

    yes, no decay works fine!

    Thank u!
    Im going OT if I ask another question about this effects (applied to the project) ?

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