In this exercise, we will again work with our model that walks with poise and attitude. This shot would be perfect if not for one small detail: the director wants the model to blow a kiss and wave to her fans. In the past, this would have been a time-consuming endeavor because motion capture data has keys on every frame. You would have had to eliminate and reduce keys and then key the rotation of the joints in her shoulder, arm, and hand.
However, with the Trax Editor, you can create an overlay animation of the model rais-ing her arm and wavrais-ing without destroyrais-ing the integrity of the original motion capture. The Trax Editor is a nonlinear animation sequencer that you can use to layer and blend clips from animated elements and overlap them to create new motions. The Trax Editor can be quite useful when you want to layer keyframed animation over motion capture data.
To start, load the scene file that you saved earlier in this chapter, O f f s e t . m b .
Cleaning Mocap 107
Workflow for the Trax Editor and Motion Capture
You can animate over motion capture in many ways (the first example in this chapter illus-trates one other method), but one of the most effective and simple procedures uses the non-linear animation features of the Trax Editor, especially since Trax doesn't destroy your origi-nal data. For the purpose of this example, we already created a clip of the mocap.
Your workflow for the kiss and wave actions is as follows:
1. Lock all nonanimation attributes.
2. Animate the character blowing a kiss and waving good-bye using Rotation X, Y, and Z values on the model's right arm.
3. Create a clip of the kiss and wave.
4. Shift the kissNwave clip's starting time.
5. Adjust the f-curve keys in the Trax Editor's Graph Editor.
Lock Non-Animation Attributes
It is good practice to lock all attributes that you will not key, thus reducing the clutter of keyframes resulting from your work. In this example, we'll animate only the rotational val-ues of specific joints. We will not animate the Translate, Scale, and Visibility valval-ues in the Channel box; therefore, we'll lock these values to ensure that we don't accidentally adjust one. Follow these steps:
1. In the Outliner, expand the mocapSkel node until you have the following nodes visible:
R_collar, R_shoulder, R_elbow, R_wrist (see Figure 4.18).
2. Select R_collar, R_shoulder, R_elbow, and R_wrist. You can do this by clicking the R_collar node, and with the mouse button still pressed, drag the cursor down onto R_wrist.
Figure 4.18: Expand the mocapSkel node. You will be setting rotation values in the Channel box for the R_collar, R_shoulder, R_elbow, and R_wrist joints.
Cleaning Mocap 109
3. With the R_collar, R_shoulder, R_elbow, and R_wrist joint nodes still highlighted, in the Channel box select Translate X, Translate Y, and Translate Z. RM click on top of the selection to display the Channels dialog box. Scroll down and select Lock Selected.
The numeric values for Translate X, Translate Y, and Translate Z are shaded and are now locked.
4. In the Channel box, select Scale X, Scale Y, Scale Z, and Visibility. Select Lock Selected for these values also. The numeric values for Scale X, Scale Y, Scale Z, and Visibility are shaded and locked.
Set Keys to Define the Animation Range
When animating over an existing clip, it is extremely important to set "neutral" keys at the head and tail of your new animation to define a beginning and an end for the range of the new clip. If you don't, the clip and keyframed animation will interact in a bizarre manner. In this example, the clip of the kiss and wave will start on frame 0 and end on frame 132. We will not modify the value of the first and last keys; they serve as start and end poses of the kiss and wave animation that will blend into the animation of the model walking.
We will set keys on four joints: the R_collar, R_shoulder, R_elbow, and R_wrist. The R_shoulder and R_wrist joints will have an animation range of 132 frames. The R_collar and R_elbow joints will have an animation range of 111 frames. Even though certain joints do not have the same frame range, the length of the clip will be the length of the longest frame range, 132 frames, when the four joints are selected and made into a clip. In the Time-line, the last key that has been set on any joint defines the duration of the entire clip. There-fore, all the last keys do not have to be on the same last frame.
1. In the Outliner under mocapSkel, select the R_collar joint node, and then Ctrl+click the R_elbow node. Both the R_collar and R_elbow joint nodes will be selected in the Outliner.
2. In the Timeline, go to frame 0 and set a key by pressing the s key on your keyboard.
3. Go to frame 111 and set a key. You have now created an in and out for the animation range of the R_collar and R_elbow nodes (see Figure 4.19).
4. In the Outliner, select the R_shoulder and R_wrist nodes.
5. In the Timeline, set keys at frame 0 and 132. You have now created an in and out ani-mation range for the R_shoulder and R_wrist nodes (see Figure 4.20).
Set Keys for the Kiss and Wave Animation
We will set keys on the R_collar, R_shoulder, R_elbow, and R_wrist joint nodes to animate the essential movement of the model blowing a kiss and waving. The only transform values we will enter in the Channel box are Rotate X, Y, and Z (recall that the rest of the transform nodes are locked).
Set R_collar Keys for Rotate X, Y, Z
First, set keys for rotation on R_collar joint. Follow these steps:
1. In the Outliner under mocapSkel, select the R_collar joint node.
2. Set the keys shown in Table 4.1 on the desig-nated frames.
figure 4.19: Set an in and out range for the R_collar and R_elbow joints.
Figure 4.20: Set an in and out range for the R_shoulder and R_wrist joints.
Cleaning Mocap 111
Type the values In the Channel box fields.
Your animation should look like the w a v e R _ c o l 1 a r _ p e r s p V i e w . m o v movie on the CD.
Set R_shoulder Keys for Rotate X, Y, Z
Next you will set X, Y, and Z rotation keys for the R_shoulder joint node. Follow these steps:
1. In the Outliner under mocapSkel, select the R_shoulder joint node.
2. In the Channel box, set the keys as shown in Table 4.2.
Your animation should look like the w a v e R _ _ s h o u l d e r _ p e r s p V i e w . m o v movie on the CD.
Set R_elbow Keys for Rotate X, Y, Z
Next you will set X, Y, and Z rotation keys for the R_elbow joint node. Follow these steps:
1. In the Outliner under mocapSkel, select the R_elbow node.
2. Set the keys shown in Table4.3.
Your animation should look like the w a v e R _ e l b o w _ p e r s p V i e w . m o v movie on the CD.
Set R_wrist Keys for Rotate X, Y, Z The R_wrist joint node is the last joint for which you will set X, Y, and Z rota-tion keys. Follow these steps:
1. In the Outliner under mocapSkel, select the R_wrist node.
2. Set keys on the suitable frames, as shown in Table 4.4.
Your animation should look like the w a v e R _ w r i s t _ p e r s p V i e w . m o v movie
Name field. Leave all other parameters at their default settings.
4. Select Create Clip.
You will notice that the keys from the Timeline have disappeared. They have been moved into the Trax Editor.
5. Choose Window Animation Editors Trax Editor to open the Trax Editor. You will find that kissNwave has been created as a second track under the sexyWalk track.
Shift the Start Time of the kissNwave Clip
After you create an animation, you don't have to destroy your animation by adjusting keys if you don't like the timing. You can slide the clip on the track to delay the start frame of the animation or start it earlier than you originally planned, or you can even slow down or speed up the actions by scaling the clip. To change the start time, follow these steps:
Figure 4.21: The Create Clip Options dialog box.
Cleaning Mocap 113
1. In the Trax Editor, select the kissNwave clip. Notice that the clip has numbers on both the head and tail, designating the start frame and the end frame. On the left side of the kissNwave clip is the number 0; on the right side is the number 132.
2. LM click the kissNwave clip, and slide it until the frame start reads 45 and the frame end is 177.
Scrub the Timeline. Now the animation doesn't start with the model blowing a kiss.
Instead, she takes a few steps and then raises her arm. There seems to be a little more atti-tude in her behavior since we shifted her kiss and wave until after her entrance.
Adjust the F-Curves in the Trax Editor's Graph Editor
Although the kiss and wave keys are not visible in the Timeline, you can still manipulate them in the Trax Editor. Follow these steps:
1. In the Trax Editor, select the kissNwave clip, as shown in Figure 4.22.
2. Choose View Graph Anim Curves, or select the icon for the Graph Editor in the Trax Editor pane to open the Graph Editor
3. With the Move tool selected, LM click to select keys and MM click to move them. You can manipulate the f-curves by adjusting keys the same way you would normally in the Graph Editor.
4. Adjust the curves until you are happy with the result.
Your final animation should look like the w a v e C o m p l e t e _ p e r s p V i e w . m o v movie on the CD. You have now finished this animation, and you just got approval from the director for your shot, so take a well-deserved break and grab a latte. Then read on to explore another procedure for animating over motion capture with the Trax Editor.
Disable the mocapSkel Clip in the Trax Editor
We mentioned earlier that you can create animations on mocapped skeletons using two tech-niques. We used one of these techniques in the previous section when we set keys on a moving
Figure 4.22: Shift the kissNwave clip on the Timeline until you are happy with the timing of the model's wave. Use the Graph Editor to tweak f-curves.
3. Set keys on the R_collar, R_shoulder, R_elbow, and R_wrist joint nodes. You can create your own wave or use the keys in Tables 4.1, 4.2, 4.3, and 4.4, earlier in this chapter.
4. In the Outliner, select the R_collar, R_shoulder, R_elbow, and R_wrist joint nodes.
Select F2, choose Animate Create Clip and enter kissNwaveRelative in the Name field. Click the Create Clip button.
Scrub the Timeline. You should see the arm animating while the rest of the model's body stays static.
Enable sexyWalk
To turn on the model's motion capture, we need to enable that clip. Follow these steps:
1. In the Trax Editor, RM click sexyWalk and check Enable Clip to activate the motion capture movement.
Scrub the Timeline. Something is not right. The model's arm is waving erratically and is not in the positions that we set. We didn't key her arm at the origin, and it needs to be rela-tive to the motion capture clip.
2. In the Trax Editor, RM click kissNwaveRelative and check Relative Clip.
Scrub the Timeline. Our model is now walking and waving. You can now disable the sexyWalk clip at any frame in the Timeline and analyze the kissNwaveRelative clip moving independently of the motion capture clip.
Because we created the animation of the arm with the sexyWalk clip disabled, we can now enable or disable sexyWalk at any frame in the Timeline and analyze the kissNwaveRel-ative clip moving independent of the motion capture clip.
Adjust f-curves accordingly with the sexyWalk clip enabled or disabled.
The Next Step
We used the Trax Editor to create an overlay animation clip on top of a motion capture walk. Not once did we have to deal with all the keys that motion capture produces. In fact, we used traditional forward kinematics to animate the arm. This exercise should give you a starting place to explore animation with motion capture in the future.
Keep practicing with this walk. Try creating a clip of the model turning her head or her torso or waving with her other hand. Use your imagination and the techniques we covered and have fun.
Cleaning Mocap 11 5