9

1174 Chapter 14: character studio
choice of the next best clip for a given biped is
restricted by that biped’s currently active clip.
B iped Crowd Avoida nce, Pr ior i ty, and
Backtracking
Because bipeds in crowds are always following
motion flow scripts, the avoidance b ehavior
for bipeds works differently. Unlike ordinary
delegates, biped delegates can move only along
motion flow-scripted paths, so if a collision takes
place, the software will backtrack to the previous
clip in the current script and find another path.
Thismaytakesometimetocomputewhen
complex crowd inter actions are present since
asinglebacktrackmaynotbeenough. The
computationwillexploreallpathsfromagiven
backtr acking clip, and if that fails, it will backtrack
to the previous clip, and so on, until a solution is
found.
In the example, if the current script of a biped is:
walk_start
walk
walk_L90
and a collision is encountered during the walk_L90
clip, the biped will backtrack to the end of the walk
clip and attempt to try a di fferent clip in place of
the failed left turn. If that fails, it will try the next
best choice, and so on.
Tip: The inclusion of stopping and loitering
motions in the motion flow network is sometimes
helpful in preventing excessive backtracking
sincestoppingisalwaysaneffectivewaytoavoid
collisions in a tight situation. In general, the more
variation in speed and direction that is possible,
themorequicklythebacktrackingfeaturewillfind
asolution.
In order to make the backtracking computationally
manageable, the biped crowd members are
computed one at a time, in order of priority
(page 2–1235).Thus,thecrowdinteractionis
accumulated with each successive biped added to
the animation. In other words, each waits its turn
to compute its complete animation, which entails
avoiding the bipeds that have been computed
before it. It follows that bipeds with the lowest
priorities generally encounter the most collisions,
since they must steer around all the bipeds that
have higher priorities.
Pr epar i ng Char acter s for a Bi ped Cr owd
To create a biped crowd simulat ion, you will need
several bipeds. Because the crowd simulation
factors in each biped’s leg length when applying
clips to the biped, your simulation will be more
accurate if your bipeds are the correct size from
the start.
One straightforward workflow would be:
In a separate file, create or acquire a few
character models for your scene.
Skin the characters with Physique or with
another method, such as the 3ds Max Skin
modifier.
Clone the characters and change something
about each one, such as the color of clothing or
hair, and the character’s height. See Scaling a
Character (page 2–1100).
Giveeachcharacterauniquenamethatwill
allow you to identify it i n the simulation to
some degree. Example: BigMan02, LittleGirl03.
See Naming the Biped (page 2–847).
For each character, disable the MeshSmooth
modifier or other modifiers above Physique
that add p olygons.
Hide the character meshes and leave the bipeds
vi sible.
This setup makes it easy to merge the characters
into the crowd scene. When characters are merged,
the meshes themselves will be hidden, which will
improv e system performance.