smallarrows.GIF
ballbounce.gif

Maya: Animate a Bouncing Ball,
Changing Velocity between Key frames.
Animating an object is similar to animating the camera, move the time slider, move the object, select the channels and set key frames.



Set Keyframe 1:
timeslider.jpg
Set the maximum playback on the time slider to 30, over to the right on the time slider.

Place a sphere above the origin (x 0, y 7, z 0), use the front view.

Pick  the sphere.

Move the time line over to frame 1 at the bottom of the screen.

Hold down the Ctrl key while highlighting Translate Y, Scale Y in the Channel Box, they should appear black. Use the right mouse key over the black area, choose Key Selected.



Set Keyframe 15:

Move the time line over to frame 15.

Move the sphere down to the ground.

Select the Scale Tool button from the side tool box. mscale.jpg
Click and drag on the yellow box in the middle of the manipulator icon, scale up the entire sphere in three axes a little bigger. Click and drag on the green box to scale down the y axis smaller. This will give the sphere a volumetric squish when it impacts the ground.

(Hold down the Ctrl key while highlighting Translate Y, Scale Y in the Channel Box, they should appear black; this might already be done.) Use the right mouse key over the black area, choose Key Selected.



Set Keyframe 30:

Move the time line over to frame 1. (Yes frame 1)
Use the middle mouse key to slide the time slider over to frame 30, notice when you use the middle key the
animation does not move, this will let us set frame 30 the same as frame 1.

(Hold down the Ctrl key while highlighting Translate Y, Scale Y in the Channel Box, they should appear black; this might already be done.) Use the right mouse key over the black area, choose Key Selected.



Preview the animation:

Pick
the front view.

Hit the play arrow on the time slider. timesliderplay.jpg

Stop the playback by clicking the mouse on the red square over the play arrow.

You should notice a few problems with your animation. The ball squishes before it hits the ground. The motion is constant, it does not feel like a ball bouncing with the pull of gravity, we shall fix that.



Fix the ball from squishing before it hits the ground, set keyframe 14:
We will set it up so the ball does not squish between frames 1 and 14, right before it hits the ground.

Move the time line over to frame 1. (Yes frame 1)
Use the middle mouse key to slide the time slider over to frame 14.

Highlight Scale Y in the Channel Box. (Do not highlight Translate Y this time!) Use the right mouse key over the black area, choose Key Selected.

Preview the animation again.


Add the Feeling of Gravity and Edit the Graph Editor.

grapheditor.jpg

 

Pick the Sphere

Window->Animation Editors->Graph Editor...
Time is horizontal and value is vertical.

Use View->Frame All

Click and drag a box to highlight all the curves. They should appear white with yellow key frames.

Select Tangents->Flat to change the shape of the curves, notice the tangent handles are horizontal. This will give you an ease in, ease out feeling. (The curves were set to spline tangency by default.)      Play back the animation to see the results.



Fix the move in Y curve:
Highlight Translate Y over on the left of the Graph Editor, this will pick the sphere moving in Y channel only.


Click and drag a box over keyframe 15 in the middle of the curve.

Click the Break Tangents button. graphbreaktangents.jpg
This lets you move each tangent separate from each other.


Click and drag a box over the left tangent for keyframe 15,  (pick the keyframe first to see the tangent), use the middle mouse button to move the tangent until it looks like the diagram above.

Do the same for the right tangent.

Playback the animation, the ball should have a feeling of gravity, it speeds up as it falls.



Fix the scale curves:
Highlight Scale Y over on the left of the Graph Editor
Use View->Frame All

Click and drag a box over keyframe 30

Select the Move Tool button from the side tool box above. mmove.jpg  (Not in the graph editor)
Click the Time snap button gridsnap.jpg  on the Graph Editor.  You may need to make the graph editor window larger.

Hold down the shift  key while dragging keyframe 30 horizontally to keyframe 20.
This will make appear to snap back into shape quicker, less like a water balloon, more like a rubber ball



Type an expression to create volumetric squashing for the ball:

In the Channel Box:
Highlight Scale X, Choose Edit->Expressions... in the channel box menu.

Input the following under Expression:
         sx = 1/sy ;  sz = 1/sy

Click Create.


Render Your Animation to a TIFF Sequence
Maya Render Settings:

Open Window->Rendering Editors->Render Settings...
     Under Common tab
          Under Image File Output section
               Choose Frame/Animation Ext:   Name.#.ext
               Input a start and end frame value
               Input Frame Padding 4  (This keeps the files listed in order alphabetically.)
               Choose  Image Format:   Tiff
               Make sure to choose the right camera, especially if you added a new camera.
               Uncheck Alpha channel (mask)   (Unless needed.)

          Under the Resolution arrow:
               Choose Width 720 and Height 480  (or what you need)
               Check off Lock Device Aspect Ratio  (if you are outputting to video)
               Input Pixel Aspect ratio  .9  (DV video has tall thin pixels, the computer has square.)

     Under the Maya Software tab:
          Under the arrow Anti-aliasing Quality:
               Select Edge Anti Aliasing: Low Quality
        
      Low renders faster and is good enough for tests, use medium - highest for finals.

Click Close to close the Globals window.

Save your scene file,  start the render with Render->Batch Render.