Creating Your First 3D Animation in Maya: A Ball Bounce

There is one animation that every beginner must master before ever moving on to more complex animations: The ball bounce. The same techniques and principles that are applied to a ball bounce can be incorporated into any other animation no matter how complex. The ball bounce is the foundation for all other animations, so it's extremely important that you know how to properly animate a ball bounce. In this article you will learn step-by-step how to create a believable ball bounce in Maya (if you're not using Maya, there are still plenty of tips and techniques to use in your software of choice). Setting up the scene Animation_Preferences_Example To get started the first thing you will want to do is open up your Animation Preferences located at the bottom right of Maya.   Timslider_Playback_Example Once opened make sure that you have the Time Slider selected under the categories panel. Under Playback make sure your Playback speed is set to Real-time [24 fps]. After you've done that, go to animation preferences in the Settings of the Categories panel.   Autokey_Example Make sure that the Auto key box is checked, this makes it so any changes you make to ball will be automatically keyframed. Under Tangents check the Weighted Tangents box, and change the default in and out tangents to Flat. Once that is done click the Save button.   Timeslider_Frame_Example There is one last thing to do before you're ready to start animating, and that is to change the range of the Time Slider. So go to the box at the end of the slider, and put in a value of 110. This will make it so you have 110 frames to work with.   Starting the animation With your scene set up, now you need a ball to animate with! But you don't need a complex rig. For this animation all we need to do is drop a simple polygon sphere into the scene.   Ball_Color_Example You can go ahead and select all the middle faces of the sphere and add a different color to it. It will add more clarity and make each bounce easier to see. Or you can download the scene file for this tutorial here. Now you can start the animation.   Ball_1st_POS_Example Click on the Time Slider, and drag it until it's on frame 1. Select the ball and translate it up in the Y axis, set it to a value of 38. This is going to be the height of where the ball drops from. Now with the ball still selected, press the "S" key. This sets a keyframe for all the attributes on the ball. You will notice that the attributes in the channel box have been changed to red. This indicates there is a keyframe set for them. Since you enabled Autokey in the Animation Preferences, this is the only time you will need to press "S" to set a keyframe. Any adjustments that you do to the ball from here on will be automatically keyframed.   Ball_2nd_POS_Example You are going to need to add the rest of the keyframes for the animation. Go to frame 9 on your Time Slider, and change the Translate Y value to 0. The value of 0 represents the value of when the ball hits the ground.   Ball_3rd_POS_Example Now go to frame 17 and move the ball up in space again with the Translate Y attribute. Set a value around 31. The reason you changed this value to 31 instead of 38 is because the height of each bounce needs to gradually become lower. Now go to frame 24 on the timeline and enter in a value of 0 for Translate Y. You can start to see what's happening, you are creating the actual bounces for the ball. Let's continue this procedure for the rest of the bounces. Go to frame 32 on the Time Slider and set the value of Translate Y to 25. Now go to frame 39 and set a value of 0. Go to frame 45 and set the Translate Y value to 19, then go to frame 51 and set the Translate Y value to 0. Next go to frame 56 and set the Translate Y value to 13.5, then go to frame 61 and set the Translate Y value to 0. Now go to frame 65 and set the Translate Y value to 9, and on frame 69 set the Translate Y value to 0. Go to frame 71 and set the Translate Y value to 6, and on frame 75 set the Translate Y value to 0. Now go to frame 77 and set the Translate Y value to 4.5, and on frame 79 set the Translate Y value back to 0. Go to frame 81 and set the Translate Y value to 2.5, and on frame 83 set the value to 0. Now go to frame 85 and set the value to 1.5, and set it to 0 on frame 87. You can see that the Translate Y value is gradually getting smaller! So you're almost done setting the keyframes! Go to frame 88 and set the value to 0.5 and on frame 89 set the value back to 0. Now you've finished creating all the bounces for the ball! At this point, your animation should look like this:   If your animation doesn't look like the video above, go back and double-check your values for each frame with a key on it. For reference here are the frame numbers, and the values that you set for each one. Compare this to your animation to make sure it's correct.
  • Frame 1 Translate Y value = 38
  • Frame 9 Translate Y value = 0
  • Frame 17 Translate Y value = 17
  • Frame 25 Translate Y value = 0
  • Frame 32 Translate Y value = 25
  • Frame 39 Translate Y value = 0
  • Frame 45 Translate Y value = 19
  • Frame 51 Translate Y value = 0
  • Frame 56 Translate Y value = 13
  • Frame 61 Translate Y value = 0
  • Frame 65 Translate Y value = 9
  • Frame 69 Translate Y value = 0
  • Frame 71 Translate Y value = 6
  • Frame 75 Translate Y value = 0
  • Frame 77 Translate Y value = 4.5
  • Frame 79 Translate Y value = 0
  • Frame 81 Translate Y value = 2.5
  • Frame 83 Translate Y value = 0
  • Frame 85 Translate Y value = 1.5
  • Frame 87 Translate Y value = 0
  • Frame 88 Translate Y value = 0.5
  • Frame 89 Translate Y value = 0
  Refining the bounces in the Graph Editor After you've created all the bounces, play the animation and see how it's looking. The ball is moving up and down right? Like a ball bounce should, but it doesn't really feel like a bounce. In a real ball bounce, as the ball drops gravity starts to take over and it falls faster. So to get this same effect in your animation you need to adjust the spacing for each bounce. To do this you need to use the Graph Editor. For this article we aren't going to go into detail about the features of the Graph Editor. In fact the Graph Editor is so important we've created an article covering all the different tools which you can read here.   GraphEditor_Destination_Example With the ball selected go to Window>Animation Editors>Graph Editor to open it up. The first thing you need to do is select the Translate Y curve which is located in the Graph Editor outliner on the left hand side.   Graph_Bounce_Example Your curve should resemble what you see in the example image, looking similar to a wave pattern. For the ball bounce to feel like a real ball bounce we will need to adjust these curves. The first thing that you need to do is marquee select the entire curve, and free the tangent weights. This is located in the toolbar, as shown in this screenshot.   Free_Tangent_Example   Widen_Tangent_Example After you've done that, select the first keyframe on the curve. All the keyframes are represented as black dots on the curve. You will notice a purple line extending out in both directions. These are called tangent handles, and this is what you need to manipulate to adjust the spacing. Select one half of the tangent handle on the first keyframe and while holding down Shift+MMB drag to the right. This widens the curve.   Shrink_Tangent_Example Now go to the next keyframe on frame 9. And this time select the right side of the handle and Shift+LMB drag to the left until the tangent handle is barely visible.   Final_Ball_Graph Repeat this procedure for the rest of the keyframes. The high points of the bounces should have a tangent handle that is very wide, and tangent handles on the keyframes where the ball hits the ground should be brought inward like before. This creates a nice rounded arc for each bounce. Once you've finished your curve should look the screenshot.   When all the tangent handles are adjusted take a look at your animation. Now this looks like an actual ball bounce! When the ball reaches the top of each bounce it hangs there for a moment. This happens when you widen the tangent handles, creating tighter spacing at the top of the arc. As it drops it starts to fall faster, that happens because you shortened the tangent handle for the impact frames. Take a moment to admire your handy work!