9
1166 Chapter 14: character studio
5.
Choose Positive Axis to cause the delegates to
berepelledfromtheZ-axissideofthegrid.You
can also choose Negative Axis to repel delegates
fromtheoppositesideofthegrid,orBothto
repelthemfrombothsides.
6. If you want delegates to be attracted to the grid
only when they are within a specified area in
front of the grid (rather than when they are
anywhere in the scene), turn on Use Distance.
Use the Inner Distance and Outer Distance
parameters to set the area in which delegates
will be attracted to the grid. Turn on Display
Distance to see the distance in viewports.
7. Use Behavior Assignments (page 2–1200) to
assign the behavior to a delegate or team.
To use the Repel behavior:
1.
Add a Repel behavior to the Crowd object.
2. In the Repel Behavior rollout, use the None
button or the Multiple Selection button to
designate the object or objects that are to repel
delegates.
3. Change the default settings as desired.
4. Use Behavior Assignments (page 2–1200) to
assign the behavior to a delegate or team.
ToaddaVectorFieldspacewarp:
Adding a Vector Field space warp object works the
same as adding a Box geometry primitive.
1. On the Object Type rollout, click Vector Field.
2. Drag in a viewport to set the initial dimensions.
• If using the Cube creation method, this sets
all three dimensions simultaneously.
• If using the Box creation method, release the
mousebutton,andthenmovethemouse
vertically to set the height.
3. Clicktocreatethespacewarp.
To u s e a V e ctor Fi el d s pa ce war p wi t h de l ega t es :
This procedure presents general guidelines for
using the Vector Field space warp with delegates
in a crowd simulation.
1. Create an object to serve as an obstacle. This
object must be an editable mesh or geometric
primitive; it can have modifiers.
2. AddaVectorFieldspacewarp.
3. Position and scale the space warp lattice so that
it encloses the obstacle object.
The lattice should be significantly larger than
the object. The object should be located
roughly at the lattice center.
4. In the L attice Parameters rollout, increase the
Length Segs/Width Segs/Height Segs settings
so that the lattice segments intersect the objec t
at reasonable intervals.
To determine appropriate Segs settings for
yo ur obstacle objects, first examine the object
complexit y. If the obst acle has a lot of detail,
and you want that detail reflected in the vector
field, then you need a relatively high lattice
resolution.
5. Click the Obstacle Parameters rollout >
Compute Vectors group > Vector Field Object
button (initially labeled “None”), and then in
a viewport, click the object that will act as an
obstacle in the crowd simulation.
This specifies the obstacle object. The range
volume grid appears on t he object’s sur face as
an olive-colored w ireframe.
6. IncreasetheObstacleParametersrollout>
Compute Vectors group > Range setting.
As you increase this setting, you’ll see the range
volu me grid expand. The range volume should
enclose the space in which crowd members
need to star t tur ning in order to avoid the
object.