8
Biped Crowds 1025
motionclips.Iftheclipsaremotioncaptured,you
should employ footstep extraction during import
in preparation for the bending operation. Adding
clips that turn slightly wi ll let the biped crowd
simulation make minute corrections in heading in
order to achieve goal locations more precisely.
Motion flow graphs that work best incorporate
fine-tuned transitions. A good way to check your
motion-flow transitions is by building test scripts
as y o u build the graph: Add clips to the graph,
add the necessary tr ansitions, and optimize t he
transitions. Optimizing t ransitions works well as a
starting point and, more often than not, produces
the smoothest transitions. Next, make a new script
that uses your transitions, and use the script to
tweak the motion flow until the feet don’t slide.
The Shared Motion Flow Networks feature lets
many bipeds use a single motion-flow network.
Therefore, it’s practical to make motion-flow
networks large without taxing your computer’s
memory.
Delegate-Dir ected B ehav ioral Goals
Youcangiveabipedabehavioralgoalby
associating it with a delegate in the Crowd system,
and then assigning behaviors to the delegate.
For example, in the
walkers.max
sample, the
behavioral goals of each of the biped’s delegates
are to:
• Move toward the sphere using the Seek
behavior.
• Avoid hitting each other using the Avoid
behavior.
During a biped crowd simulation, the software
attempts to compute the best motion flow script
for each biped member of the crowd that satisfies
the behavioral goals of its associated delegate. In
other words:
• The biped’s crowd delegate defines the
behavioral goals of the biped.
• The possible motions to reach those goals are
defined by the biped’s motion flow network.
• The Crowd object’s Solve operation computes
the script, or path through the motion flow
network,thatbestmeetsthegoalsofthebiped’s
delegate.
So in the
wal kers.max
sample, the simulation w ill
always choose the b est available walking clip in the
network that directs the biped’s delegate toward
the sphere. Each biped’s script evolves as the
crowd "Solve" computes. This is somewhat like a
real-time "game engine" in that the crowd solver’s
choice of the next best clip for a given biped is
restricted by that biped’s currently active clip.
B iped Crowd Avoidance, Pr i ori ty, a nd
Backtracking
Becausebipedsincrowdsarealwaysfollowing
motion flow scripts, the avoidance behavior
for bipeds works differently. Unlike ordinary
delegates, biped delegates can move only along
motion flow-scripted paths, so if a collision takes
place, the sof tware wil l
backtrack
to the previous
clip in the current script and find another path.
Thismaytakesometimetocomputewhen
complex crowd interactions are present since
asinglebacktrackmaynotbeenough. The
computation will explore all paths from a given
backtracking clip, and if that fails, it will backtrack
to the previous clip, and so on, until a solution is
found.
Intheexample,ifthecurrentscriptofabipedis:
walk_start
walk
walk_L90
and a collision is encounter ed during the
walk_L90
clip, the biped wil l backtrack to the end of the
walk
clip and attempt to try a different clip in place of
the failed left tur n. If that fails, it will try the next
best choice, and so on.