Today we're going to look at some practical methods for character animation. In 1987 (the year after Luxo Jr., 8 years before Toy Story), John Lasseter spoke at Siggraph1 about the Principles of Traditional Animation Applied to 3D Computer Animation. The notes from this talk, which are available on-line2, describe how the principles that were developed by Disney in the 1930s to make animation more realistic and entertaining should be applied to computer animation:
Squash and Stretch - defining the rigidity and mass of an object by distorting its shape during an action
Timing and Motion - spacing actions to define the weight and size of objects and the personality of characters
Anticipation - the preparation for an action
Staging - presenting an idea so that it is unmistakably clear
Follow Through and Overlapping Action - the termination of an action and establishing its relationship to the next action
Straight Ahead Action and Pose-to-Pose Action - The two contrasting approaches to the creation of movement
Slow In and Out - the spacing of the in-between frames to achieve subtlety of timing and movement
Arcs - the visual path of action for natural movement
Exaggeration - Accentuating the essence of an idea via the design and the action
Secondary Action - the action of an object resulting from another action
Appeal - creating a design or an action that the audience enjoys watching
I am not going to talk about all of these today: partly because I don't have time, and partly because they are more suited to discussion in other classes. The principles are described in great detail in The Illusion of Life by Frank Thomas and Ollie Johnston3, a book which is a very important animation resource and with which you should familiarize yourselves. The on-line notes from John Lasseter's talk goes into detail about using these principles in computer animation: today, however, I'm just going to talk about the practicalities of employing a couple of these principles in Maya.
I shall talk about this only briefly, as I have mentioned it several times before. Suffice to say that by far the best way to apply squash and stretch is to use deformers: either a lattice or a squash deformer. A squash deformer is fine if your squash / stretch is fairly straight-forward, but otherwise it's probably best to use a lattice. Have a go at a couple of quick examples. First load the following scene:
This contains some very simple animation of a ball bouncing. Try adding some squash and stretch to it using a
squash nonlinear deformer: use a small amount of deformation if you want a realistic look, or more if you want a more cartoon-like appearance.
Now try the same on the following scene:
Try and make it look like the ball is braking to a standstill. For this one, a simple squash deformer will not suffice: you will have to use a lattice. You should try in this example to also use secondary action: another item from the above list. When the ball stops, it needs to go beyond the final position before going back to it, otherwise the action looks very false. Nothing in the real world ever stops completely dead: there is always some bounce-back, no matter how tiny.
When animating a character, there are two distinct ways to animate. As I describe the two methods, remember that these have come straight from drawn animation and have been adapted to the world of computer animation:
In straight ahead animation, the animator starts with the first drawing / frame, and animates the scene from start to finish. Each action is animated in the order that it is carried out, and thus one animator will do most of the work.
In pose-to-pose animation, the animator plans the scene carefully, and then positions the character in each of the key poses of the scene first. In traditional animation, the lead animator will usually draw only the key poses, and then pass the scene on to an assistant to do the inbetweens.
Pose-to-pose is the most common method used in the animation industry, but both have their advantages and disadvantages. The spontaneity of straight ahead action allows for more creativity in the resulting animation; pose-to-pose animations tend to be easier to follow. The two methods are often combined to some extent.
Let's look at some practicalities of this. Open up the scene:
First, we're going to look at ways to use the same pose twice. Let make Tarquin touch his toes. The first thing we have to do is to key him in his initial position. Select the character set (little down arrow, near the bottom right), and press
s. This will key all of the controls (except for the ones that I've forgotten to put in the character set) at their default position at frame 0. Now move to frame 10, and move Tarquin into a touching toes pose. Remember, when using pose-to-pose techniques for real, these first poses are the most important in the scene: it is important to get them just right. Be sure to press
s regularly in order to save the keyframe.
Once you have done this, scrub the timeline. You'll see that the computer will add inbetweens automatically, but badly. In order to stop it doing this, we want to make all of the animation curves stepped. This means that instead of being a smooth animation, we will end up simply with a series of keyframes. To do this, double-click the timeline. This selects the whole area of the timeline, turning it red (we will learn how to select individual bits of the timeline by later on). Now RMB click the red timeline, and go to
Tangents → Stepped. You'll see that now we don't see any inbetweening as we move along the timeline, just one keyframe followed immediately by the next one.
Now we'll look at how to use the same keyframe twice. Say we want to put the standing straight keyframe at frame 20 (which makes sense), followed by the touching toes one again at 30, then standing straight at 40. Scrub back to frame 0, where we have the standing position. Now MMB-drag on the timeline to frame 20. You'll notice that Tarquin doesn't move, when he would have done if we had scrubbed the timeline normally. Once you have dragged to frame 20, press
s to set a keyframe there. You can now scrub the timeline normally, with your new keyframe at frame 20.
Maybe we want to move one of the keyframes that we can see on the timeline. Remember that the keys that show as vertical red lines in the timeline are either the keys on the current character set, or, if none are selected, the keys on the currently selected object. Shift-drag the area of the timeline with the key in it, and you will see four little black arrows. Dragging on the middle two moves the piece of animation around, whereas dragging the two at the ends scales the animation to make it faster or slower. Thus the timeline can act as a mini dopesheet.
In order to get the inbetweens looking right, there are three choices. Either:
Copy the initial key to the desired position, and modify it (we know how to do this).
Copy the final key to the desired position, and modify it (we know how to do this too).
Take an average of the two keys, and modify it (we will try this now).
Select the previous and subsequent keyframes in the timeline by shift-dragging. Right-click on the red area, and go to
Tangents → Spline. This will temporarily switch all of the tangents in this area to spline. Now drag to the frame that's nearest to the pose you want, and press
s. Now select the whole timeline again and go back to stepped tangent mode.
It is obviously possible to work in spline mode all the time, but the final outcome of the animation tends to be better if poses are initially placed using stepped mode, and splines introduced at the very end of the animation process.
Now try an action of your own (I did tying the shoelaces to begin with, but you could do throwing a ball or pulling a rope or whatever you want). Go through and put in the key poses, then add to them. Going in to this level of detail before switching over to splines makes fine adjustments in the graph editor much more bearable.
1LASSETER, J., 1987, Principles of Traditional Animation Applied to 3D Computer Animation, Computer Graphics, 21 (4), 35-44 (SIGGRAPH 87).
3THOMAS, F. AND JOHNSTON, O., 1981. The Illusion of Life. New York: Hyperion.