Maya Tutorial: Smart Keyframing Techniques

Being a jack of all trades in the world of design gives designers an extra edge, especially when courting clients. Not only does developing additional expertise in design increases a designer’s marketability, but also the process of learning a new skill is invigorating, stimulating and inspiring.

I recently decided to try my hand at animation. I’m already churning out characters and story ideas as I am reading the titillating first lesson in the HOW Design University and Sessions College course, Character Animation I. The course explores how to use Autodesk Maya to animate your 3D artwork for games or movies.

Equipped with this helpful course excerpt below, it’s time to crack some knuckles and start animating with these killer keyframing techniques.

Maya Tutorial: Keyframing Techniques

by Sessions College Instructor Greg Marlow

To explore how I’d approach any animation project, let’s revisit the familiar animation exercise of the bouncing ball. I know, you may have bounced balls before. But read this section through then follow along in Maya. What I would like you to think about is a creative, efficient way to achieve your goals.

These keyframing techniques will help you create the animation in this video:


As we work through the steps, keep in mind four important techniques for keeping your animation simple and clean:

Step 1: Plan Your Shot

It is essential to plan any shot before animating it. It is far easier to change your planning than it is to change an existing animation. This is very important!

Therefore, I’ll decide in advance that I would like to animate a ball falling from a few ball lengths up in the air and bouncing twice across the screen from left to right. Obviously, if the shot were more complicated I would have a much more detailed plan of attack for it.

Step 2: (How Not to Do It)

Now I could just sit down and animate this shot pose by pose. I could put the ball exactly where I want it on the first frame, hovering in the air on the left side of the screen. Then I could go forward a bit in the timeline and put in the first pose on the ground, the next pose in the air, and then the next pose on the ground, giving me something like this:


That sort of works. But I didn’t get it quite right. At frame 16 the ball is clearly not halfway between the poses at frames 8 and 24. The high point of a bounce should occur halfway between its two ground poses. My posing guesswork wasn’t quite accurate enough. Not to mention, look at all the keyframes I have created in the Graph Editor by moving the ball into these poses. Each time I moved the ball, it created corresponding keyframes for that new pose in the Graph Editor. Those keyframes are represented by black dots on the Translate curves in the Graph Editor image below:

Figure 1.004
The green Y channel is OK. That represents the up and down translation of the ball. But the blue Z channel, which represents the left to right translation of the ball, has all these extra keyframes on it that gum up the works. Not only do these keyframes cause the ball to have poor horizontal posing, but if we were to want to make any changes to this shot, those are extra keyframes that might get in the way of those changes.

The following image shows a few examples of what I mean by bad keyframing. Extra keyframes, like those in the three figures on the left, don’t contribute anything useful to the shape of the curve.
These problems are reasons why I recommend using a layered approach to animation. Let’s try Step 2 again.

Step 2: Layer In Each Part, Starting with the Base Motion

Start by animating the base channel—the main motion of your character—and layering in the other channels on top of that. This can keep your shot from getting needlessly complicated. Just animate one step at a time to simplify things.

Let me explain how this works. Let’s get rid of everything on the Y channel (the up/down motion) and just focus on the left to right motion of the ball. Over the course of the shot I want it to move from left to right, so I want it to have just the two keyframes for those poses:

Figure 1.005
Next, I’ll layer in just the up and down motion of the ball. I want to make sure it only sets keyframes on the Y channel. I can do this by turning on Autokey and using just the green translate arrow (remember, use the W key to turn on the Move tool to translate) to move the ball. This will ensure that only the Y channel is moving, so only that channel will be auto-keyed. If you don’t like Autokey, you can right-click on the Y channel in the channel box and choose Key Selected. This will key just that channel for each keyframe.

A bouncing object will lose energy over time, so this ball should lose height (energy) on its second bounce:


Next, up comes our rotation. I added some color to the ball to clarify how the ball rotates. I also decided to have the ball rotate about a third of the way around at each pose, though I could have chosen any speed. Again, I only have two keyframes for the channel: one at the beginning and one at the end.

(If you don’t see the color in the Maya file you downloaded, press the 6 key to enter Texture Shaded mode.)


Next, comes the squash and stretch of the ball, which is by far the most complicated part of a bouncing ball exercise.

The easiest way to animate squash and stretch is to animate all three channels at the same time. See the side-by-side squash and stretch animation and scale curves in the image below. This squash and stretch are very exaggerated. My ball squishes much more than an actual ball would squish. But then again, real balls are much less interesting than squishy animated balls:

Here are a few important rules for squash and stretch:

  • The ball will stretch as it’s flying through the air and squash on the contact pose with the ground.
  • Notice that the ball will not start squashing until it hits the ground. It continues stretching until it hits a force (the ground) that causes it to squash.
  • The squash and stretch action around the contact pose happens very fast. In this case, there are no in-betweens. You get more of a sense of the squash than a clear view of it actually happening.
  • The ball squashes from the bottom, not its center point.
  • At the height of the bounce, the ball returns to its normal scale.
  • The ball will always maintain its volume. This is perhaps the most important point of all. If you are scaling down on one axis, you must scale out on the other axes to maintain the volume of the ball. Otherwise, it will look like it’s shrinking and growing, instead of squashing and stretching.

I actually made more changes to this shot than just the squash and stretch. I also adjusted the rotation for each pose so that the frame just before the contact pose is leaning back and the frame just after the contact pose is leaning forward. This makes the ball follow a nice path through the air, which looks much better than a random rotation.

I’d like to make a big point of the fact that you can’t follow all these rules just by animating a single control in Maya. Since the ball has to squash from the bottom and rotate from the middle, it must have two different axes about which to work.

You’ll want to select the ball geometry in order to do all rotations. Press the up arrow key to change your selection to the node that controls movement and scaling.

Step 3: Avoid Excess Keyframes

At this point, I would want to check back to make sure I had no extra keyframes. In this case, I’ve been using a layered approach with the smart keyframing techniques I outlined earlier, so I know I have no extra keyframes. So I get to skip this step!

In your case, you should look at each of the channels on both the Rotate control and the Move-Scale control in the Graph Editor. One by one go through each channel and look for unnecessary extra keyframes. Refer back to the messy keyframes example above for help on what you should be looking for. Make sure you only have keyframes in places where a change is happening in the animation curve. On more complicated shots, you will definitely end up with far more keyframes and that is OK. There is nothing wrong with a lot of keyframes if they are necessary to the animation.

Step 4: Use Interpolation to Improve the Shot

The final step is to be aware of the interpolation (the way Maya handles the frames between two keyframes) and use what works best for the shot. What we have in place right now for the up and down motion of the ball doesn’t make the ball “hit” the ground as if gravity is affecting it. It just floats between poses. So I adjusted the interpolation to make the ball really smack the ground and snap up off the ground. Look at the sharp points I made by adjusting the handles in the graph below.

Remember: To move a handle in a graph, you can click it then use a middle mouse drag. To get a sharp point like mine, select the point and click the Break Tangents button . Now you can adjust the two handles separately and make a sharp point.

Another neat little trick is to extend the hover of the ball. This calls for a new Graph Editor technique. So far we’ve just been adjusting the angle of the tangent handles that control how curves come in and out of keyframes. But we can also adjust the length of those tangent handles too. This allows us to have finer control on how big or small the ease, or softness, around a keyframe should be.

Here, I converted the hover keyframes to weighted tangents (Curves > Weighted Tangents in the Graph Editor menu bar), and freed their weights (Tangents > Free Tangent Weight or Keys > Free Tangent Weight in some previous version of Maya). Once the tangents have been converted in this manner, you can easily select a tangent and MMB move it to drag its length larger or smaller. Here, I extended the width of the “hover” tangents to make the ball extra lively with a bit of a hold in the air:


And now, the completed animation using the techniques described above:

Adding that Extra Finesse

Not all bouncing balls are created equal. Some like to bounce like maniacs off the walls. Some like to float like a balloon. And some like to fall really hard and break your toe. A bowling ball will hardly squash at all but a bag of Jell-O will squash a great deal. Though neither of those balls will bounce very high.

All bouncing balls will lose energy with each bounce, with the height slowly decreasing and the distance and the number of frames between each contact pose also decreasing. But a really bouncy ball will take much longer to reach this point than a bowling ball, which might have a couple of big bounces that deaden quickly into a few tiny little fast bounces before stopping and rolling off a bit.

Think about what sort of ball you have before you try animating it. What is your ball’s motivation? Better yet, find a ball and observe its bouncing action for yourself!

Gain more advanced level character animation skills by enrolling in the Character Animation I course.