6 Replies Latest reply on Jan 11, 2012 7:27 AM by Rick Gerard

    After effects speed data in graph editor not coherent

    saskia61

      Hi, im animating the typical bouncing ball, and i have activated separate dimenstions to animate X,Y separate.  So i add two keys on the X value that has a constant speed, then i animate the Y value, but i notice that the speed goes below zero in the graph editor and i dont understand it..

      Should it not be Zero as the ball stops? (Green line)

      Here you have an image with my situation:ae_speed.jpg

        • 1. Re: After effects speed data in graph editor not coherent
          Dave LaRonde Level 6

          No.  After Effects doesn't know it's a ball that should come to a stop as it bounces.  It's animating the x position at a constant rate.  If you want it to stop, you have to animate the stop.

          • 2. Re: After effects speed data in graph editor not coherent
            saskia61 Level 1

            maybe i didnt ask correctly, what i am asking is why does the speed goes -2500 px/sec... when the ball goes down speed goes up to 2500 px/sec, then when i add the next keyframe the speed goes negative (-2500 px/sec) why isnt it zero when the ball is not moving? have a look at the picture. thanks!

            • 3. Re: After effects speed data in graph editor not coherent
              Dave LaRonde Level 6

              In order to get a speed of zero, there has to be zero speed for an entire frame, and there isn't: you'd need to keyframes with identical values one frame apart.  But in your animation, the speed abruptly changes at given frames.

              • 4. Re: After effects speed data in graph editor not coherent
                bogiesan Level 4

                There is a concept in animation known as squash and stretch. If you understand that (along with the other cardinal rules of animation) you can imagine how you would set keyframes for the operation. As LaRonde says, you need keyframes to tell the ball to stand still. But something you will wnat to learn how to do is change the anchor point position (and understand how sclaing works) so you can tell the ball to compress as it hits the ground and expand upward as it rebounds. This is not really advanced stuff, it's how animation works in the, umm, real world of animation.

                • 5. Re: After effects speed data in graph editor not coherent
                  Mylenium Most Valuable Participant

                  And to add to what the others said: Coordinate systems in 2D graphics apps are upside down, hence movement in the +Y direction mathematically results in negative values, which the graph correctly reflects as effectively is giving you the velocity (amount and vector) rather than the absolute speed (amount only).

                   

                  Mylenium

                  • 6. Re: After effects speed data in graph editor not coherent
                    Rick Gerard Adobe Community Professional & MVP

                    You're making animating a bounce much too difficult. Way too much room for funky behavior.

                    Set your layer at it's starting point, set a position keyframe, then move the layer to it's ending point but keep it at exactly the same height (y value). Now add this expression and adjust the Frequency, amplitude, and decay to get the path you want. The amplitude is the number of pixels you want the ball to fall.

                    freq = 1.0; //oscillations per second 
                    amplitude =  90; 
                    decay =  .5;
                    
                    
                    posCos = Math.abs(Math.cos(freq*time*2*Math.PI));
                    y = amplitude*posCos/Math.exp(decay*time);
                    position - [0,y]
                    

                     

                    Your graph will then look like this:

                    Screen Shot 2012-01-11 at 7.20.53 AM.png

                    and you'll have a much more realistic bounce.

                     

                    Thank Dan Ebberts for the expression with a very slight modification by me. BTW, save this as an animation preset and you've always got it when you need it.