8

1018 Chapter 14: Character Studio
To us e a V e cto r Fiel d s pa ce warp wi th del 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 s o that
it encloses the obstacle object.
The lattice should be significantly larger than
theobject. Theobjectshouldbelocated
roughly at the lattice center.
4. In the Lattice Parameters rollout, increase the
Length Segs/Width Segs/Height Segs settings
so that the lattice segments intersect the object
at reasonable intervals.
To determine appropriate Segs settings for
your obstacle objects, first examine the object
complexity. If the obstacle 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 objec t that will act as an
obstacle in the crowd simulation.
This specifies the obstacle object. The
range
volume grid
appears on the object’s surface as
an olive-colored wireframe.
6. Increase the Obstacle Parameters rollout >
ComputeVectorsgroup>Rangesetting.
As you increase this setting, you’ll see the range
volume grid expand. The range volume should
enclosethespaceinwhichcrowdmembers
need to start turning in order to avoid the
object.
7. Turn off Display group > Show Lattice and
Show Range so that the vector field will be more
easily visible w hen generated.
8. Turn on Display group > Show Vector Field.
9. In the Compute Vectors group, click the
Compute button. This generates the vector
field.
Tip: To make the vector lines more ev ident,
increase the Display group > VectorScale
setting.
The vectors appear as blue lines surrounding
theobstacleobject. Onevectoriscomputed
for each lattice intersection within the range
volume grid. Each vector matches the normal
oftheobjectatthepointontheobjectssurface
closest to the lattice point.
The vector force falls off with distance from the
object, as show n by the progressively shorter
vector lines toward the grid perimeter.
10. Add
Crowd (page 2–1038)
and
Delegate
helper
objects.
11. Select the Crowd object and open the Modify
panel.
12. In the Setup rollout > Behaviors group, click
New .
13. In the Select Behavior Type dialog that is
displayed, choose Space Warp Behavior, and
then click OK.
14. In the Space Warp Behavior rollout that
appears, click the button (initial ly labeled
None),andtheninaviewport,clickthe
Ve c t o r Fi e l d s p a c e w a r p .
Tip: You might find it e asier to use Select By
Name to select the space warp.
15. In the Setup rollout, click the Behavior
Assignments button, and use the
Behavior
Assignments And Teams dialog (page 2–1052)
to assig n your delegate or delegates to the space
warp behavior.