Working with Action Sources

 
 
 

Once you have loaded the action sources for an actor, you can share them with other actors, test the animation inside them, and change or update them (see also Adding More Action Sources and Pose States).

Sharing Action Sources Among Actors

When you have multiple actors who have identical deformer rigs, they can share their action sources. For example, you could duplicate one model, then modify its envelope and material to create another one, but the actors still have identical rigs.

This way, you could keep all action sources in the Mixer node for one original model for easy management, and have all eligible actors in the crowd simulation access them.

To share action sources:

  1. Make sure that the actors who are sharing action sources have identical deformer rigs and are in the same crowd simulation.
  2. Open the Emit ICE tree for the simulation point cloud.
  3. In the Initialize Locomotion Data or Initialize Stadium Data compound's property page, select the Use Single Animation Sources option.
  4. From the Source list, select the actor proxy (based on its Actor ID - see Actor IDs) whose action sources you want to use for all other similarly-rigged actors in the same simulation.

Testing the Animation in an Action Source

You can find out the speed of the original animation that's stored in an action source. Among other things, this can help you find the appropriate cycle speed when working with action sources whose horizontal speed you need to set.

  1. Plug the Get Actor Pose compound into an ICE tree in the Post-Simulation region. This is so that you don't get the simulated version of the action source.

  2. Set the current frame on the timeline to the first frame of the crowd simulation.
  3. In the Get Actor Pose compound, set the Cycle Index to match the action source's Actor ID (0, 1, 2, etc.).
  4. Adjust the Frame value. You can go to a particular Frame value to check the animation there, or scrub the Frame value to see that the cycle and timing is correct.

Changing or Updating the Action Sources Used by an Actor

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:

  1. Open the CrowdFX Actor Proxy Property Editor for the actor whose action sources you want to change.
  2. Select the loaded action sources you want to remove from the Selected Actions list, and click the Move << button to move them to the Action Sources list. This just keeps it clear which sources you have loaded, but doesn't change anything in the ICE trees.
  3. Move the new action sources you want to load from the Action Sources list to the Selected Actions list.
  4. Select the new action sources in this list and click the Selected button to load it on the actor.
  5. In the simulation point cloud's Get Animation Sources ICE tree, unplug or delete the Get Data nodes for the removed action sources from the Get actor proxy Animations compound.

    Make sure that the new action sources are in the top-down order of slowest to fastest for locomotion type simulations.

    In this image, the "Running" action source is being removed and replaced with the newly-loaded "Jogging" action source.

  6. Right-click on the unused In Name port and choose Delete Port. This is removed so that "blank" data isn't added to the calculations done by the Load Actor Cycles compound under the hood.

    The "Jogging" action source can now be used by the actors.

  7. Make sure that the logic set in the simulation point cloud's other ICE trees works with the new action source you have loaded. Check the speed and duration data set for the new action sources in the Initialize Locomotion Data compound (see Controlling the Actor's Animation), as well as the Pose States and their IDs set in the Skeleton Simulation ICE tree (see How Action Sources Are Used in the Crowd Simulation).

Using Fewer than Three Action Sources?

If you're using fewer than three action sources for locomotion simulations, the actor may hold the last frame of the last-used action and not cycle properly because CrowdFX is set up to use three sources by default. Instead of adding another action source that you don't want to use, you can "fake" a third source in the Get Animation Sources ICE tree. Simply plug the last action source's Get Data node's output into the next available In Name port of the Get actor proxy Animations compound.