When you select a model to use as an actor in CrowdFX, you must select and load the action sources that it will use in the crowd simulation. The action sources must be defined in the source model's Mixer > Sources > Animation node so that you can load them. These action sources can be locomotion moving in global space, locomotion "in place" (such as a walk cycle that is done in the model's local space), or stationary (such as waving, standing, or sitting).
To load action sources for an actor:
There is a maximum of three actions that are used in the crowd simulation by default, but you can add more later. If you use fewer than three actions, you'll need to adjust the pose states in the ICE tree - see Working with Action Sources for more information on these issues.
Put the action sources in the Selected Actions list in top-down order, going from the slowest to fastest speed (for blending purposes).
If the actor has a deformer rig that is identical to another actor in the crowd simulation, they can share their action sources - see Sharing Action Sources Among Actors.
For more information about action sources, see How Action Sources Are Used in the Crowd Simulation and Working with Action Sources.
The Actor's Center of Gravity (COG) Deformer
The actor's COG (center of gravity) is a deformer in the actor's rig whose horizontal speed (in the global Z direction) is used for calculating the actor's velocity for locomotion in the simulation.
When you import action sources for an actor, the COG in the actor's rig is automatically determined as the deformer whose Position X value is closest to zero and is closest to the center of the actor mesh's bounding box, such as the hip deformer. If this isn't the correct deformer for your rig, you can assign a different deformer as the COG as described in Modifying the Actor's Rig.
For the default pedestrian model shown below, the default COG is the hip deformer.
Should You Use the COG or Not?
In the CrowdFX Actor Proxy Property Editor, you can select or deselect the Use Center of Gravity option depending on the type of animation in the action sources you're loading.
Loading Different Types of Actions Sources
If you're loading a mixture of animation types in several action sources, you need to load the animation in two passes. You can do this in two ways:
Select only the action sources of one type, such as only the locomotion types that are moving in global space.
Select or deselect the Use Center of Gravity option to match the type of animation you're loading.
Click the Selected button below the list to load only the selected actions.
After these are loaded, select the other types of action sources in the list, such as stationary and "in place" locomotion types.
Toggle the Use Center of Gravity option and click the Selected button again to load these actions.
Load only one type of action source into the Selected Actions list.
Select or deselect the Use Center of Gravity to match the type of animation you're loading.
Select those action sources and move them back to the Action Sources list (click the << button).
Load the other type of action sources into the Selected Actions list, toggle the Use Center of Gravity option to match the type of animation, and click the All Above button.
If you import action sources using the incorrect Use Center of Gravity option, you can always re-import the action sources, and the existing animations in the ICE tree will update correctly.
Using "Animated In Place" Locomotion Action Sources
When you load action sources that are moving in the Z direction in global space, the velocity computation is handled for you by CrowdFX. However, it's common that action sources contain animation cycles that are animated in the actor's local space, and don't move in global space. You can still use these types of action sources, but there are a few steps you need to do to be able to use them in CrowdFX.
Select the "in place" locomotion actions to load in the CrowdFX Actor Proxy Property Editor.
Deselect the Use Center of Gravity option, then load the action sources.
In the simulation point cloud's Emit ICE tree, plug the Set Horizontal Speed compound into the On Init port in the Initialize Locomotion Data compound.
In the Set Horizontal Speed compound, set the Cycle value for the corresponding action source that you have loaded. The Cycle numbers match the order of the actions in the simulation point cloud's Get Animation Sources ICE tree (see How Action Sources Are Used in the Crowd Simulation ).
The Cycle value is the number of Softimage units that the actor moves per second in the simulation, and needs to correspond to the cycle speed of the animation in the original action source. For example, if this value is too high, the actor's feet will slide in the simulation.
To help figure out the appropriate cycle speed, you can use the Get Actor Pose compound as described in Testing the Animation in an Action Source.