9

1162 Chapter 14: character studio
get the results you want. In some cases, you
might need to animate sett ings as well.
One p articularly useful feature of the delegate
is its ability to display, using colored vectors,
the st reng t h and direction of the various
forces acting upon it during solution of the
crowd simulation. Each force can have a
unique,identifyingcolor. Forexample,the
Seek behavior uses green by default, while the
Wander behavior uses aqua. You can change
these colors to any you lik e.
If a simulation isn’t proceeding as expected, you
can debug it by observing the vectors during
the solution. And if the solution occurs too
quickly,youcanusetheStepSolvefeatureto
solve the simulation one frame at a time.
Procedure
To us e a ss ign behavi or s to d elegates :
This example shows how to create a basic crowd
simulation with delegates and behaviors.
1. Ru n 3ds Max or reset the program.
2. AddaCrowdobjectandoneormoreDelegate
objects to the scene. In general, add delegates in
the Top viewport so that they point forward.
The Crowd objects location is immaterial.
3. Select the Crowd object and open the Modify
panel.
4. On the Setup rollout > Behaviors group, click
the New button.
5. IntheSelectBehaviorTypedialog,clicka
behavior and then click OK to close the dialog.
A Behavior rollout appears for the behavior
you chose.
6. If the behavior requires a target object or
objects, such as Seek, click the None button and
then select an object, or click Multiple Selection
and select several objects.
7. Change other b ehavior settings as necessary.
8. Create and modify additional behaviors as
necessar y.
9. On the Setup rollout, click the Behavior
Assignment button.
10. In the Assignment Design group, the two upper
lists should each contain a single entry: the
delegate on the left, and the behavior on the
right. Select both items.
11. Click the New Assignment button to the rig ht
of the Assignment Design group. It’s a vertical
button with five ri ght-pointing ar rows.
This adds the new assignment to the list in the
Behavior Assignments group.
12. Accept the changes and the OK button to close
the Behavior Assignments and Teams dialog.
13. On the Modify panel, scroll down to the Solve
rollout and click the Solve button.
Keys are created as follows: The delegate
turns to point toward the sphere, banking as
it tur ns, and then moves directly toward the
sphere. When it reaches its target, it moves
slightly beyond the sphere, and then repeats
the turn-and-move motion until the end of the
simulation. To prevent this, try starting with
the two objects f arther apart, or animating the
sphere’s position.
Dir ecting Del egates
One of the purposes of behaviors is to move
delegates in a particular direction over the course
of the simulation. T hese behaviors can be u sed to
direct delegates:
•TheSeek behavior (page 2–1220) is one of the
most commonly used behaviors in the crowd
system. With this behavior, you can cause
delegates to move toward a specific object. The
seek object can be animated, and the delegates
will follow it.