Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Elastic/Bounce effect on Z axis??

  • Elastic/Bounce effect on Z axis??

    Posted by Spenser Hatch on February 21, 2008 at 4:00 pm

    Hey everyone, Im wanting to do an effect where these dots fall onto a page, but have a sort of elastic or short bounce effect. I Have found some expresions that work along with slider controls to make a ball bounce but its in 2D space and bouncing on the Y axis. Does anyone have any Ideas or tutoritals they could lead me to? I can also post the expresion i have used if that would help. thanks!

    Spenser Hatch replied 18 years, 2 months ago 2 Members · 7 Replies
  • 7 Replies
  • Kevin Camp

    February 21, 2008 at 4:23 pm

    did you try the 2d-y-axis method to the z-axis of a 3d layer? it seems to me it should apply…

    i’ll probably give it a shot just to test…

    Kevin Camp
    Senior Designer
    KCPQ, KMYQ & KRCW

  • Kevin Camp

    February 21, 2008 at 4:43 pm

    yep, i was able to apply a basic ‘bounce’ expression to the z-axis of a 3d layer. if you are still having problems, post your expression and describe how you used it and what problems you are seeing…

    Kevin Camp
    Senior Designer
    KCPQ, KMYQ & KRCW

  • Spenser Hatch

    February 21, 2008 at 6:11 pm

    Thanks for taking a look Kevin. Here is the expression I am using (which is obviously set for the y right now, but i have tried to replace the y with z, and keep in mind this was given to me as i am by no means an AE or expresion expert. But basically I have this expresion on the position of the graphic/clip:

    veloc = thisComp.layer(“Control Layer”).effect(“velo control”)(“Slider”);
    amplitude = thisComp.layer(“Control Layer”).effect(“amplitude control”)(“Slider”);
    decay = thisComp.layer(“Control Layer”).effect(“decay control”)(“Slider”);
    y = amplitude*Math.cos(veloc*time)/Math.exp(decay*time);
    value + [0,y]

    Then I have a “control Layer” that has slider controls for velocity, amplitude, and decay.

    Initially this example file is in 2D with no 3D layers. I tried to modify the expression and replace the “y” with “z” and then made the clip a 3d layer with no sucess. Thanks for you help and info, and if you have an easier method i would be glad to hear any and all advice! THANKS again!

  • Kevin Camp

    February 21, 2008 at 6:22 pm

    make the layer 3d by clicking the 3d check box for that layer in the switches panel (the column with the shaded cube).

    then modify the last two lines of the expression to something like this:

    z = amplitude*Math.cos(veloc*time)/Math.exp(decay*time);
    value + [0,0,z]

    * note the additional coordinate needed for the 3d array that is added to the current position value.

    i think that should do it

    Kevin Camp
    Senior Designer
    KCPQ, KMYQ & KRCW

  • Spenser Hatch

    February 21, 2008 at 7:55 pm

    Bloody Brillant! Thanks a lot. It looks like i was on the right path, but didnt add the extra coordinant. I tried to change the 0, to a 2, thinking that 0=x, 1=y and 2=z but that didnt work obviously. so thanks for the info!!! One last question… would there be an easy way to make a wiggle? I have like 20 differnt “balls” that will be dropping down, and i want them all to bounce a little differnt/randomly. Could I parent the clip or control layer to a null and add a wiggle expresion, or is there additional code i could put in what you gave me taht would randomize it? Again, THANK YOU!

    Spen

  • Kevin Camp

    February 21, 2008 at 10:17 pm

    i think there is a better way to do this, but you could try adding a random variable that gets added to some of your other variables…

    seedRandom(index,true);
    d = random(0,10);

    veloc = thisComp.layer(“Null 1”).effect(“Slider Control”)(“Slider”) + d;
    amplitude = thisComp.layer(“Null 1”).effect(“Slider Control 2”)(“Slider”) + d;
    decay = thisComp.layer(“Null 1”).effect(“Slider Control 3”)(“Slider”);
    z = amplitude*Math.cos(veloc*time)/Math.exp(decay*time);
    value + [0,0,z]

    the first line sets a random seed that will be unique to each layer (the layers index #) and ‘true’ sets the seed to be constant (not changing every frame). ‘d’ is the random variable, you could link that second value (10) to a new slider in ‘null 1’ to make it easier to make adjustments to multiple layers. then i just added ‘d’ to your veloc and amplitude variables, you could do both or just one or the other, but this seemed to work. you could have separate random variables for veloc and amplitude, or even decay, if you wanted to.

    Kevin Camp
    Senior Designer
    KCPQ, KMYQ & KRCW

  • Spenser Hatch

    February 21, 2008 at 10:36 pm

    Hey thanks a lot again! This helps me out a lot, and also teaches me as well, so I appreciate it.

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