8

1022 Chapter 14: Character Studio
In technical terms, cognitive controllers let
you influence crowd simulations with scripted
conditionals, effectively implementing a form
of artificial intelligence. You use the
Cognitive
Cont roller editor (page 2–1057)
,aflowchart-style
editor (much like the
Motion Flow Graph dialog
(page 2–897)
)tosetupanetworkofbehaviorsand
behavior combinations, known as states. Then
you then apply MAXScript-based transitions that
specify when delegates are to move from one state
to another. Even with a relatively simple setup, you
can create simulations that make your characters
appear to b e living , conscious beings, making
decisionsastheymovethroughthescene.
You can find procedures describing various
examples of cognitive-controller transitions in the
State Dialog (page 2–1059)
topic:
Testing a particle system parameter (page 2–1060)
Te s t i n g a n o b j e c t p o s i t i on
Testing an atmospheric proper ty (p age 2–1060)
Testing the distance between two objects
Te s t i n g a m o d i fi e r p a r a m e te r
Testing another delegate’s behavior (page 2–1061)
Youcanalsofindatutorialonusingthecognitive
controller in the
character studio Tutorials
,in
the lesson Working with Crowd Animation >
Applying Logic to Crowd Behavior.
Procedure
To set up and use a cognitive controller:
This procedure describes a typical setup routine
for creating and using a cognitive controller. The
procedure assumes basic knowledge of crowd
simulation setup. For more information about
crowd setup, see
Crowd Helper Object (page
2–1038)
and
Setup Rollout (page 2–1039)
.
1. Create a scene con taining a crowd object and
one or more delegates. See
Creating Crowd
Helpers (page 2–1008)
.
2. Create at least two behav iors. See
Assigning
Behaviors (page 2–1011)
.
3. Open the
Cognitive Controller editor
(page 2–1057)
.
4. Click the New button to create a cognitive
controller.
character studio gives the controller the
default name of Cognitive Controller. It’s
recommended that you give more descriptive
names to cognitive controllers, such as
"Seek/Wander". Do this by clicking on the
name in the text box and editing it from the
keyboard.
Creating a new cognitive controller
automatically places you in Create State mode.
5. Click in the editor window to create and place
a state. Continue clicking in different places to
addasmanystatesasnecessary.
6. Right-click a state to open the
State dialog (page
2–1059)
.
7. Again, it’s recommended that you give more
descriptive names to states, w hich you can
dointheStatedialog. Clickthename(State
or State#) in the text box and edit it from the
keyboard.
Next, define a behavior or behaviors for each
state.
8. Click the Add button.
9. In the Select Behaviors dialog, choose one or
more behaviors.
Ifyouchoosemultiplebehaviors,youcan
specify different weights for each in the State
editor. For example, y ou can combine a Seek
behavior at full weight with a Wander behavior