How Action Sources Are Used in the Crowd Simulation

 
 
 

When you load a model into a crowd simulation, you must also load its action sources as described in Loading Action Sources. Several things are then set up in the Crowd model and the simulation point cloud's ICE trees so that the animation from those action sources can be used on the actors in the crowd simulation: the following is a general outline.

Note

You can get also direct access to action sources in the ICE tree without needing to load them and create pose states. You may want to do this if you're using action states to animate specific deformers in the rig proxy. This requires more ICE knowledge than using pose states, but also offers you more control. See Modifying Deformer Transformations with Action States for information.

Converting the Action Source Data to a Point Cloud

When you load the action sources, a point cloud for each source is created in the Animation Proxies node in the Crowd model. The local transform data that is in each original action source is stored in this point cloud as global transform data on every deformer in the actor's rig proxy at each frame (see Modifying the Actor's Rig). These point clouds also set certain ICE attributes on the actions so they can be used in the ICE trees for the crowd simulation.

Getting the Action Source Data into ICE

Each point cloud generated from a loaded action source is referenced in the Get Animation Sources ICE tree of the simulation point cloud. The point clouds are connected in the ICE tree in the order in which the action sources were loaded from the CrowdFX Actor Proxy Property Editor. This order sets their ID, starting at 0. If these actions are locomotion type actions, they should be in top-down order from slowest to fastest. By default, only three action sources are used in pedestrian crowds, but you can add more as described in Adding More Action Sources and Pose States.

Initializing the Action Source Data

Once the action sources are in the ICE tree, their data is initialized in the simulation point cloud's Emit ICE tree.

For locomotion-type simulations, this is done in the Initialize Locomotion Data compound. Here you can set the initial pose state and frame of animation to use, the minimum speed needed to switch to a particular action (pose state), and over how many frames you want to transition into an pose state.

For stadium-type simulations, this is done in the Initialize Stadium Data compound. Like locomotion simulations, you can also set the initial pose state and initial frame of animation to use, but speed is not used for switching pose states.

See Controlling the Actor's Animation for more information.

Creating a Pose State for Each Action Source

In the simulation point cloud's Skeleton Simulation ICE tree, the action sources you loaded are referenced inside the Set Locomotion or Set Stadium Animation compounds as pose states.

One Pose State compound is created for each loaded action source: three pose states are created for pedestrian simulations, and one pose state for stadium simulations. Each pose is given a Pose State ID (starting at 0) to match the order in which they were loaded.

If you have loaded more action sources than the default number, you can add more pose states, then adjust the logic used for switching between them. For pedestrian simulations, switching between pose states is based on speed by default, but you can alter that logic as you like. For stadium simulations, only one pose state is used, but you can add more pose states and then set up the logic to switch between them as you like. See Adding More Action Sources and Pose States for more information.

In each Pose State compound, you can determine how that pose state blends in with the previous one - see Blending between Pose States.