• Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL
Help

Chapter 4. Rigging the Bones > Reaction Manager

Reaction Manager

The Reaction Manager, accessed from the Animation menu, is a new tool in 3ds max 7 that allows you to interactively set up relationships between parameters in a scene. For example, you can use the Reaction Manager to make a custom attribute's value control the X rotation of several objects at once. In other words, once you set up the relationships with the Reaction Manager, you would only have to increase the custom attribute's value to change all those objects' X rotations.

Why use the Reaction Manager, when you could simply rotate the objects? A full character rig has numerous bones and IK chains. While you could animate the skeleton by working directly with the bones or IK chains, this would get tedious after a while. It's far simpler to use the Reaction Manager to set up multiple reactions that will occur when you change a single custom attribute. For example, you will use the Reaction Manager later on to cause the foot bones to roll up naturally just by changing one parameter.

The Reaction Manager works with the concept of one master and one or more slaves, where the master controls the slaves. For each master, you set up various states for the slaves. For example, the slaves do one thing when the master parameter reaches a value of 50, then they do something else when the master parameter reaches 100.

This might seem confusing at first, but you'll soon find the Reaction Manager to be a very useful tool for character rigging.

Tracks

The Reaction Manager works with tracks. A track is an animatable parameter associated with an object. For example, a sphere has a Radius parameter that is animatable, so the Radius parameter can also be called a track. If you animated the sphere's Radius, you could say you are “animating the sphere's Radius track.”

You can easily see an object's tracks by looking at the Track View window (choose Graph Editors > New Track View). This window displays all the tracks in the scene over time. In Track View, the tracks are arranged in a hierarchy, which is displayed at the left side of the Track View window. You can click the [+] next to any item in the hierarchy to display its subtracks.

You'll be using Track View later in this book, when you animate the character rig. You don't need to know how to use it right now; I only mentioned it here so you can look at it to get an idea of what tracks are associated with each object.

In addition to its own creation parameters, every object in the scene is assigned a set of default transform tracks. There are separate X, Y, and Z tracks for each of the position, rotation, and scale transforms.

Reaction Curves

At the bottom of the Reaction Manager is a graph with lines representing the reactions over time. There is one red line for each slave track.

TIP

In 3ds max, all graph lines are referred to as curves regardless of whether they are straight or curved.


The numbers across the top of the graph represent master parameter values. The dots mark the states you created for the master parameter. You can use the controls at the bottom right of the graph to zoom and pan the graph.

The slope of the red line indicates how sharply or smoothly the slave parameter will start or stop changing when the master parameter reaches the state values. You can accelerate or decelerate the change by making the lines into curves, and changing the shape of the line.

TIP

You are not expected to be able to look at these graphs and understand everything about the motion, such as which way the objects are moving and exactly how fast they're going. The graphs are only intended to help you speed up or slow down the motion as it approaches or leaves a state.


When setting up reactions, you can sometimes improve the smoothness of the reaction by adjusting its curve. To work with the curves, you can click a key dot to select it, then right-click to change its type from corner to Bezier. Then you can adjust the dot's handles to change the shape of the curve.

TIP

It can be helpful to think of the curve as representing the object's velocity. When the curve is a straight line, the velocity is constant. When it is curved, the velocity changes over time. An upward curve represents acceleration, while a downward curve means deceleration.


PRACTICE L: Setting up a Reaction

In this practice exercise you'll use the Reaction Manager to make the custom attribute control two different parameters in the scene.

1.
Choose Animation > Reaction Manager to open the Reaction Manager dialog.

The top pane of the dialog (labeled Reactions) will display the master parameter, and the slave parameters will be listed under it, slightly indented. The bottom pane (labeled States) will display the values for the custom parameters.

2.
At the top of the Reaction Manager dialog, click the Add Master button.

3.
Click the GongControl rectangle. A series of pop-up menus will appear, to guide you through picking one specific parameter associated with this object. Choose Object (Rectangle) > Custom Attributes > Ring_the_Gong.

This places the Ring_the_Gong parameter in the master controller listing in the top pane of the Reaction Manager dialog.

Determine Slave Parameters

Before we can set up the slave parameters, we must figure out what they are. We know the Swivel object will rotate to make the mallet hit the pad, and the bell will go up the pole. But on which axes will these events occur? The slave parameters will be these axes.

To determine the rotation axis for the Swivel object, you'll rotate it appropriately and see which axis is affected.

1.
Click Select and Rotate.

2.
Change the coordinate system to Local.

3.
Select the Swivel object, and rotate it so it hits the pad.

From the viewport display of the rotation axes, you can see that the local X axis is used to rotate the mallet into place.

4.
Undo the rotation.

Now you'll determine the position axis for moving the bell.

5.
Click Select and Move.

6.
Change the coordinate system to Local.

Even though you just chose the Local coordinate system, it changed back to View when you clicked Select and Move. This is because you can have a different coordinate system for each transform. In other words, each time you click a transform button (Select and Move,Select and Rotate,Select and Scale ), there can be a different coordinate system in effect.

7.
Select the Bell object.

By looking at the transform gizmo on the bell, you can see that the bell would move on its local Z axis to move up the pole.

Set up Slave Parameters

Now that you know which axes will be used as slave parameters, you can set up the slaves.

1.
In the Reaction Manager top pane, highlight the master listing Gong Control/Ring_the_Gong.

2.
Click the Add Slave button.

3.
Click the Swivel object. From the pop-up menus that appear, choose Transform > Rotation > X Rotation.

TIP

Make sure you click Add Slave, and not Add Selected.

This parameter is added to the Reactions pane in the Reaction Manager, as a slave of the Ring_the_Gong master parameter.

4.
Click Add Slave again, and click the Bell object. From the pop-up menu, choose Transform > Position > Z Position.

The Reaction Manager now lists both parameters as slaves.

Set up States

The Reacton Manager works with states. A state associates a master parameter value with various other parameter values. In this case, we want to create three states: one for the current positions, one for when the mallet hits the pad but the bell hasn't begun to rise, and one for when the bell reaches the top of the pole.

The initial state was already set up when you chose the slave parameters, with the mallet and bell at their rest states and Ring_the_Gong set to 0. Now you must set up the other two states.

1.
Select the GongControl object.

2.
On the Modify panel, increase Ring_the_Gong to 100.

3.
In the center of the Reaction Manager dialog, click Create Mode.

4.
Turn on the Angle Snap Toggle.

5.
In the Left viewport, rotate the Swivel object so the mallet hits the pad.

6.
In the Reaction Manager dialog, click the Create State button (next to Create Mode).

This creates the second state, where Ring_the_Gong is 100 and the mallet is hitting the pad.

7.
Select GongControl again, and change Ring_the_Gong to 200.

8.
Move the bell all the way up the pole.

9.
Click Create State.

This creates a third state, where Ring_the_Gong is 200, the mallet is hitting the pad, and the bell is all the way up the pole.

10.
Turn off Create Mode.

Test the Relationship
1.
Select GongControl.

2.
Decrease Ring_the_Gong to 100. The ball should descend the pole.

3.
Decrease Ring_the_Gong to 0. The mallet should return to its original rotation.

If your reactions don't work as expected, go over this practice exercise again until you can get it to work.

Animate the Scene

With the reactions set up, you can easily test how the mallet and ball animate.

1.
Turn on Auto Key.

2.
Move the time slider to frame 30.

3.
Set Ring_the_Gong to 100.

4.
Move the time slider to frame 40.

5.
Set Ring_the_Gong to 200.

6.
Move the time slider to frame 80.

7.
Set Ring_the_Gong to 0.

8.
Play the animation.

With the reactions set up for the Ring_the_Gong parameter, you could animate the mallet ringing the gong numerous times just by setting the parameter.

9.
Save the scene as Practice_Gong03.max.

TIP

You can also rename the states if you like. To rename a state, click it once in the Reaction Manager, then click again to access the state name. Enter a new state name and press [Enter].


TUTORIAL R6: Creating the Foot Controls

This is the fun part, where you start creating controls for your character rig. You'll create custom attributes and set them up in the Reaction Manager so you can roll the character's feet just by changing parameters on the Modify panel.

Load the Bones Scene
1.
Load the file CharRig07.max that you created earlier, or load it from the Rigs folder on the CD.

Recall that you have already added several IK chains to the character's legs and feet, and that you've linked them together. Let's review the object names.

2.
Select a few of the IK chains by clicking on the crosshairs for each one, and look at the name of each one on the Modify panel. This will refresh your memory as to how they're named.

3.
If you need a refresher on how the IK chains work, you can move or rotate a few of them, then undo what you've done. In particular, remember that you rotate the heel upward by rotating IKBallL or IKBallR on its local X axis.

Create Control Objects

To simplify the process of animating your character, you'll create a control object for each foot, and add all the foot-related custom attributes to these objects.

1.
In the Top viewport, zoom out a little to give you room to place the control objects.

2.
In the Top viewport, create a rectangle a little larger than one of the feet. Name the rectangle CtrlFootL.

Be sure to create a rectangle and not a plane. If you like, you can increase the rectangle's Corner Radius parameter to give it rounded edges.

3.
If necessary, move the rectangle so it sits just under the left foot.

4.
Create a copy of the rectangle, and name it CtrlFootR. Place this object under the right foot.

5.
Select IKToeL (the IK chain at the tip of the left foot), and link it to CtrlFootL.

Correct the Parent Space
1.
To test the rig, go to frame 10, turn on Auto Key, and move CtrlFootL upward and to the side.

The entire foot moves with it, as you would expect, but there's a problem. The foot bone spins when you move the foot. You can keep it from spinning by adjusting one of the controls for the IK chain at the ball of the foot.

You can keep the bones from spinning by changing the parent space, or reference point, that the IK chain uses. Right now, it's set to use the Start Joint as a reference point, which is at the ankle in this case. Because the ankle changes its rotation when you move CtrlFootL up and down, the bones swivel. To solve this problem, you'll use the IK Goal setting to keep the bones from spinning when you move CtrlFootL.

2.
Turn off Auto Key.

3.
Select IKBallL, the IK chain at the ball of the left foot, and go to the Motion panel.

4.
Locate the IK Solver Properties rollout. In the Parent Space group, select the IK Goal option.

If this causes the bone to turn on its side, change the Swivel Angle to –90 or 90 to correct it.

5.
Select IKToeL, and set its parent space to IK Goal. Change the Swivel Angle if necessary.

This will avoid future problems with later parts of the rig causing the bones to spin.

6.
Move the time slider to see the foot rise. The bones don't rotate this time.

7.
Perform the same tasks on the right foot, linking the IK chains to the control as you did for the left foot. Test the rig by animating CtrlFootR on frame 10. Check that the foot moves with the control object, and that the bones don't rotate independently of the foot control.

Be sure to turn off Auto Key when you've finished.

8.
Save the scene as CharRig08.max.

TUTORIAL R7: Setting up Reactions for the Feet

Now you can add custom attributes and set up reactions to control the feet.

Add Custom Attributes

You'll start with a custom attribute for rolling the left foot. A range of 0 to 90 degrees will work well for this custom attribute.

1.
Load the file CharRig08.max, or continue from the previous tutorial.

2.
Select CtrlFootL.

3.
Choose Animation > Parameter Editor. The Parameter Editor appears.

4.
For Name, enter RollL.

5.
On the Float UI Options rollout, change the Range to go from 0 to 90.

6.
Click Add.

You can see the new parameter on the Modify panel, on the Custom Attributes rollout. You don't have to close the Parameter Editor to add the custom attribute to the other foot control.

7.
Select CtrlFootR, and enter RollR as the Name on the Parameter Editor. Click Add to add the custom attribute to the right foot control.

8.
Close the Parameter Editor.

Set up Master and Slaves

Now you'll use the Reaction Manager to set up the reactions for the RollL custom attribute, which will be the master track. You'll need to set the X Rotation tracks for IKBallL and IKToeL as slaves. For IK chains, these tracks are subtracks under Transform > IKGoal in the track hierarchy.

1.
Choose Animation > Reaction Manager to open the Reaction Manager.

2.
In the Reaction Manager dialog, click Add Master. Select CtrlFootL and from the pop-up menu, choose Object (Rectangle) > Custom Attributes > RollL.

3.
Because you're wiring the same parameter for two objects, you can choose the slave parameters for both at the same time. Select both IKBallL and IKToeL.

4.
In the Reaction Manager dialog, click Add Selected. From the pop-up menu that appears, choose Transform > IKGoal > Rotation > X Rotation .

TIP

To make sure you're selecting the correct objects, you can press the [H] key and select them from the Select Objects dialog.

This adds the two X Rotation parameters as slaves. The first state has RollL at 0, and both IK chains in their rest positions.

TIP

Using Add Selected rather than Add Slave allows you to choose the slave parameters for several objects at once. However, this works correctly only if you want to set the same slave parameters for all selected objects. In this case, both slave parameters are the X Rotation track, so Add Selected is fine.


Pin the Stack

Before you set up the reactions, you'll pin the modifier stack so it always shows the RollL parameter. This will make it easier to set the foot reactions.

1.
Select CtrlFootL and access the Modify panel.

2.
On the Modify panel, click Pin Stack.

The RollL parameter will now show on the Modify panel no matter which object is selected in the scene.

Set up Reactions

Now you'll set up two reactions: One when RollL is 60, to cause the heel to come off the ground, and another when RollL is 90, to have the foot in its fully rolled position.

1.
In the Reaction Manager, click Create Mode.

2.
Increase RollL to 60.

3.
In the User viewport, rotate IKBallL about 45 degrees on the X axis to raise the heel off the ground.

4.
Click Create State.

5.
Change RollL to 90.

6.
In the User viewport, rotate IKToeL on the X axis by about 80 degrees.

Now the foot is very bent over. You'll need to rotate IKBallL back to straighten it out.

7.
Rotate IKBallL by about –70 degrees on the X axis to straighten out the foot.

8.
Click Create State.

9.
Turn off Create Mode.

Now you can test the reactions to see if RollL is controlling the foot correctly.

10.
Use the RollL spinner to decrease its value from 90 down to 0, and back up again.

If all has gone well, the foot should roll smoothly up and down as you change RollL. If it doesn't work, look back over this tutorial to see where you might have gone wrong. If you still can't get it to work, start the tutorial over again.

Set up Reactions for Right Foot
1.
On the Modify panel, turn off Pin Stack.

2.
In the Reaction Manager dialog, click Add Master, and pick CtrlFootR. From the pop-up menu, choose Object (Rectangle) > Custom Attributes > RollR.

When you add this new master track, the Reactions pane will become blank again. You can see the reactions for the left foot again by selecting the RollL master track in the Reactions pane. For now, you want to select the RollR master track so you can add its slaves.

3.
Using the procedure outlined in this tutorial, create slave tracks for the right foot in the same way you did for the left foot.

4.
Save the scene as CharRig09.max.

  • Creative Edge
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint