Creating a Walk Cycle


In this section we will produce a walk cycle for Kila. First we will block in the basic motion; once this is in place, the animation can be easily tweaked and refined.

Since this is an in-game animation, it's best to exaggerate the movements slightly at the beginning. If they look "over the top" from the game camera, you can easily reduce the exaggeration using the Graph Editor.

Scene Preparation

We will start by preparing the scene, getting it ready for animation.

1.

Open the Kila_Final.mb file. (You don't need to use the Rest Pose file here because the walk cycle will not begin or end in it.)

Make sure you have a key set on frame 1, storing the file's base pose. Do this by selecting each character set (Character > Select Character Set Node), then right-clicking in the Channel Box and selecting Key All.

NOTE

Depending on how your game engine handles animation data, you may or may not need to store this base pose. When the character animation is exported, you may need the skeleton to be keyed in this bind pose at the beginning of each animation. It's best to discuss this with your team's technical artist or lead programmer to be sure.

2.

Go to Window > Settings/Preferences > Preferences and, as shown in Figure 16.11, select Keys in the Categories list.

Figure 16.11. Alter the default tangents in the Preferences window.


3.

Set both Default In Tangent and Default Out Tangent to Linear. Every new key you create will now have Linear tangents, which will initially be easier to work with. You can alter these tangents again later.

While you work on these steps, you will animate Kila physically moving forward; this will help you visualize how the walk is shaping up. You also need to see how the animation loops, as if she were walking in place. This is because, once the walk is complete, you will have to remove any forward motion, as the game engine will implement that for you.

TIP

Some animators prefer to go straight in and create the animation on the spot, without the forward motion. I find it useful to have both versions at hand just in case I need to generate an animated sequence in which the character must physically walk a distance. With the forward motion included, I don't have to try and put it back in, which can make the feet appear to slide if not done correctly.


To help us see both versions, we can parent a camera to a point at the character's feet. This means the camera will move with the character, giving the illusion of Kila walking in place. We can look through a different camera to see her actually moving along.

1.

Make sure you are still on frame 1, and create a new Locator (Create > Locator).

2.

Set the Kila_BaseSkel display layer so you can see the joints. Select them, and then select the main Root joint.

3.

Holding Shift+Ctrl/Cmd, select the locator and apply a point constraint just on the Y axis, making sure Maintain Offset is enabled. (If for some reason you can't see the locator, check the visibility in the panel's View menu. Or simply make the selections in the Outliner or Hypergraph.)

Now as Kila moves, the locator will follow but will stay locked to the floor.

4.

In the side view, position Kila so you can see her legs and waist in the center of the window.

5.

go to View > Select Camera. Holding Shift+Ctrl/Cmd, select the locator and parent the camera to it by pressing P.

6.

Now you need to set up the Time Slider to cover the time it will take Kila to perform a single cycle of her walk. Set the start frame back to 0, and the end frame at 32.

NOTE

When creating the walk, the first and last frames must be the same so that the animation loops. This will cause the animation to pause slightly when played, so remember this when you play it back, or create a playblast that only runs up to frame 31.

We use a power-of-two range (0 to 32) because it's then easier to divide the animation into stages. For example, the first and last poses of the walk are on frames 0 and 32; these key poses are known as "extremes." Halfway, we would place a new pose (when the legs cross over the opposite way) on frame 16; this is known as a "breakdown" or "passing position." We can then place additional poses called "in-betweens" on frames 8 and 24, before breaking down the animation further if we need to. With all the main keys evenly spaced, the animation will play at a steady pace throughout.


Now that we have a locator acting as a basepoint for the character, you can parent other cameras to it in order to see the character cycling from other angles. With the scene ready now, we can begin to animate.

Legs and Waist: Blocking Out Poses

The first step in creating any animation is to block out the main poses. These are the extremes, breakdowns, and any in-between poses needed. This not only gives you a good idea of how the timing feels as the character moves, but also how each pose looks.

Before you do anything else in Maya at this point, get out of your seat and walk around the room. Observe where your waist and feet are at certain stages in your walk. See how they rotate, what speed they move. When do your hips dip? If you are a male animating Kila, try to imitate a feminine walk. It's one thing to watch someone else walkingbut to physically do it yourself will give you insight for applying it to your character. Try to do this for all your animation work; don't be afraid of looking sillyin the long run, your animation will be better for it.

1.

Let's create our first extreme. With your own walk fresh in your mind, move along to frame 0, switch to the side view, and position Kila's feet to match the crossover point in the walk (Figure 16.12b).

Figure 16.12. From the side view, block in the basic leg poses.


Move the right foot up slightly and rotate it so it is tilted forward. Move the hips down and forward, too.

Set a key on the translate and rotate attributes for the icons of both feet and Root_Control.

Normally we would now place the second extreme on frame 32, then the breakdown at frame 16, and so on. However, since our character is moving forward, it makes sense to place each pose as we come to it in the timeline.

This will allow us to see where the hips and feet should be placed on the subsequent poses.

2.

Move along to frame 8 and create the second pose. Move the right foot forward until it is just about to plant itself, pose the left foot so it's just about to leave the floor, and move the hips forward, keeping them in between both feet at all times (Figure 16.12c).

Set a key to store this pose.

3.

Now we come to what would be the breakdown and the next crossover. Move along to frame 16 and try your best to replicate the pose on frame 0 (Figure 16.12d), but on the opposite feet. Set a key to store it.

4.

Now add the second in-between. The left foot needs to plant, so move to frame 24 and do your best to replicate the pose on frame 8, again on the opposite feet (Figure 16.12e).

TIP

An easy way to do this is to use the middle mouse button to go to frame 24. Line up one of the feet on top of the opposite one in the view, and set a key just on the one you moved. Left-click to move back to the reference frame, then repeat on the other foot and the root. The poses will be nearly identically mirrored in just a few seconds, with no guesswork.

5.

The pose in frame 32 (our second extreme) needs to be the same as frame 0 so that it can successfully cycle (Figure 16.12f). To quickly accomplish this, simply copy the keys from frame 0 to frame 32 and then adjust the Z translation.

Now we will clean up the Root_Controls keys a littleit's important to keep your animation clean, removing any unused keyframes.

1.

Select the Root_Control and open the Graph Editor.

2.

Delete all the keys, except the first and last ones on the Translate Z curve. You want its Z translation to be a continuous straight line, as it is in Figure 16.13. This will allow the character to move forward smoothly; any extra keys might cause her to pause as she steps.

Figure 16.13. Ensure that the Root_Control's Translate Z curve only has keys at either end.


3.

Removing these keys may mean you have to go back and tweak some of your poses, so go back and do that now before we continue.

From the side, the walk is shaping up nicely; but what about the front? As shown in Figure 16.14a, by switching to the front view we can see that her legs are too far apart. In a more feminine walk, the feet tend to cross in front of each other, almost as if she is walking on a tightrope.

Figure 16.14. Adjust the feet so her legs are not too far apart.


1.

Select the LeftFoot icon and, in the Graph Editor, highlight just its Translate X attribute (Figure 16.15, top).

Figure 16.15. Edit the Translate X keys to bring the feet in.


2.

Now select all the keys except the one that lies on frame 1, and move them down (Figure 16.15, bottom). This should also bring the foot in toward the center in the view panel, as seen in Figure 16.14b.

Move the keys down to about 0.138 and make a note of the value.

3.

Now apply this same technique to the RightFoot icon. Edit its Translate X attribute by moving the keys to a value of 0.138 (Figure 16.16, bottom). This brings the foot in the opposite way (refer back to Figure 16.14c).

Figure 16.16. Edit the Translate X keys to bring the feet in.


The problem we have now is that the feet will go through the legs as they pass by. We can fix this easily in the Graph Editor. We know that frames 0 and 32 are the same; these are the crossover frames for the right foot, so we need to edit both.

4.

Select frames 0 and 32 in the Graph Editor and move them both down, to a value of around 0.075. This should move the foot back out in the main view panel (Figure 16.14d).

5.

Select the LeftFoot icon and move its key to where the crossover exists (frame 16) out to around 0.075.

We have now blocked in the animation for the waist and legs. You may need to play the animation through, or create a playblast, to check how she looks from the side again before we proceed:

  • Altering the feet positions probably means the hips are now too low; if this is the case, select the Root_Control's Translate Y keys and move them up slightly.

  • Make other final adjustments to the basic poses and timing as needed, but keep the keys at the times already specified: frames 0, 8, 16, 24, and 32.

Legs and Waist: Refinement

With the poses established, we can now refine the basic animation, giving Kila a smooth and realistic walk cycle by adding extra keys and poses.

Moving along the timeline, the first thing we can work on is the way the feet plant after each step. At the moment, they don't spend enough time on the ground, giving the impression that she is floating along and has no weight.

1.

Working on the left foot first, move the keys set at frame 8 to frame 10. This will keep the foot grounded for longer.

You can use any method you like to move the keys: in the Graph Editor, in the Dope Sheet, or by simply highlighting them and moving them in the Time Slider.

2.

Move along to frame 32. Then select frame 28 with your middle mouse button and set a key at this frame. You've just copied the pose from frame 32, essentially moving the keys back. We need to keep the keys at frame 32 because it is the very end of the animation.

3.

To achieve the same results for the right foot, move the keys set at 16 back to 12 and move the keys at 24 up to 26.

Now that the feet have changed, you will also need to alter the hips. You want them to drop just as each foot plants on the floor and takes the weight.

1.

Select the Root_Control icon, and select just the Translate Y attribute in the Graph Editor. You will see the curve for the Y translation, as demonstrated in Figure 16.17a.

Figure 16.17. Adjusting the hips' Y translation


2.

We now want to offset the hips' dip so it happens when the foot plants. Select all the keys except for the one at frame 1, and move them along the timeline until the two lower keys, which currently lie on frames 8 and 24, lie on frames 15 and 31 (Figure 16.17b).

3.

You will now need to set new start and end keys, or the animation will not loop. Move along to frame 32 and set a key on just the Y translation. This will store its current value and maintain the curve's current shape.

4.

To create the seamless loop, you will copy this exact key to frame 0. Select frame 0 using the middle mouse button, and set another key on the Y translation.

5.

Clean up the curve by deleting any keys after frame 32 (Figure 16.17c).

6.

Flatten the tangents on the middle three keys only, by selecting them and clicking on the Flat Tangent button.

Your new curve should resemble that in Figure 16.17d.

We have now smoothed out the waist's animation, so let's do the same on the feet.

1.

Select the right foot. In the Graph Editor, flatten all the tangents by clicking on the Flat Tangent button (Figure 16.18, bottom). This will initially soften all the animation on the foot.

Figure 16.18. Flatten all the tangents on the right foot.


2.

Now select only Translate Y. As you can see in Figure 16.19, top, on frame 8 there is a key that breaks up the nice arc between frames 0 and 12. If you play the animation, you'll probably notice that this causes the foot to pause just before it is planted on the floor. We want to remove this so the foot can flow freely.

Figure 16.19. Remove the extra key in the Y translation.


Select the key at frame 8 and delete it, which will give you the cleaned-up curve in Figure 16.19, bottom.

3.

The same correction can be done on the Z translation, except that the key you want to remove lies on the very first and last frames. Instead of deleting this one, we simply select the keys and click on the Linear Tangent button, straightening out the curves so that they run in a more linear fashion (Figure 16.20).

Figure 16.20. Make the first and last keys' tangents linear.


4.

Now select the left foot and follow the same procedure. You want to remove the extra key from the Y translation. For the Z translation, this time the key we require is in the middle of the curve, meaning we can simply select it and delete it (Figure 16.21).

Figure 16.21. On the left foot, you can simply delete the extra key on the Z translation.


We still have work to do on the feet, but that should wait until after we work on the hips. We'll do these now because their positions could affect the feet's animation later on.

We are now going to add a bit of weight to Kila as she moves. To do this, we will shift her hips over the foot that is currently on the floor and taking all her weight.

1.

Switch to the front view first. While on frame 0, move the Root_Control over her left foot using just the X translation. Use a small value of around 0.015, this will also give her hips a subtle sway as she moves (Figure 16.22).

Figure 16.22. Move the Root_Control over her left foot.


When you're done, set a key on just the Translate X attribute.

2.

Now move to frame 16 and set the same value, but this time make it negative: 0.015. Then set another key.

3.

Set a key on frame 32; set this one to be the same as the original value, which was 0.015.

4.

Now look in the Graph Editor and make sure you have keys only on frames 0, 16, and 32 of the X translation. Remove any keys that lie in between.

5.

Finally, flatten all the tangents on the curve, to smooth out the sway of the hips.

Now we will give her a little wiggle as she walks, by animating the waist controller. The first thing we will alter is the amount of tilt on her hips. When one of her feet is placed on the floor, it's taking all the weight of her body, so her hips will tilt away from that leg.

1.

Starting on frame 0, rotate the Waist_Control around the Z axis until you reach a value of around 7. The hips should tilt like those in Figure 16.23, middle.

Figure 16.23. Tilt the hips around the Z axis.


2.

Set a key on just the Rotate Z attribute on both frames 0 and 32.

3.

Move along to frame 16 and set the Z rotation to 7, tilting her hips in the opposite direction (Figure 16.23, right). Set another key.

4.

Go to the Graph Editor and make all of the Rotate Z curve's tangents Flat to soften their movement.

When women walk, their hips' movement is in relation to the placement of their feet. The hip doesn't begin to tilt in the opposite direction until the foot has been placed, because it's the shift in weight that straightens the leg out; this then forces the hip to tilt away from it. We need to insert a few more keys to implement this detail.

5.

Move along to frame 11 in the Time Slider and set a key on the Rotate Z attribute. Follow that with another key placed at frame 27. You are adding keys here because these are the frames just before each foot plants.

6.

Now, using the Graph Editor, edit the keys so that the hips don't tilt immediately. Set the key at frame 11 to 1.7, and the key at frame 27 to 1.7.

As demonstrated in Figure 16.24, the hips will begin to gradually tilt until they reach frame 12, the point where the foot connects with the floor. Then they'll tilt more quickly before moving gradually again over toward the other foot.

Figure 16.24. Edit the Waist_Control's Z rotation to make the hips tilt correctly.


Now that we have the hips' tilt, we can implement a slight rotation to make the hips move forward with each leg.'

1.

Move along to the first frame where the right leg is about to plant; this should be around frame 10. Set the Waist_Control's Rotate Y attribute to 10, and set a key on it.

2.

Move along until the left leg is in the same position; this should be at frame 26. Set the Y rotation to 10 and set another key.

3.

Move along to frame 32, and set the Y rotation to 0 so that it's the same as on frame 0. Set another key.

Figure 16.25. Add rotation to the hips around the Y axis.


4.

Now open the Graph Editor so we can see the curve (Figure 16.26, top). You want the two middle keys to run smoothly, but because this animation loops you want to keep the first and last keys as they are. If their tangents were set to Smooth, it would cause the animation on the hips to pause as it reaches the end of the cycle.

Figure 16.26. Flatten the tangents on just the two middle keys.


So select the middle two keys and make their tangents Flat, producing a smoother curve like that in Figure 16.26, middle.

Finally, you need to make sure this curve loops correctly. Looking at its current path, the tangents are shallower at the beginning than they are at the endthe start and end keys need to be updated so the animation will run smoothly. Our animation's midpoint is at frame 16, but we offset the animation by two frames; so the new midpoint is 18.

5.

Move along to frame 18. With your middle mouse button, select frames 0 and 32 and set a key on the Rotate Y attribute. The curve is now correctly balanced, making for a better loop (Figure 16.26, bottom).

The majority of the hip work is complete. So we can now return to the feet and finish them. We'll use the Ball_Rotate control we added to the rig, so as each foot moves back, Kila will eventually end up on just the ball of her foot.

1.

Use the gridline as a floor marker, and move along the timeline until the left foot starts to prematurely leave the floor. This should be around frame 4.

2.

This marks where the ball of the foot should start to rotate, so move back to frame 3. Set a key on the Ball_Rotate attribute, storing the value of 0 on this frame.

3.

Now move along to where the foot does leave the floor; this should be at frame 10 (Figure 16.27, left). Set the Ball_Rotate attribute to 45, which will plant the ball of the foot back on the ground (Figure 16.27, right). Set a key.

Figure 16.27. Add animation to the Ball_Rotate attribute.


4.

Set the Ball_Rotate attribute back to 0 where the foot has fully left the floor, which should be around frame 16. Set a key here, too, effectively removing the rotation around the ball of the foot.

5.

Now repeat the procedure on the right foot. Set the Ball_Rotate attribute to 0 on frames 19 and 32, and then plant the ball of the foot on frame 26 with a value of -45.

6.

All that remains is to flatten the tangents on both Ball_Rotate attributes, to smooth out the animation.

Now you have all the basic keys in place for Kila's lower body. Go through the animation again, adjusting it in the Graph Editor until you are happy with the walking movement of her legs. Here are a few things to look out for:

  • It may be that the feet raise too high off the ground, making her look like she is walking in water. If need be, simply move the highest Y translation keys for the feet down slightly.

  • You may want to add a slight twist to the feet as they come forward. Do this by placing keys on the Z rotation of the feet.

  • You can also adjust the knee positions, pointing her knees inward as she walks.

Play through the lower body animation a few times, and maybe even generate a playblast to see how it runs in real time. Once you are completely happy with it, we will continue on to the torso.

Torso Animation

The animation in Kila's legs and hips will guide the movement of the rest of her body. To add movement to her torso, we only need to animate the main spine controls.

To make sure we have complete control over the animation, we will animate one attribute at a time, but to speed things up we can animate all three spine joints together, giving her back a smooth, gradual arc as it moves.

We will begin with the Rotate Y attribute, making her torso twist slightly with each step. As you walk, your upper body tends to mirror the lower body's actions. That is, when your right leg is out in front, it's the left arm that is in front. As the arm moves to the front, the torso twists, bringing the related shoulder out with the arm. This is the movement we will now add into Kila.

1.

Select all three spine controls. At frame 0, neither leg is out in front, so we will keep the torso's rotations at 0. This is the crossover point in the animation.

Set a key on the Y rotation on frames 0 and 32 on all spine controls. These frames need to hold the same pose.

2.

Move along the Time Slider until the right leg is as far forward as it can go; this should happen on frame 8.

Using just the Y rotation, twist the torso so that the left shoulder moves forward. Inputting a value of 2 directly into the Channel Box will affect all three spine controls and should be sufficient; we don't want the torso movement to be too dramatic. Set a key when you're finished with the rotation.

3.

Move along until the left leg is all the way forward; this should be on frame 24. Set a value of 2 in the Rotate Y attribute, and set another key.

NOTE

We use the same values on both sides so that Kila's walk is even. If one side moved more than the other, she might have a limp or some other unnatural movement. In some parts of the game this will be what you want; for instance, when she is injured.

4.

With all the main keys applied, go into the Graph Editor. Flatten the tangents on the new keys, but leave the first and last ones Linear. As you can see in Figure 16.28, you can work on all three attributes at once.

Figure 16.28. Animate the spine's Rotate Y attributes, then flatten the two central tangents.


Kila's torso will now twist slightly as she walks.

To help show the weight behind each step, we can use both the Z and X rotations to dip and tilt the upper body. As each foot plants on the ground, the hip tilts away from it; this also causes the body to tilt. Gravity and momentum then make the weight of her upper body dip slightly before catching up with the rest of the body.

NOTE

When you're creating a walk cycle, as a general rule the shoulders should tilt opposite to the hips. So when the left hip is raised, the left shoulder is dipped.


Let's implement the Z rotation first.

1.

You should still have all three spine controls selected; if not, select them all again and switch to the front view.

Unlike the Y rotation, the shoulders need to be tilted when the legs are at their crossover point, which is at frames 0, 16, and 32. On frame 0, set the Rotate Z attributes to 1.5, tilting the shoulders to her left, as seen in Figure 16.29b. Set a key to store this at frames 0 and 32.

Figure 16.29. Use the Z rotation to tilt the shoulders at frames 0, 16, and 32.


2.

You now want the shoulders to tilt to her right (Figure 16.29d), so move along to frame 16 and set a value of 1.5. Set a key.

3.

Finally, smooth the keys out in the Graph Editor by making all the tangents Flat (Figure 16.30).

Figure 16.30. Flatten the tangents on the Z rotations to smooth out the animations.


The final torso attribute to animate is the X rotation. Although this will give a forward dip to her walk, placement of these keys is different from the Z rotation. This is because the dip needs to start just after the foot has planted and then rise at the crossover point, before dipping again when the next foot goes down.

1.

Switch to the side view and, with all the spine controls selected once again, move to frame 0. As seen in Figure 16.31b, set the X rotation to 2, which should give a subtle dip. Set a key on frames 0, 16, and 32.

Figure 16.31. Implement the forward dip by animating the X rotation.


2.

Move along to frame 8 and set the Rotate X attribute to 0.7 (Figure 16.31d). In this instance we don't mirror the first value because that would cause her to bend too far backward. Set a key on frames 8 and 24.

3.

Flatten the tangents in the Graph Editor. Your curves should now resemble those in Figure 16.32.

Figure 16.32. Set all the X rotations' tangents to flat in the Graph Editor.


The torso area is complete. Looking at Kila's walk from the front, she sways quite a lot. This could work well for a character with real "attitude," but for Kila we want to calm this down a bit. We want her head to be almost stationary as her hips sway from side to side. We can fix this easily by animating the Rotate Z attribute on the main Root_Control. (If you like the attitude and want to keep the exaggerated sway, you can skip this step; or you could reduce the amount that we're going to edit the animation, to give her even less of a sway.)

1.

Switch to the front view and make sure you have the grid visible. As you can see in Figure 16.33a, on frame 0 Kila's head is over to the left of the main gridline. We want her head to stay more central to that line.

Figure 16.33. Use the Root_Contr1l to compensate for the movement in her upper body.


2.

Select the Root_Control, and rotate around the Z axis until her head lines up with the gridline (Figure 16.33b). Use the part in her hair as a guide.

3.

Now set keys on the Rotate Z attribute on frame 0 and frame 32.

4.

Move along to frame 16 (Figure 16.33c), and again rotate the Root_Control, this time backward so her head stays fixed to the line (Figure 16.33d). Set a key.

5.

Flatten all the tangents in the Graph Editor.

NOTE

You could, if you want a more precise movement, apply the same value to Root_Control's Rotate Z attribute in frames 0 and 16; just remember to make the one in frame 16 a negative number.


The torso movement is now complete. After the rest of the animation is applied, you can look at the character's walk as a whole, seeing how everything works together. At that stage you can play around with the keys for the torso until you get the animation just right.

Arm and Clavicle Animation

Animating the torso helped show us where the shoulders will be at specific times in the walk cycle. With those keys in place, we can begin work on her arms.

At present, Kila looks like she is shrugging her shoulders a little, so let's begin by animating the clavicle controls and reducing this shrug. Select both clavicle controls and move them down slightly, as shown in Figure 16.34 on the right. Then set a key on just the Y axis, on frames 0 and 32.

Figure 16.34. Lower the clavicle controls.


That could be all that's needed for the clavicles, but feel free to add some slight animation to the Z and Y translations to give the shoulders some movementa slight bounce with each step.

Now let's turn our attention to the arms. First prepare the scene by using the visibility controller to hide all the icons except for those on the left side. You will be working in both the side and perspective views, so in each one's View menu make only polygons and handles active. This will hide all the other icons we don't need at present.

In a basic walk cycle, the arms tend to mirror the legs' movement, so when the left leg is forward, the right arm is also. We're going to concentrate on creating a full swing of her left arm, using the FK controls. Employing forward kinematics will give a better simulation of a swinging arm because it's a rotational-based movement. If we used IK, the wrist would follow a linear path between each key set, which would be difficult to animate and would look unnatural in the end.

Because the animation starts at a crossover point, we will start this swing at frame 8, where Kila's right foot is forward, and end it at frame 24 where her right foot is behind her.

1.

Move along to frame 8. As demonstrated in Figures 16.35b and 16.35e, rotate just the left shoulder, moving it forward slightly. Then set a key on all the rotation attributes.

Figure 16.35. Start by rotating the shoulder at frames 8 and 24.


2.

Move on to frame 24. Here, rotate the shoulder again, moving it backward this time (Figures 16.35c and 16.35f). Set a key on the rotations.

The main swing is in place, so we can use the arm's pose in between these two keys, which is a crossover point, to define the first and last keys for the animation.

3.

Move to frame 16, which is the point of the second crossover. Click on frame 0 with your middle mouse button, and set a key on all the rotation attributes of the shoulder.

4.

Click on frame 32 with the middle mouse button and set another key here.

5.

Finally, go to the Graph Editor and flatten all the tangents on just the middle keys.

With the basic movement for the arm in place, next up are the elbow and wrist joints. If we key the elbow's rotation at frames 8 and 24, the elbow will appear rigid because it will move at exactly the same times as the shoulder. We want to offset the elbow animation, making the arm appear to move freely.

1.

Move along to frame 11, which is just after the shoulder has reached its first key. Rotate the elbow, just around the Y axis. This is demonstrated in Figure 16.36, left. Set a key on the Rotate Y attribute.

Figure 16.36. Pose the elbow at frames 11 and 27.


2.

Move to frame 27, and rotate the elbow back so that the arm is almost straight, as in Figure 16.36, right. Set another key on the Y rotation.

The basic swing is in, but we can no longer use frame 16 as our middle point of reference to help us on frames 0 and 32. Instead, we need to work out where the new middle pose will be.

3.

Count the number of frames between the last key created (at frame 27) and the final frame (frame 32). There are five.

4.

Now select frame 27 and move back five frames to frame 22. This is the frame where the elbow should be as it's rotating back.

5.

Use the middle mouse button to select frame 32, and set a key on the Y axis. Do the same on frame 0.

6.

Flatten the tangents on the two middle keys to smooth out the animation.

For the wrist, follow the same procedure as for the elbow, to give it a bit of swing.

1.

Start by moving along to frame 11; then pose and set a key on the hand (Figure 16.37, left).

Figure 16.37. Key the hand's pose at frames 11 and 27.


2.

Move on to frame 27, and pose and key the hand (Figure 16.37, right).

3.

Using the method we employed for the elbow, work out the frame for the middle pose that the hand should be in for frames 0 and 32. You should land on frame 22.

4.

With the middle mouse button, select frame 32, and set a key on all the hand's rotations. Do the same at frame 0.

5.

Flatten the tangents on both the middle keys.

The entire arm now swings nicely, but it moves a bit too freely. When our arms swing forward and backward, they pause slightly just before they change direction. We will now implement this into the shoulder; you can then apply the same procedure on the rest of the arm.

1.

Select the shoulder and open up the Graph Editor. As you can see in Figure 16.38a, the curves are nice and smooth.

Figure 16.38. Add extra keys to make the arm pause slightly before it changes direction in its swing.


2.

Move along to the first set of keys, which in this instance lie on frame 8. Hold down the middle mouse button, and move along the timeline to frame 12. Set a key on the shoulder; this will give us a pause of 4 frames (Figure 16.38b).

3.

Move along to the next set of keys at frame 24. Again holding the middle mouse button, move ahead another four frames and set a key (Figure 16.38c).

4.

The new keys' tangents are quite angular, so select them keys and flatten the tangents (Figure 16.38d).

The final things to alter are the start and end frames, which need to be updated to take into account the change in the curve. Our new last key was placed at frame 28, so that means there are four frames between that and the end frame 32.

5.

Move four frames back from frame 24; this is now where the arm ends its cycle. With the middle mouse button, click on frames 0 and 32 and set a key on both. This gives you the final curves seen in Figure 16.38e.

The shoulder will now pause slightly before it changes direction. Apply this arrangement to the elbow and hand animations.

The left arm now has motion, so follow the steps in this section again for the right arm.

When both arms are at this same stage, it will give you a better idea of how the animation feels as a whole, so create a playblast and spend some time tweaking things until you are happy with the results.

  • Try playing around with the timing of both arms so that they are not exactly symmetrical; this can add interest to the animation.

  • Try moving the keys back a frame or two, so the arms' animation happens slightly sooner.

That's it for the primary animation included in Kila. If you want, go ahead and add movement to her head, breasts, and even her hair. Stick to just simple animation for these parts; all they really need to have are slight bounces. Tweak the overall walk cycle, refining her movements until the walk is perfect.

Save the finished file as Kila_Walk.mb.

Creating a walk cycle for Grae is a little more difficult, because of his unusual leg conformation. The basic principles remain the same, but you may want to give him more vertical movement as his knees unbend. Also, his wings would move in the same pattern as his arms, but you may wish to give them even more sway to indicate their less-solid construction. Save the file as Grae_Walk.mb when you're happy with it.



    Game Character Development with Maya
    Game Character Development with Maya
    ISBN: 073571438X
    EAN: 2147483647
    Year: 2004
    Pages: 169
    Authors: Antony Ward

    flylib.com © 2008-2017.
    If you may any questions please contact us: flylib@qtcs.net