Chapter 9. Character Studio and IK Animation

At one time or another, almost everyone in the 3D community will want to animate a character, and this chapter examines the 3ds Max toolset that aids the process of character animation. In this chapter, you will learn about the two components that make up Character Studio, the full-featured package for animating bipedal characters, including humans, aliens, robots, and anything else that walks on two feet. Although Character Studio (CS) creates an instant structure for a character, you will also work with Inverse Kinematics (IK), which individually creates structures for animating linked objects.

Character animation is a broad and complex field that everyone would like to experiment with at some point. This chapter introduces you to the basics of using Character Studio and Bones. Further investigation into these tools is a must if you want your character movements to be accurate and realistic.

Topics in this chapter include:

  • Character Animation

  • Character Studio Workflow

  • Creating a Biped

  • Animating a Biped

  • Associating a Biped to a Character

  • Using Inverse Kinematics

Character Animation

The character animation CG specialty is one of the easiest to learn, but one of the toughest to master. It takes a special kind of eye and insight to become an amazing animator. In one word, good character animation comes down to nuance. Because humans are animated (i.e., we move around) and surrounded by other people who move, we are innately critical when a character is not animated well. That is because we are so used to seeing detail and nuance in movement that it is a foregone conclusion to us. We never really think twice when we see a real person lean in a special way when they limp. However, we notice when that nuance is missing in an animation of a person limping. As observers, we may not know exactly what is missing, but we instinctively know that something is wrong and it looks funny.

When you character animate, you have to have a keen eye for detail and an understanding of how proportions move on a person's body. Setting up a CG character to walk exactly like a human being is amazingly complicated. You must account for muscles, bone structures, and a host of other details that most 3D software does not begin to address.

However, good animation for a character is actually not that difficult right out of the box. Character systems such as Character Studio make it a breeze to set up characters and have them in a walk cycle very quickly. Don't limit your character animation studies to Character Studio. While learning and mastering how CS works and how to animate with it, you mustn't lose sight of the fact that you are trying to learn how to animate as opposed to learning how to run a piece of software.

In other words, once you gain a solid grasp of how CS and other character tools work, use them to learn how to really animate. Character Studio is just a means to an end. You're here to learn to animate, not to learn how to run CS. Now that we got that out of the way, we can concentrate on getting you comfortable with CS. Have fun!

Character Studio Workflow

Character Studio is a system built into 3ds Max to help automate the creation and animation of a character, although not necessarily just a biped (two-footed creature). Character Studio comprises three basic components: the Biped system, the Physique modifier, and the Crowd system. Biped and Physique are used to pose and animate a single character, and the Crowd utility is used to assign similar movements and behaviors to multiple objects in your 3ds Max scene. This chapter covers the Biped and Physique features, but Crowd is beyond the scope of this book.

The first step in the Character Studio workflow is to build or acquire a suitable character model. The model should be bipedal, meaning it stands on two feet. In the future, however, you needn't limit yourself to strictly humanoid models; CS is perfectly useful for animating anything from a human to a dinosaur to a bumble bee. If the model's configuration allows it, the model should be in the reference position or "da Vinci pose" with the feet shoulder width apart and the arms extended to the sides with the palms down, as shown in Figure 9.1. This allows the animator to observe all of the model's features, unobstructed by the model itself, in at least two viewports.

Again, the term bipedal refers to an animal or character with two feet. In 3ds Max, a biped is a predefined, initially humanoid, structure used to define the movements of your character. It is important to understand that you animate the biped that is associated with your model and not the model itself. The biped structure drives the model, and using the Physique modifier ensures that your model follows the biped animation. You will work with attaching a model to a biped later in this chapter.

Physique versus Skin

3ds Max has two modifiers that essentially do the same thing. Physique and Skin can both be used to transfer the movement of a skeletal system to a mesh, making the character move with the skeleton rig. Of the two, Physique is the older modifier and Skin is the more current. Historically, Character Studio, which included Physique, was developed by Unreal Pictures and was the first major plug-in for 3ds Max. Character Studio was sold as a separate program in the product's first releases.

Over time, users requested a program similar to Physique be included as part of the base 3ds Max package. Autodesk developed the Skin modifier to satisfy the customers' need for this functionality. When CS was finally included free of charge with 3ds Max, Physique was still bundled with it, and so there were two modifiers to do the same task. Over time, Skin has had numerous improvements that add to its capabilities, while Physique has more or less remained the same. You can choose which one you want to learn; they both can accomplish the same work. Some users swear by Physique, others swear at it—and the same goes for Skin. Physique is covered in this chapter.

The default biped, shown in Figure 9.2, consists of legs, feet, toes, arms, hands, fingers, pelvis, spine, neck, and head. After your model is ready, you will create a biped and, using its parameters and the Scale transform, fit the biped closely to the model. The better the biped to model relationship, the easier the animation will be.

A bipedal character in the reference position

Figure 9.1. A bipedal character in the reference position

The default biped

Figure 9.2. The default biped

After the biped is fit snugly to the model, you will select all of the components of the model, not the biped, and apply the Physique or Skin modifier in a process often referred to as skinning. The Physique modifier dictates which object, the pelvis of the biped usually, the model is applied to and it is the node where modifications to the skin are accessed. It may take a while to properly test and refine the relationship between the model and the biped to get it to an acceptable level.

The final step will be to animate your character. You can accomplish this by using a combination of adding walk, run, and jump cycles to the biped, applying freeform animation, and refining the animation keys in the Dope Sheet. Don't expect the default walk, run, and jump cycles to create realistic motion. They are just a starting point and must be tweaked to achieve acceptable movements. Character animation is about nuance and subtlety, and those artistic touches take a significant amount of time and effort to master.

The best way to start is to jump in and examine the tools available. In the next section, you will work with a biped and adjust the parameters and components to modify it.

Creating a Biped

As stated previously, you should create your model first and then create and modify your biped to fit the model. In this section, however, you are going to examine the procedure for creating and modifying a biped first to provide an understanding of its capabilities. Later in this chapter, we will revisit the methods for adjusting your biped specifically to match a model.

Placing a Biped in a Scene

Let's create a Biped system for your scene to get a feel for how CS works. Unlike many of the objects that you've created so far, Biped is located under the Systems category the Create tab of the Command panel rather than the Geometry button.

Placing a Biped in a Scene

Follow these steps to create and adjust a biped:

  1. From the Command panel, select Create → Systems → Biped.

  2. Click and drag in the Perspective viewport to create the biped.

    Placing a Biped in a Scene

    Clicking sets the insertion point, and dragging defines the height of the biped system and defines all of the components. All of the biped's components are sized relative to the biped's Height parameter. Instead of making a single object, you created 30 visible and 5 hidden objects arranged in a linked hierarchy. All of the elements on the left side of the biped's body will be blue, and all of the elements on the right side will be green. This is part of the Character Studio coloring scheme that is carried throughout 3ds Max.

    Placing a Biped in a Scene
  3. Press the H key to see the list of visible objects created with the default biped. All of the objects are indented from the edge of the dialog box, indicating that they are subordinate to, or children of, the objects above them in the list. Close the Select Objects dialog box.

    Note

    If your Select Objects dialog box does not display a hierarchy in an indented format as shown, check the Display Subtree box near the bottom of the dialog.

  4. While the biped is still selected, scroll the Command panel to display the Create Biped rollout.

    This rollout is where changes to the biped's structure are made. You can increase the number of fingers and toes and the number of links in each to match your model. You can even add a tail or ponytails by increasing the number of links for these parameters, or you can discard the arms altogether. Adding neck links will make your biped taller, but adding spine links will only subdivide the torso area for more control in the midsection.

  5. Change the parameters as you like. The biped in Figure 9.3 includes additional fingers and toes, as well as a tail and a ponytail.

    Note

    The root object of the hierarchy is named Bip01, for the first biped that you create in a scene, and all the associated objects will have a Bip01 prefix. Changing the name of the object in the Name and Color rollout changes only the name of the root object and does not cascade throughout the hierarchy. Changing the name in the Root Name section of the Create Biped rollout, however, affects all of the objects in the biped.

A biped with modified parameters

Figure 9.3. A biped with modified parameters

Modifying a Biped

Bipeds are very generic in appearance, and you will rarely, if ever, use the default biped in an actual animation. Biped's have a complete set of tools available for modifying their structure and their behavior to match a model. You will have to select an appropriate editing mode to access the appropriate tools to adjust your biped. This section covers the tools used to adjust the size of a biped's individual elements.

  1. Clear your selection set by clicking the Select Object (

    Modifying a Biped
  2. Click any part of your biped to select it. Bipeds react differently than other objects: selecting any single component opens the entire object for editing.

  3. Click the Modify tab of the Command panel. The purpose of a biped is to create an animation. This is why all of the biped's parameters, including those that control animation and appearance, are consolidated under the Motion tab of the Command panel.

  4. Click the Motion tab of the Command panel to display the first level of rollouts to control a biped.

    Modifying a Biped
  5. In the Biped rollout, click the Figure Mode button to display the rollouts that pertain to the biped's configuration, but not to its animation or footstep control. The Figure Mode button turns blue to indicate the current mode that the system is using.

    Modifying a Biped
  6. Expand the Structure rollout to access the same parameters that were used when you first created the biped to adjust its basic configuration. Make any additional modifications that you choose.

    Note

    In the Body Type area at the bottom of the Structure rollout, you can change the overall appearance of the biped from the default Skeleton to Male, Female, or Classic. The body type has little to do with the biped's capabilities and is more a matter of preference.

  7. Select the biped's left upper arm. In the main toolbar, click the Rotate transform button and set the reference coordinate system to Local. Most transforms that are applied to a biped are applied in the Local coordinate system so they are relative to the object, rather than the world or the current viewport.

    Modifying a Biped
  8. Place your cursor over the green Y-axis ring of the Rotate Transform gizmo and drag upward to rotate the upper arm upward, as shown in Figure 9.4. All of the pivot points for the biped elements will be placed at the top of the objects. For example, the upper arm pivots at the shoulder, the lower arm pivots at the elbow, and the hand pivots at the wrist. This is one of Character Studio's great time savers.

  9. Click the Scale transform in the main toolbar. The reference coordinate system automatically switches to Local and then grays out to indicate that the parameter cannot be altered. All scale transforms applied to biped components must be applied in the Local reference coordinate system.

    Modifying a Biped
  10. Click and drag on the X-,Y-, and Z-axis handles of the Scale Transform gizmo individually. The Y and Z handles make the upper arm large or small, causing your biped to get bulked up or thinned out. Dragging on the X handle changes the length of the upper arm. You should observe the changes in all of the viewports while you're adjusting the scale.

    Modifying a Biped
  11. Select and adjust the left lower arm, hand, and fingers to suit yourself. Don't worry about the right side yet; it will be covered shortly.

    Rotating a biped component

    Figure 9.4. Rotating a biped component

  12. Select each of the spine links and scale them to give your biped a nice, tapered torso. Dragging the X handle upward will scale the links vertically and push the elements above them upward, increasing the height of the biped. Scaling the top spine link in the positive Z -direction will push the clavicles and all other arm components outward, as shown in Figure 9.5. The clavicles are linked to the middle of the top spine link and can be protruded by that link. If necessary, scale the clavicle to extend beyond the top spine link.

    Scaling the top spine link pushes the arms outward.

    Figure 9.5. Scaling the top spine link pushes the arms outward.

  13. Select and scale the pelvis to spread the hips out further.

  14. Similar to Steps 10 and 11, use the Scale transform to adjust the scale of the bipeds left upper and lower leg and foot.

    Scaling the top spine link pushes the arms outward.

As you can see, creating a biped is fairly simple. You simply click and drag to place the system and drag to set its height and proportionate size. You then adjust the parameters of the structure in the Motion panel. Finally, you position and adjust the size of each of the biped's components using the transforms.

Copying and Pasting Postures

Most characters are basically symmetrical with some variation in their surface appearance to make them look a bit less than perfect and a bit more natural. Character Studio allows you to set the structure and form—called the posture —for elements on one side of a biped's body and then paste those features to the elements on the other side. For instance, when the length, width, and pose of the left arm, hand, and fingers are tweaked as required, the same dimensions and orientations can be pasted to the same components on the right side. You don't need to model the opposite side independently. There is no self-adjusting relationship between the two sides, so any future changes to one side must be pasted again to the other to maintain any symmetry.

  1. Copying and Pasting Postures
  2. Select the biped and access Figure mode if necessary.

  3. Double-click on the left upper arm. Double-clicking on an object selects that object and all the objects below it in the hierarchy—in this case, the lower arm, hand, and all finger joints.

    Copying and Pasting Postures
  4. Open the Copy/Paste rollout.

    Copying and Pasting Postures
  5. Postures must be saved as collections prior to being pasted. Click the Create Collection button and then rename the collection from the default Col01 to Left Arm.

    Copying and Pasting Postures
  6. Just below the blue Posture button, click the Copy Posture button to copy the selected posture to the clipboard. A preview of the copied posture will appear in the Copied Postures area of the Command panel.

    Copying and Pasting Postures
  7. Click the Paste Posture Opposite button. The size, scale, and orientation of the selected objects will be applied to the reciprocal objects on the opposite side of the biped, as shown in Figure 9.6.

    Note

    Copied postures are not limited to being pasted within a single biped; they can also be pasted to other bipeds. Simply copy the posture, select any part of another biped, and then click the Paste Posture button.

  8. Repeat Steps 3 through 7 to copy the posture of the left leg to the right side of the biped.

Pasting a posture to the other side of a biped

Figure 9.6. Pasting a posture to the other side of a biped

As you've seen in this section, modifying a biped's appearance and posture is simply the process of selecting one of its components and using the Rotate and Scale transforms to change its size and orientation as needed. In the "Associating a Biped to a Character" section, later in this chapter, you will explore the procedures for fitting a biped to a specific model to ensure a smooth animation setup. Now is a good time to save your scene before you proceed to the next section.

Animating a Biped

Bipeds can be animated in several ways, including footstep-driven animation and freeform animation. Just as it sounds, footstep-driven animation is the process of adding visible footsteps to your scene and directing the biped to step onto those footsteps at a particular point in time. Footsteps can be added individually or as a set of walk, run, or jump steps; they can be moved or rotated to achieve the desired result. When using footstep-driven animation, the legs and feet of the biped are not the only things animated; the hips, arms, tails, and all other components are animated too. A short animation sequence can generate hundreds, or even thousands, of animation keys.

Footstep-driven animation is often a good starting point, but it is rarely the complete solution to your animation needs. For example, there is no method for turning a biped's head or raising its arms using footsteps. Even when footsteps are used to create the initial movement of a biped, freeform animation is used to augment and tweak it. Freeform animation is created using the procedures discussed in Chapter 8, "Introduction to Animation," which includes using the Auto Key method and the Track View in Curve Editor mode.

The animation keys that are added to the selected objects appear in the Track Bar where they can be moved, modified, or deleted to adjust the animation. Some character animators forgo footstep-driven animation altogether and use freeform animation exclusively for the control it gives by creating keys only where the animator chooses and not throughout the biped. In this section, you will explore both the footstep-driven and freeform methods for animating a biped.

Moving the Biped into Place

As a system, bipeds can't simply be moved using the Move transform in the Main toolbar. To position one correctly, you must select and move the root object using the Body Vertical and Body Horizontal buttons.

  1. Continue with the previous exercise or open CSBiped2.max from the companion CD. If you open the CD file, select the biped and enter Figure mode if necessary.

    Moving the Biped into Place

    In the previous exercise, when you scaled either of the leg elements along the X-axis, the feet of the biped moved off the construction plane where new objects are created. This plane is where the new footsteps will be placed, so you will want the biped's feet at that same elevation.

  2. Maximize the Right viewport and zoom so that you can see the dark, horizontal line indicating the construction plane, the feet, and the pelvis. The pelvis isn't really important at this point, but the root object located inside of it is.

    Moving the Biped into Place
  3. In the Track Selection rollout, click the Body Vertical button. This selects the diamond-shaped Bip01 object, which is the root of the hierarchy, and activates the Move transform.

    Moving the Biped into Place
  4. Use the Move Transform gizmo to move the biped until the feet rest on the construction plane, as shown in Figure 9.7.

  5. Switch back to a four-viewport display.

Adding Footsteps

Adding footsteps is as simple as adding a specified number of steps with a specific gait or clicking the mouse button to place footsteps individually. First, you will place a series of steps, and then you will place steps individually.

  1. With the biped selected, click the Footstep Mode button in the Biped rollout. The rollouts change to display the tools for adding and controlling a biped's motion. The Footstep mode and Figure mode are exclusive; you cannot be in both modes at the same time.

    Adding Footsteps
  2. In the Footstep Creation rollout, make sure that the Walk gait is selected and then click the Create Multiple Footsteps button.

    Adding Footsteps
    Adding Footsteps
    Moving the biped to the construction plane

    Figure 9.7. Moving the biped to the construction plane

  3. In the Create Multiple Footsteps dialog box that appears, assign the Footstep properties including the number of steps, the width and length of each step, and which foot to step with first. Set the Number of Footsteps to 8 and leave the other parameters at their default values, as shown in Figure 9.8. Click the OK button.

    Creating multiple footsteps

    Figure 9.8. Creating multiple footsteps

  4. Zoom out in the Perspective viewport to see the footsteps that have been created. Look at the Time slider, and note that the scene now ends at frame 123; that's 23 more frames than the 100 frames the scene had at the beginning of this chapter. 3ds Max recognized that it would take the biped 123 frames, just over 4 seconds, to move through the eight steps that it was given.

    Creating multiple footsteps
  5. Click the Play Animation (

    Creating multiple footsteps
  6. Drag the Time slider back to frame 0.

    Creating multiple footsteps

    In the Footstep Operations rollout, click the Create Keys for Inactive Footsteps button.

  7. The biped will drop its arms and prepare to walk through the footsteps that are now associated with it.

  8. Click the Play Animation button again. This time the biped will walk through the footsteps with its arms swinging and its tail and ponytail swaying back and forth.

Controlling the View

Now the problem is that the biped walks off screen so you cannot see the end of the walk cycle. Motion cycles can be very linear and difficult to track, so Character Studio contains the In Place mode to follow a biped's animation. While in the In Place mode, the biped will appear to stay in place while the scene moves around it. The In Place mode cannot be used in a Camera viewport.

Controlling the View
  1. In the Biped rollout, click the Modes and Display text with the plus sign to the left of it. This is actually a small rollout located inside of another rollout that expands to display additional display-related tools.

  2. In the Modes and Displays rollout, click the In Place Mode button.

  3. Click the Play Animation button again. This time the biped will appear to be walking in place while the footsteps move underneath it, as shown in Figure 9.9.

    Controlling the View
  4. Stop the animation playback.

Using the In Place mode helps work out the way a character moves without having to navigate throughout 3D space with your viewport. It is important to closely watch the cycle movement and try to finesse parts to suit the character. The In Place mode is great for this because the viewport moves with the character in 3D space and you can concentrate on how its body is moving.

The biped does not change position in the viewport when it is in the In Place mode.

Figure 9.9. The biped does not change position in the viewport when it is in the In Place mode.

Adding a Run and Jump Sequence

Having created a footstep cycle doesn't limit you to just those footsteps. Any extra footstep sequences can be added to a biped. These new footsteps are appended to any existing footsteps. This, in turn, extends the length of the animation, if necessary, to accommodate the additional footsteps. In the next exercise, you will add footsteps to the existing animation cycle.

Adding a Run and Jump Sequence
  1. Click the Run button (

    Adding a Run and Jump Sequence
  2. Click the Create Multiple Footsteps button to open the Create Multiple Footsteps dialog box.

  3. Change the Number of Footsteps to 10 and click the OK button.

  4. In the Footstep Operations rollout, click the Create Keys for Inactive Footsteps button to associate the new footsteps with the biped.

  5. Press the Play Animation button. The biped walks through the first eight steps and then runs through the next ten. As you can see, the run sequence meets the definition of a run, but it is far from realistic. You'll learn later in this chapter how to add to or modify a biped's motion.

  6. Click the Jump button in the Footstep Creation rollout, and then click the Create Multiple Footsteps button.

  7. In the Create Multiple Footsteps dialog box, set the Number of Footsteps to 4 and click the OK button. Because a jump is defined as a sequence with either two feet or zero feet on the ground at a time, four jump steps will equal two actual jumps.

  8. Click the Create Keys for Inactive Footsteps button to associate the new jump footsteps with the biped.

  9. Press the Play Animation button. The biped will walk, run, and then end the sequence with two jumps.

Note

The Actual Stride Height parameter in the Create Multiple Footsteps dialog box determines the height difference from one footstep to the next. For example, to animate your biped walking up a flight of stairs, you would set the Actual Stride Height to the same value as the rise of each stair.

Adding Freeform Animation

Good animation rarely comes from a first try. When you set your keys initially, you will need to edit them to suit good timing and form, as well as fix any issues that may come up. Character animation is relational: when one part of the body is in one movement, another part of the body is in an accompanying or supportive or even opposite form of movement. When you are walking and your right leg swings forward in a step, your right arm swings back and your left arm swings out to compensate. With character work, you have to remain cognizant of the entire body of the character and how it moves.

As with everything that is automated, the walk, run, and jump cycles that CS creates definitely need some work before they will be acceptable as good animation; they definitely lack the human touch, which is the earmark of good animation. For example, based on a standard CS cycle, the biped's head never turns, the torso is very stiff, and the arms swing similarly regardless of the gait type selected. With animating using CS, you will need to add the little nuances of movement that make animation interesting and personable. You will need to add animation to the biped to gain personality. Luckily, you can easily add or modify the biped's existing animation keys with freeform animation using the Auto Key button and the Dope Sheet. The following exercises contain examples of freeform animation.

Moving the Head

Moving the Head
  1. Select one of the biped's components and, if necessary, exit the Footstep mode by clicking the Footstep Mode button.

  2. Drag the Time slider to frame 50, approximately the point when the biped lifts its left foot off of footstep number 2.

    Note

    Footsteps are numbered, starting with the number 0 and initially alternating from the left to the right side. They are also color-coded, corresponding to the biped, with blue footsteps on the left and green footsteps on the right.

  3. Select the biped's head and note the animation keys that appear in the Track Bar, as shown in Figure 9.10.

    Moving the Head
  4. In the Track Bar, select the two keys on either side of the current frame and delete them.

    Note

    There seems to be an intermittent bug in release 9 of 3ds Max. If the selected keys for the head will not delete, enter and exit the Footstep mode and then try again. They should disappear after the second try.

  5. Click the Auto Key button (

    Moving the Head
    Selecting a component of the biped reveals all of that object's animation keys in the Track Bar.

    Figure 9.10. Selecting a component of the biped reveals all of that object's animation keys in the Track Bar.

  6. Click the Rotate transform button and rotate the head to the left and up, as if it sees somebody in a second floor window off screen. A new key will be created at frame 50, recording the time and value of the head's rotation.

    Selecting a component of the biped reveals all of that object's animation keys in the Track Bar.
  7. Scrub the Time slider back and forth. Watch the head rotate from a neutral position to the orientation that you created and then rotate back to the neutral position.

  8. Select all the keys after frame 50 and before frame 100. Delete them by pressing the Delete key. This will make room for the new key that you are about to create. If animation keys are too close together, the animation could appear jerky.

  9. Select the key at frame 50, hold the Shift key down, and drag a copy of the key to frame 90. Use the readout at the bottom of the 3ds Max window to drag the key with precision. Copying the key will cause your biped to hold that neck pose for 40 frames or about one and one-third seconds. Scrub the Time slider to review the animation.

    Selecting a component of the biped reveals all of that object's animation keys in the Track Bar.
  10. Select the biped's left upper arm.

  11. In the Track Bar, select and delete all keys between frames 50 and 100. The animation keys for the arms define their swing motion and the biped walks. If you scrub the Time slider or play the animation, the biped will hold its arm unnaturally stiff for 60 frames because you deleted the animation keys between two points where it holds its hand forward. That's OK; we're just making room for some new keys.

  12. Move the Time slider to frame 60. This is the location for the first new animation key.

Moving the Arms

Now it's time to animate the arms, which are essential components in any walk cycle. To do so, just follow these steps:

  1. Rotate the upper arm upward, so that it points to the same location at which the head is looking.

    Moving the Arms
  2. Continue adjusting the biped's left arm, hand, and fingers until they appear to be pointing at something, as shown in Figure 9.11.

  3. Double-click on the left upper arm to select it and all of the components below it in the hierarchy.

  4. In the Track Bar, select the key at frame 60, hold the Shift key down, and drag it to frame 85 to create a copy.

  5. Drag the Time slider and watch the Perspective viewport. The biped will walk for bit, notice something off-screen, point at it, and drop its arm while looking forward again before breaking into a run and then a jump.

  6. Click the Auto Key button to turn it off.

Rotate the biped's arm, hand, and fingers to assume a pointing posture.

Figure 9.11. Rotate the biped's arm, hand, and fingers to assume a pointing posture.

Completing the Motion Sequence

The CSBiped5.max file on the companion CD contains the completed scene to this point.

For additional practice, add keys to the animation of the biped's arms when it jogs through the run cycle. For example, when the left foot is fully extended and the heel plants on the ground, the right arm should be bent at the elbow and swung forward and slightly in front of the biped's body. As the right foot swings forward during the next step, the right arm should swing backward and assume a nearly straight posture. Bend each of the spine links and swing both arms backward to prepare the biped for each of the jumps. Use the Body Vertical button in the Track Selection rollout to lower the pelvis into a prelaunch position before the biped launches into its upward motion. Remember to make sure the Auto Key button is turned on to record all the changes that you make as animation keys.

Completing the Motion Sequence

Modifying Animation in the Dope Sheet

What if you need to change the animation that comes with CS? To that end, you will need to edit the keyframes of the biped once you are happy with the base animation cycle. For this, you need to use the Track View Dope Sheet. The Track View Curve Editor is used to edit the function curves between animation keys; however, the Track View Dope Sheet interface is cleaner and is used to edit the specific value and position of the keys. Access to the footstep keys is available only in the Dope Sheet. In this exercise, you will add individual footsteps and modify the footstep timing in the Dope Sheet to make the biped dance and jump.

Note

Control of footstep animation is not available in the Track View Curve Editor. You can, however, convert footstep animation to freeform animation using the Convert button (

Modifying Animation in the Dope Sheet

Adding Footsteps Manually

With the following steps, you will manually add footsteps to your biped character:

  1. Adding Footsteps Manually
  2. Enter the Footstep mode.

  3. In the Footstep Creation rollout, click the Walk Gait button and then the Create Footsteps (at current frame) button.

    Adding Footsteps Manually
  4. In the Top viewport, click in several locations to place alternating left and right footsteps.

  5. Change the gait to Jump, and then click the Create Footsteps (Append) button to create additional footsteps. Create about 12 footsteps in all.

    Adding Footsteps Manually
  6. When you are done, use the Move and Rotate transforms to adjust the footstep locations and orientations as desired. Your Top viewport should look similar to Figure 9.12.

  7. In the Footstep Operations rollout, click the Create Keys for Inactive Footsteps button and then play the animation.

  8. Character Studio doesn't have a collision-detection feature, so it is very possible that limbs will pass through one another. If this happens, the footsteps must be modified to eliminate these conditions.

  9. If necessary, move any footsteps that cause collisions or other unwanted conditions during the playback.

Manually place the footsteps in the Top viewport.

Figure 9.12. Manually place the footsteps in the Top viewport.

Using the Dope Sheet

In Chapter 8, you experimented with the Track View Curve Editor and learned how to adjust the values of animation keys while observing the inter-key values displayed as a function curve. When the Track View is in Dope Sheet mode, frames are displayed as individual blocks of time that may or may not contain keys. Although you cannot see the flow from key to key that the Curve Editor displays, the Dope Sheet mode has its advantages, including the ability to add Visibility tracks to control the display of an object and Note tracks for adding text information regarding the keys.

Using the Track View Dope Sheet, you can adjust the point in time when a foot plants on or lifts off the ground, how long the foot is on the ground, and how long the foot is airborne. Rather than appearing as single frame blocks in the Dope Sheet, like other keys do, footstep keys appear as multiframe rectangles that identify each foot's impact time with the footstep.

  1. Exit the Footstep mode.

  2. In the main toolbar, choose Graph Editors → Track View − Dope Sheet. The Dope Sheet will open.

  3. In the Navigation pane on the left, scroll down until you find the Bip01 entry. Expand the Bip01 and Bip01 Footsteps entries. The footstep keys appear as rectangles in the Key pane. As expected, the left keys are colored blue and the right keys are colored green. If necessary, click the Zoom Region button (

    Using the Dope Sheet
    Using the Dope Sheet
  4. Select a few Footstep keys in the Navigation pane.

    The white dot on the left side of a selected key identifies the frame when the heel of the biped's foot first impacts the footstep. Similarly, the white dot on the right side of a selected key identifies when the biped's foot lifts off a footstep. A blue key overlapping a green key indicates that both feet are on the ground. A vertical gray area with no footstep indicates that the biped is airborne and neither foot is on the ground.

    Using the Dope Sheet
  5. Select the first key (numbered 0), place the cursor over the right white dot and then drag the dot to the right to extend the length of time that the biped's foot is on the ground.

    Using the Dope Sheet

    Note

    You can't move the end of one footstep key beyond the beginning of another one, and you must maintain a one-frame gap between same-side footsteps. You can't move a key to a point in time beyond the active time segment nor can you modify keys for footsteps that have been created, but not yet associated to the biped. In addition, footsteps must be at least two frames long.

  6. The double vertical line in the Dope Sheet's key pane is another Time slider that allows you to scrub through the animation. Drag the Dope Sheet's Time slider to a point in time when the biped is airborne, as shown in Figure 9.13. Scrub the Time slider, and the foot will remain planted on the ground and then quickly move to the next footstep. The shorter the gap between footstep keys, the faster the movement between them.

    A biped's airborne time is calculated using the standard physics values for acceleration due to gravity: 32 ft/s2 or 9.8 m/s2. The biped does not simply hover at a user-defined altitude by moving it in the Z-axis and setting a key, as you would do with most other 3ds Max objects Therefore, increasing the airborne time by increasing the gap between footsteps will boost the height to which the biped rises act against the gravitational force pushing it downward.

  7. Select the next-to-last Footstep key and drag it to the right to create a gap approximately 30 frames wide between any frames. This will cause the biped to be airborne for about one second.

    Using the Dope Sheet

    Note

    It is possible to move a footstep beyond the limits of the active time segment in the Dope Sheet. For example, in a 100-frame animation, you can move the last footstep to start at frame 105 and end at frame 123. When you play the animation, it will begin to loop at frame 100, and you will never see the animation created by the last keys. Use the Alt+R key combination to extend the active time segment to include all existing keys.

    Drag the Time slider until the biped is airborne.

    Figure 9.13. Drag the Time slider until the biped is airborne.

  8. Move the time slider to the frame when both feet are planted before the jump starts. Turn on the Auto Key button.

  9. To prepare the biped to leap, select the Bip01 object and move it downward, causing the biped to bend its knees more. Rotate the spine links, neck, and head to bend the torso forward and tuck the chin. Rotate both arms backward into a prejump posture. Be sure to choose Local as the reference coordinate system for the Rotate transform.

    Drag the Time slider until the biped is airborne.
  10. Move the Time slider forward until the biped is at the apex of the jump. Rotate the biped's components into positions to your liking. Delete any animation keys that may interfere with your desired motion.

Drag the Time slider until the biped is airborne.

The CSBiped7.max file on the companion CD contains the completed exercise.

Drag the Time slider until the biped is airborne.

As you saw in this section, there are several ways to animate a biped including the footstep-driven method, the freeform method, and a combination of techniques. You can also modify the animation in the Track Bar, with the Auto Key button, and with the Track View Dope Sheet Editor. The next section addresses the methods for associating your biped to a 3D model.

Associating a Biped to a Character

The purpose of a biped is to be the portal through which you add animation to your model, rather than animating the model itself using direct vertex manipulation or deforming modifiers. Any motion assigned to a biped is passed through it to the nearest vertices of the associated model, essentially driving the surfaces of the model. For this reason, it is important that the biped fit as closely as possible to the model.

Creating and Modifying the Biped

In the following steps, you'll create and adjust a biped to fit to a character model:

Creating and Modifying the Biped
  1. Open the CSAlien.max file from the companion CD. It contains a completed alien model in the reference position.

  2. Select all of the model's components, right-click in a viewport and choose Freeze Selection. This will prevent you from inadvertently selecting the alien instead of the biped.

  3. Create a biped with a height about the same as the alien's. This will size most of the biped's parts similar to those of the alien.

    Creating and Modifying the Biped
  4. With the biped still selected, click the Motion tab of the Command panel and enter Figure mode. Changes to the biped's features or pose must be made in Figure mode to be retained by the system.

  5. Use the Body Vertical and Body Horizontal buttons in the Track Selection rollout and the Move Transform gizmo to position the biped's pelvis in the same location as the model's. With the pelvis located properly, scaling the legs or spine to match the model's proportions will be easier. Check to make sure the location is correct in all of the viewports.

    VIEWING FROZEN OBJECTS

    As you did in a previous exercise, you will modify one side of the biped to fit the model and then paste that posture to the other side.

  6. In the Front viewport, select the pelvis and scale its width so that the biped's legs fit inside the alien's legs. Scale the pelvis in the Right viewport so that it roughly encompasses the alien's lower region.

    VIEWING FROZEN OBJECTS
  7. Select the biped's left upper leg then scale it along the X- axis until the knee aligns with the alien's knee. Scale it in the Y- and Z- axes until it is similar in size to the alien's thigh, as shown in Figure 9.14.

  8. Select the biped's left calf. In the Right viewport, rotate the calf to match the model and then scale it in the X-axis until the biped's ankle matches the alien's ankle. You may need to select the left foot and use the Move transform, in the Front viewport, to orient the calf to the model. Scale the calf to match the proportions of the alien's calf.

    Scale the length, width, and depth of the biped's upper leg to match the alien's thigh.

    Figure 9.14. Scale the length, width, and depth of the biped's upper leg to match the alien's thigh.

    Note

    Modifying a biped to match a model can be a time-consuming task that requires continual tweaking and modification. Moving the foot as described in the previous step may require that the upper leg's proportions be readdressed. Don't expect to perform this task quickly without making any revisions to components on which you have previously worked. The better the biped matches the model now, the easier the animation will be later.

  9. Continue working down the leg by scaling the biped's foot to match the alien's. Be sure to check the orientation of the foot in the Top viewport. In the Structure rollout, use the Ankle Attach parameter to move the biped's ankle slightly backward, as shown in Figure 9.15.

  10. In the Structure rollout, change the number of Toes to 3 and Toe Links to 2.

  11. Scale and move the biped's toes to match the model's. Be sure to select the first toe link and use the Local Transform coordinate system to move the toes.

    Scale the length, width, and depth of the biped's upper leg to match the alien's thigh.
  12. Double-click on the left upper leg to select it and all of the objects below it in the hierarchy. Create a collection and then copy/paste the posture of the left leg to the right as you did in the Copy and Paste Postures section in this chapter. The model is not perfectly symmetrical; make any necessary changes to the right side of the biped.

Increasing the Ankle Attach parameter to move the ankle

Figure 9.15. Increasing the Ankle Attach parameter to move the ankle

Adjusting the Torso and Arms

Similar to the method used to adjust the legs, you will use the Scale and Rotate transforms to fit the biped to the model. The locations of the arms rely on the scale of the spine links.

  1. Continue with the previous exercise or open CSAlien2.max from the companion CD, select the biped, and then access Figure mode.

    Adjusting the Torso and Arms
  2. Select each of the spine links in turn, and then rotate and scale them to fit the alien's torso. Only the lowest spine link can be moved, and this will move all of the links above it as well. Each should be scaled down slightly in the X- axis to lower the biped's clavicles to match the model's.

    Adjusting the Torso and Arms
  3. Move, rotate, and scale the left clavicle as required to place the biped's shoulder socket in the proper location.

  4. Scale and rotate the left upper arm and left forearm using the same techniques you used to adjust the biped's legs.

  5. Scale and rotate the left hand as required.

    Adjusting the Torso and Arms
  6. In the Structure rollout, increase the number of Fingers to 4 and Finger Links to 2.

    Note

    Once the fingers have been adjusted, you can not go back and change the number of Fingers or Finger Links. If you do, all modifications to the fingers will be lost.

  7. Adjust the biped's fingers to match the models. This can be one of the more tedious tasks in character animation, depending on the complexity and orientation of the model's fingers. Take your time and get it right.

    Adjusting the Torso and Arms

    Note

    Separate motion tracks, in the Track View, for each finger are new to 3ds Max 9. Previous versions combined all finger animation into a single track, making finger animation difficult to edit or control.

  8. When you are done, paste the posture to the right side of the biped and make any required changes.

Adjusting the Neck and Head

The head and neck will seem easy to adjust when compared to the hands. You need to make sure the neck links fill the alien's neck area and scale the head to fit.

  1. In the Structure rollout, increase the number of Neck Links to 2.

  2. Move, scale, and rotate the neck links to match the proportions of the model's neck.

    Adjusting the Neck and Head
  3. Move and scale the head to the approximate size of the alien's head.

    Adjusting the Neck and Head

That's it. The biped has been created and adjusted to fit the 3D model, and half the battle is over. In the next section, you will tie the biped to the model and make adjustments to the skinning process. Now would be a good time to save your work.

Applying the Physique Modifier

The Physique modifier is the tool used to associate the 3D model to the biped so that all of the biped's animation is passed through to the model. It's important to remember that the modifier is applied to the model and not to the biped. Continue with the previous exercise or open CSAlien3.max from the companion CD.

Applying the Physique Modifier
  1. Right-click in any viewport and select Unfreeze All from the Quad menu to unfreeze the alien model.

    Applying the Physique Modifier
  2. Select all three of the alien components: the body and both eyes.

  3. In the Named Selection Sets field in the main toolbar, enter the name Alien to save the alien meshes as a named selection set. By creating named selection sets, you can quickly access all of the desired components by selecting the named selection set from the drop-down list on the main toolbar. For reference, see Chapter 3, "The 3ds Max Interface," for the icons and functions of the named selection sets.

    Applying the Physique Modifier
  4. Repeat the process with the biped by selecting all of its components and naming the selection set Alien Biped.

  5. Select the Alien selection set and click the Modify tab of the Command panel.

  6. Expand the Modifier List and select the Physique modifier.

    Applying the Physique Modifier
  7. In the Physique rollout, click the Attach to Node (

    Applying the Physique Modifier
  8. Press the H key to open the Pick Object dialog box. This method will be easier than trying to click on the object directly in a cluttered scene. Select the Bip01 Pelvis object and click the Pick button, as shown in Figure 9.16.

  9. In the Physique Initialization dialog box, accept the defaults and click the Initialize button. The cursor will briefly turn into a coffee cup to indicate that the initialization is in progress. It will return to normal when the process is complete.

Testing the Model

The most time-consuming part of the process is complete. You have created a biped, adjusted all of its component parts to fit your model, and applied the Physique modifier to link the model to the biped. The final step is to test the model by adding animation.

  1. Select any element of the biped and click the Motion tab of the Command panel.

  2. Enter Footstep mode.

  3. Add a footstep sequence as you did in the Animating a Biped section of this chapter. Don't forget to create keys for the inactive footsteps. Exit the Footstep mode when you are done.

  4. Activate the In Place mode, and then zoom and pan the Perspective viewport to get a good view of the action.

  5. To select the entire biped, select the Alien Biped named-selection set from the drop-down list on the main toolbar.

  6. Right-click in any viewport and choose Hide Selection from the Quad menu to hide the biped and obtain an unobstructed view of the model.

  7. Click the Play Animation button. Your alien will walk through the scene; it should be similar to the rendered alien shown in Figure 9.17.

Use the Pick Object dialog box to select the root object in a cluttered scene.

Figure 9.16. Use the Pick Object dialog box to select the root object in a cluttered scene.

The rendered alien during a walk cycle

Figure 9.17. The rendered alien during a walk cycle

The completed Character Studio Alien exercise can be found in the CS Alien Complete.max file on the companion CD.

The rendered alien during a walk cycle

As mentioned at the beginning of the chapter, Character Studio is a very complete character animation package, and we've barely scratched the surface here. There are tools for saving biped configurations and sequences of animation. You can mix animation sequences from different files to create an entirely new motion. When the model does not skin properly, you can use envelopes to refine the skinning process, define vertices to be excluded from a specific biped object's influence, or include bulge conditions to define the model's behavior depending on the angle between subsequent biped elements. The list goes on, but the good news is that the CS tutorials and help system that ship with 3ds Max are very thorough and you should find the information in those places to expand your Character Studio skills once you have a solid footing with the basics of CS. It's important to realize that animation requires nuance, and the best animation with the simplest rig and setup will beat a mediocre animation created with the more wonderful, complicated, ingenious setup.

Using Inverse Kinematics

When a hierarchy is set up through linking, the result is a kinematic chain. As you saw in Chapter 2, "Your First Max Animation," transforms are passed from a parent object to all of the children objects down the chain. Imagine your arm is a system of linked 3ds Max objects; when you pivot your forearm (the parent) at the elbow, your hand (the child) and your fingers (the descendants) are also transformed to maintain the relationship between the objects. This is known as Forward Kinematics (FK) and is the default method of passing transforms in a hierarchy.

When Inverse Kinematics (IK) is used, the child object is transformed while the parent and ancestor objects maintain their relationships throughout the chain. Using the same arm analogy, lifting a finger would raise the hand, which would raise the forearm, causing a curl at the elbow. With IK, the end of the chain, the child, is positioned and the rest of the chain upstream rotates and pivots to fit the new layout of the chain to achieve a possible pose. IK setups require the use of an IK solver to determine how the parent objects react to the child transforms and joint constraints to prevent unnecessary twists in the motion.

In the following exercise, we are headed back to the toys of war by linking a machine gun that can be mounted on the tank you built in Chapter 5, "Modeling in 3ds Max: Part II." Here, the goal is to arrange the IK setup so that the gun pivots vertically at the joints only and then pivots at the turret.

Linking the Objects

The machine gun unit consists of the gun itself, two two-component pivot assemblies, two shafts, and the turret ring. The gun is at the top of the hierarchy, and the turret is at the bottom.

  1. Linking the Objects
  2. Begin by linking the Gun object to the PivotTop object, the cylindrical object near the gun. The PivotTop object will flash briefly to signify that is has been linked. If you are having difficulty selecting the proper object directly, press the H key to open the Select Parent dialog box.

  3. Continue the hierarchy by also linking the PivotTopRing to PivotTop, PivotTop to Shaft1, and Shaft 1 to PivotBottom.

  4. Complete the setup by linking PivotBottomRing to PivotBottom, PivotBottom to Shaft2, and Shaft2 to Turret. If you open the Select Objects dialog box and make sure the Display Subtree is checked, you hierarchy will look like Figure 9.18.

The Select Objects dialog box showing the hierarchy

Figure 9.18. The Select Objects dialog box showing the hierarchy

Creating Joint Constraints

The gun assembly should be able to be rotated only in certain ways. The gun itself should only pivot perpendicular to the PivotTop object, for example. This is accomplished by constraining the Rotate transform for the PivotTop object, the parent of the gun, to a single axis. The transforms are further restricted by limiting the range of motion an object can rotate within an acceptable axis. This method is used to prevent the gun barrel from rotating to the point where it disappears within the tank body. Both of these tasks are accomplished under the Hierarchy tab of the Command panels.

  1. In the Command panel, click the Hierarchy tab (

    Creating Joint Constraints
  2. Click the IK button and then, in the Inverse Kinematics rollout, click the Interactive IK Button. The IK button will turn yellow to signify which family of rollouts is displayed. The Interactive IK button will turn blue to indicate that this feature is active and any transforms applied to objects in the hierarchy are applied in IK mode.

    Creating Joint Constraints
  3. In the Perspective viewport, select and move the gun object along the X- axis. The gun's orientation changes and all of the hierarchy elements, including the turret, change to maintain the connection, but they all rotate oddly. This is because the orientation at the joints is not constrained to a single axis or limit of degrees.

  4. Undo any transforms that were applied.

  5. Select the PivotTop object. In the Rotational Joints rollout, uncheck the X Axis and Z Axis Active check boxes.

  6. Check the Limited check box in the Y- axis section. Increase the From parameter to approximately −65 by dragging the spinners. The Pivot and its children will rotate in the viewport and then snap back to their original orientations when the mouse is released. Drag the To spinner to approximately −40. Limiting the orientation restricts how far the object can rotate in a particular axis, and dragging the spinners gives visual feedback regarding the axis about which the object is rotating.

  7. Select Shaft1 and uncheck the Active option the X-,Y-, and Z- axes in the Rotational Joints rollout. Repeat the process for the Shaft2 and gun objects. None of these objects needs to rotate on their own, they just need to follow their parent objects.

  8. Select the PivotBottom object. Check the Active and Limited options in the Y- axis area. Set the From value to −4 and the To value to 30. Uncheck the X axis and Z Axis Active options.

    Creating Joint Constraints
  9. Select the turret object. Only the Z Axis option should be checked so the turret can only rotate laterally and not flip over. Do not check the Limited option; the Turret should be able to rotate freely.

  10. In the Object Parameters rollout, check the Terminator option to identify the Turret as the top object in the IK structure.

    Creating Joint Constraints
  11. Select the Gun and then click the Link Info button at the top of the Hierarchy panel. In the Rotate section of the Locks rollout, check the X option. The Gun should not rotate in any axis except the local X- axis.

  12. Select the Turret and check the X, Y, and Z options in the Move section. The Turret should be fixed in place. In a complete 3ds Max scene, the Turret would be linked to a larger structure to define its transforms.

    Creating Joint Constraints
  13. Click the IK button at the top of the Hierarchy panel, and then click the Interactive IK button again to turn it on if necessary. Test your IK chain by moving the gun. As it moves, the other objects in the chain will reorient to maintain the proper relationships with their parent objects. Turn off the Interactive IK button when you are done.

    Creating Joint Constraints

Applying the IK Solver

An IK solver calculates the controls required to position and orient the members of an IK chain when one or more members is moved or rotated. The IK solver defines the top of the chain and identifies the goal, or the base of the chain. The IK solver precludes the need to activate the Interactive IK mode in the Hierarchy panel whenever IK is required.

The two appropriate IK solvers for this situation are the HI (History Independent) solver and the HD (History Dependent) solver. The HI solver is better suited for long animation sequences and character animation, and the HD solver is better suited for machine animation. Because the final length of the animation for this setup is unknown, the HD solver will be used here.

Applying the IK Solver
  1. Undo any transforms that were applied during the previous exercise if necessary.

    Right-click the Undo button in the main toolbar to see a list of the recent changes to the scene, with the most recent changes at the top of the list. Click on the entry in the list that defines the last command that you want undone. That command and all of the commands above it will highlight. Press the Enter key to undo all the selected commands.

  2. Choose Edit → Hold from the main menu. A few IK operations, including applying an IK solver, are not always undoable. If the result is not correct, choose Edit → Fetch to restore your scene to the point just before the Edit → Hold was executed.

  3. Turn off Interactive IK.

  4. Select the gun and choose Animation → IK Solvers → HD Solver. A rubber banding line will stretch from the gun's pivot point to the cursor. Place the cursor over the Shaft2 object and click to define it as the end of the IK chain. The IK chain should not be bound to the object that has been designated as the Terminator.

    Applying the IK Solver

    Note

    When the cursor is moved over the other viewports while an IK solver is being assigned, the view will update to show the rubber banding line projecting from the object to the cursor in that particular viewport. The viewport does not have to be the active viewport for this viewport change to occur.

  5. The End Effector acts as the pivot point of the Terminator object and can be used to straighten out the chain without actually moving the child object. On the Motion panel, in the IK Controller Parameters rollout, click the Link button in the End Effectors area and then click on the Turret. Turret appears in the End Effector Parent field.

    Applying the IK Solver
  6. Select the gun and use the Move Transform to test your IK setup. Moving the gun forward, backward, up, or down will cause the two pivots to rotate within their limits.

The HD solver's IK components are not listed in the Select Objects dialog box because they act on behalf of the objects to which they are assigned. To modify any of its properties, select an object and open the Motion panel of the Command panels. The IK Controller Properties rollout contains the options for modifying the IK chain.

Summary

This chapter introduced you to two powerful tools for reducing the time and effort required to animate objects and characters. Character Studio is a fantastic tool that speeds up the process of character animation. Using the Biped system, you can quickly create and adjust the substructure that controls a 3D model. Once the Physique modifier associates the model to the biped, character animation can be added using footstep-driven or freeform animation.

IK is used throughout mechanical design and character animation, and it is another 3ds Max tool that you may find invaluable once its workflow becomes second nature. The exercises in this chapter examined the basics of an IK setup and the use of an IK solver for a mechanical animation of the tank. The IK setups can include several IK chains controlling the transforms for different components of the same model. Easily selected controls can be placed in the scene for easy selection and manipulation of a complex model's components. IK can also be used for organic character animation, because 3ds Max has different types of IK for character work as well (such as the HI IK or Limb Solver IK). This chapter covered only one type of IK (using the HD solver).

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset