Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Weird “glitchy” displacement of objects when using several instances of the EaseAndWizz script on parented objects that move together

  • Weird “glitchy” displacement of objects when using several instances of the EaseAndWizz script on parented objects that move together

    Posted by Xavier Bonet on April 29, 2016 at 4:05 pm

    Hello! This is my first post on CC but I’ve been a faithful user for years now!

    Hope my subject-line wasn’t too obscure. I find no other way to describe what’s going on. That’s why I’ve included a small clip of the issue: 10027_outrotrial.mp4.zip

    The reason I’m now posting for the first time instead of trying and searching and etc. until I get it is because my issue is both urgent and, to my knowledge (as I’ve been banging my head against the wall for hours), unsolvable!
    This is a simple 2D intro animation. There’s 5 squares, each made parent to the following square. They just rotate down on their Y-axis. And I’m using EaseAndWizz script to get an “Elastic” motion effect. And that’s it; there’s nothing weird; and this is a pretty standard effect, I think (at least I’ve seen it several times before). However, look at what’s going on in the video… 🙁

    I know (am 99% sure) the issue is the EAW script. As you can see in the last example, I’ve gotten rid of the EAW script (thus the blandness of the animation) and the problem isn’t repeated. So, you say, there’s your solution! But, really, see the difference in the coolness! It would be very sad indeed to have to get rid of the EAW script that makes it look so good.

    Does anyone have another suggestion?

    Thank you very much in advance!

    Richard Herd replied 10 years ago 2 Members · 4 Replies
  • 4 Replies
  • Richard Herd

    April 29, 2016 at 5:41 pm

    Yeah that is definitely bad juju. without your project file, it’s hard for me to figure out what’s up.

    I use two expressions for a similar thing. If you want it, here it is:

    This one goes on the X rotation and you’ll need to include three Expression Effects:


    //USES MARKERS ON THE LAYER TO SWING A LAYER
    amp = effect("Pendulum At Marker")("Amplitude");
    freq = effect("Pendulum At Marker")("Frequency");
    decay = effect("Pendulum At Marker")("Decay");
    n = 0;
    t = 0;
    if (marker.numKeys > 0){
    n = marker.nearestKey(time).index;
    if (marker.key(n).time > time){
    n--;
    }
    }
    if (n > 0) t = time - marker.key(n).time;
    a = amp*Math.sin(freq*t*2*Math.PI)/Math.exp(decay*t);
    value + a

    This one goes on the position layer of the “lower layers” (the original layer stays in its position.


    // SCRIPT GLUES LAYERS TOGETHER USING PRECOMP AND SCRIPT
    center=thisComp.layer("White Solid 2 Comp 2").transform.anchorPoint;
    angle=degreesToRadians(thisComp.layer("White Solid 2 Comp 2").transform.xRotation);
    radius= 265;
    x=radius*Math.cos(angle);
    y=radius*Math.sin(angle);
    add(center, [transform.position[0]-center[0],x,y]);

    Sources:
    The first expression is from Adobe’s Expression Sampler; since you control the decay through an Expression Effect, your key frames go on the X rotation. I wrote the second expression.

  • Xavier Bonet

    April 29, 2016 at 10:34 pm

    Thanks a lot for your response, Richard! And sorry about not including my project file… forum amateur mistake!
    Here’s the culprit project file: 10028_outroglitch.aep.zip
    And here’s my second amateur badge: how do I include the 3 Expression Effects? Because obviously I just copied and pasted your code and got an error, which corroborated that I was missing something: the “Pendulum At Marker”.
    I’m afraid I’m not following you…
    Thanks again for your input!

  • Xavier Bonet

    April 29, 2016 at 10:55 pm

    I’m not meaning to add this as the answer to my issue, becausue it’s not. I’m still interested in knowing why the EAW script is glitching out. However, for practical purposes, I decided to stop looking at the problem and finding a solution, and start looking at another way out, that is, another way to do the thing.
    Richard Herd’s post got me thinking that really I was obsessing a little on the issue with the EAW and that there were other ways to achieve a fairly similar effect. One, for instance, surely Richard’s, although the amateur that I am, I can’t figuro out how to use it.
    Instead, I found a simple elastic/bouncy expression online and tweaked it with the values I needed to get an effect as close to the one I want.
    For what it’s worth, in my case, right now, with the urgent deadline ahead, this is my solution or rather way-around the issue of the EAW glitch:
    // Inertial Bounce (moves settle into place after bouncing around a little)
    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 = .05;
    freq = 4.0;
    decay = 2.0;
    value + v*amp*Math.sin(freq*t*2*Math.PI)/Math.exp(decay*t);
    }else{
    value;
    }

  • Richard Herd

    May 9, 2016 at 6:41 pm

    Sorry for the delay. But yeah, I use Inertial Bounce all the time!

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