In this exercise, you animate a walk cycle without the aid of Inverse Kinematics or locks. Many animators consider this method to be the long way around, but its kind of a fail-safe technique; it should work with almost all packages.
This cycle is timed at 16 frames per step32 for the whole cycle. At video rates, thats just over one second per cycle. Film animators can reduce this to 12 frames per step. Youre doing this example with a simple skeleton, but the techniques should transfer well to any two legged character. The ability to lock your characters feet to the ground is important, but not necessary, as Ill explain along the way.
To begin, load up your character and hierarchical skeleton in your favorite 3D animation program. Create an animation thats 33 frames long. Ive added the extra frame to the end simply as a target for frames in the second half of the cycle. It will not be rendered.
Start by animating the hips and shoulders, because all other motions derive from the hips. The hips have two separate, overlapping rotations that are mirrored by the shoulders. The first rotation is along the vertical axis of the spine and follows the position of the legs and feet.
Start the walk with the right foot; the right hip must go forward as well. On frame 1 of the animation, rotate the hips around the Y axis so that the right side is forward. From the top view, rotate the shoulders along to mirror this rotation (Figure 1).
Next, go to the halfway point (frame 17) in the cycle and rotate the hips and shoulders in the opposite direction. Remember, they should still be mirroring each other (Figure 2).
Go to one frame past the end of the cycle (frame 33), and copy the first frames keys here. This frame is a target for the frames in-betweened on the second half of the cycle.
Next you have to create the sway of the hips. Go to the frame in the middle of the first step (frame 9). If your rotations are correct, the hips and shoulders should be parallel when viewed from the top.
At this point, the passing position, or the highest leg extension, the body rests on the left leg and the right leg pulls the hips out of center.
From the front view, rotate the hips around the Z axis so that the right hip is higher. Adjust the spine and shoulders so you get a smooth line of action and the shoulders mirror the hips (Figure 3).
Go to the middle frame of the second step (frame 25) and reverse the rotations that you just made at the middle of the first step. The body will rest on the left leg at this point, and the spine will curve in the opposite direction.
Next, adjust the spine on the first frame to give it a forward lean and a nice curve (Figure 4).
Finally, go back to each keyframe and adjust the legs and arms so that they hang vertically throughout the cycle. Play the cycle back. If it looks smooth and balanced, move on to the next step. Otherwise, tweak the keyframes until you have a nice smooth motion.
You now have to move the legs and feetthe trickiest part of the process. First, set up the extreme poses. From a side view, go to frame 1 and set the first pose, where the legs are at maximum extension. Copy these keys to the end of the cycle, at frame 33.
Next, go to the middle of the cycle (frame 17) and mirror frame one so that the left leg is forward. A ghosting feature would help considerably in this process.
To aid in the animation process, well use a guide to help position the feet. If you are using locks, you probably wont have to do this step; if you in-between the foot linearly at the two extremes (with no slow-ins or slow-outs), the foot will move across the floor automatically. Still, a guide acts as a nice double-check.
To create the guide, model a box and place it directly beneath the floor near the characters forward foot. If its below the floor, it wont show up at rendering time. You can also use a null object (Figure 5).
Go to frame 1 and move the guide hor-izontally to the place where the toe hits the ground. Next, go to the middle of the cycle (frame 17) and position the guide at the exact same place on the toe as in frame 1 (Figure 6).
Set up the guide so that it in-betweens these two positions at a linear rate. The guide will tell you exactly where the toe should be at any point in the step. (If you have an IK system, you can pin the foot to the guide for a sure-fire solution.)
Now you must tweak the poses. Because you know where the feet have to be, you can concentrate on the legs. About a quarter of the way through the first step (frame 5) is the recoil positionwhere the leg absorbs the shock and bends to its lowest point. Move the hips down so that the shin is forced to rotate forward a bit, giving the knee a nice bend.
Next, the body recoils upward into the passing position. Move the hips up so that the leg is fairly well extended. Its very important to keep the knee bent slightly to make the action look natural. At this point, the weight of the body is on the ball of the foot. The heel lifts off the floor as the body falls forward. The hips are moving down at this point. There may also be problems with the free foot as it swings forward; if you have extra-big shoes, theyll hit the floor unless you bend the toes slightly.
The first step is now complete. Create a second guide and repeat these procedures for the left foot on the second half of the cycle. Be careful to make the second half as close to the first as possible. Render a test and go back to tweak any inconsistencies.
Now you need to create the motion of the arms and head. In the simplest case, the arms swing back and forth to maintain balance in opposition to the legs. The arms also drag behind the action a bit, placing the arms extreme poses a few frames behind the legs. Rotate the arms into the position on the first frame. Because the right leg is for-ward, the right arm is back, and the left arm is forward. This is not an extreme pose, but it is close.
Next, go two to five frames in to view the arms extreme pose (I chose frame five). I rotated the left forearm back to a nice extension and the right forearm up slightly. Now go two to five frames past the start of the second step and mirror the extreme from the previous step. Finally, copy the keys on frame 1 to the last frame, so the arm will swing through to the end of the cycle.
Now you need to depict the head. Go to the keys at the start and halfway through each step and rotate the head so it remains fairly vertical and the eyes are facing forward. The head can bob from side to side a bit, as long as its not too distracting.
Now that you have a convincing cycle, get your character off of the treadmill and out into the world. For this, you can do one of two things: either move the character along the ground, or move the ground under the character. Moving the ground is best when you want to use a panning camera that is locked to the character; because the character is still, the camera can remain still. Moving the character is best in cases when you want the camera stable and the character to walk past.
In this example, move the ground. If you used a guide to assist in your animation, the task is simple. Find the absolute position of your first guide on frame 1, then again when it stops in the middle of the cycle. In my shot, for example, the guide moves along the X axis. The first position of the guide along X is 300 units. At frame 17, the guide is at 100 units; the characters foot moves a total of 200 units per step (300 minus 100 equals 200.) This figure is also known as the <stride length>. Doubling it equals 400 units for the total cycle. On the first frame, move the floor to the starting position. On the last frame (frame 33) move the floor 400 units along the X axis. In-between these frames linearly.
Thats it. The shot is complete.