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.
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.
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.
After you have created the crowd simulation with one or more actors, you can change the action sources used by the actors in the simulation. For example, when you selected the actor for the crowd simulation, you loaded a "running" action source. Now you want the actor to use a "jogging" action source instead. Or you have fixed up the animation in the original "running" action source so that it's better and now you want to use it instead of the "running" action source that's already loaded for the actor.
Basically, you need to remove the action source that's already loaded and bring in a new action source, as described here:
In this image, the "Running" action source is being removed and replaced with the newly-loaded "Jogging" action source.
After importing the Action Sources into the crowd system, you can use them in the Animation States.
When you expand the Animation Definition node, you can view the Define Animation State, Define Move Animation State, and Define Animation State Transition nodes. For example, in the following figure there are four different animation states (Idle, Move, Move_Zombie_Style_A, and Move_Zombie_Style_B). You can notice that the names of all these states are meaningful enough to understand the transition of actors from one state to another.
In the Define Animation State node, all the prerecorded animation states are imported directly from the ICE CrowdFX. From the Define Animation State window Name drop-down list, you can select the animation state of your choice.
Using the Pose Modifier element in the Define Animation State node, you can modify the existing prerecorded animations. You can also define blending between different animations (walking, standing, running, and so on) in one animation state.
After defining the state for each of your prerecorded animations, you need to define the transition between the animation states (from idle to move, move to run, and so on) and the duration of the transition. If you do not define any transition between states, then there will be a hard switch between these animation states.
The Define State Transition node in the Animation Blending tree enable you to define transition between states.
Double-clicking the Define State Transition node displays the Define State Transition window.
In this window, you can set the transition from Source state to Target state. In the Duration field, specify the transition time in number of frames.
In this way, you can define the capabilities of actors using the Animation Blending tree.
The Behavior ICE tree enables you to use the predefined animations by defining the behavior of actors. In the Behavior ICE tree, different environments are defined and conditions are set for the actors to respond to the defined environments.
To apply the behavior of animation states in the crowd system
In the Behavior ICE tree, double-click the Set Animation State compound.
In the Set Animation State property editor, select the new animation state (that you added in the Define Animation State node) from the State drop-down list.
The Animation State Selector node in the Behavior ICE tree enables you to choose different animation states between each transition. Double-clicking the Animation State Selector node displays the State Selector window.
The State drop-down list contains all the different animation states, with meaningful names, defined in the animation blending. This allows you to easily choose the animation state of your choice during each transition.
The Animation_Blending and the Behavior ICE trees clearly separate different parts of the ICE CrowdFX simulation. This enables you to easily define the animation states, transition between states, and control the behavior of actors by conveniently choosing the state of your choice during each transition.
The Action Sources are used in the Animation_Blending tree within the Animation States. You cannot directly use the Animation Sources in a crowd system, rather you should use only the Animation States. An Animation State references one or multiple Animation Sources.
You can use the Set Animation State Parameters node to define how the Animations Sources are used in an Animation State.
Set Set Animation State and Set Animation States Sequentially.
Except where otherwise noted, this work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 3.0 Unported License