Houdini 20.5 Nodes Dynamics nodes

Crowd Transition 3.0 dynamics node

Defines a transition between crowd states.

On this page
Since 15.5

This node defines a transition from one crowd state to another. The input is a trigger that initiates the transition when its condition evaluates to true.

Clip Transition Graph

A clip transition graph can be used to control how transitions between animation clips are performed. It provides information about which clips are allowed to transition to each other, and where in the clips those transitions should occur. This can be used to delay clip transitions until an appropriate point in the current animation clip, and smoothly blend into the next clip at a time when the poses are similar. If the source and destination clips cannot directly transition to each other, a sequence of transitions can be performed using the intermediate clips along the shortest path to the destination clip.

Tip

The Test Simulation: Crowd Transition SOP can be used to quickly preview transitions between particular clips before setting up a crowd simulation.

Usage

The clip transition graph geometry can be explicitly provided to the Crowd Object DOP via the Clip Transition Graph parameter, allowing it to be used for any transitions in a crowd simulation.

Alternatively, the clip transition graph geometry can be stored in the agent definition as a shape named __transitiongraph__. This can be configured by using the second output of the Agent Clip Transition Graph SOP, which adds the clip transition graph to the input agent’s shape library.

Storing the clip transition graph in the agent definition avoids the need to carry a separate stream of geometry through the network. It also allows the transition graph to be easily cached to disk along with the agent definition’s shape library. This workflow is required by the Crowd MotionPath Transition SOP, and is also supported by the Crowd Object DOP when the clip transition graph geometry isn’t explicitly provided.

Tip

The transition graph geometry can be retrieved from the agent definition with the Agent Unpack SOP:

  1. Set Output to Rest Geometry.

  2. Set Unpack Shapes From to Shape Library.

  3. To unpack the shape, set Shapes to __transitiongraph__, and Iterations to 2.

  4. Optionally turn off Apply Agent Transform to avoid applying the input agent’s transform to the geometry. To avoid producing duplicate geometry if the input contains multiple agent primitives, turn on Limit to Unique Agent Definitions.

Attributes

Each point in the clip transition graph geometry represents an animation clip, and each two-point polygon represents a (one-way) transition between the clips.

Name Class Type Description
clipname point string

Specifies the name of an animation clip.

agentname point string

This string is matched with the agent’s agentname point attribute to avoid potential name conflicts if a crowd contains multiple agent definitions. For example, two different types of agents may both have a clip named “walk”.

blend_durations primitive float array

For each transition region, specifies the duration (in seconds) of any transitions that start in that region.

sync_points primitive vector2 array

For each transition region, specifies a pair of clip times (in seconds) where the two animation clips have a similar pose.

transition_regions primitive vector2 array

Specifies ranges of clip times (in seconds) for the first animation clip where a transition is allowed to occur.

Parameters

Group

Only affect a group of agents.

Input State

A string pattern that specifies the states to transition out of. The state names correspond to the State Name parameter on a Crowd State node. The pattern follows the same syntax as the match VEX function.

  • * matches all states.

  • * ^walk matches all states except for the walk state.

  • walk run_* matches the walk state and all states whose names begin with run_.

Output State

Name of the state to transition into. This corresponds to the State Name parameter on a Crowd State node.

Output Clip

When turned on, overrides the default clip selection with the specified clip when transitioning to the Output State. Normally, the output clip is chosen based on the output state’s Clip Assignment parameters.

The clip can be adjusted per-agent using VEXpressions.

Use VEXpressions

When turned on, uses a local expression to override the Input State, Output State, or Output Clip for each agent.

Max Random Delay

When turned on, specifies the maximum delay (in seconds) between when the trigger evaluates to true and when the transition begins. This is useful to avoid having many agents start the transition at the same time.

Random Seed

When Max Random Delay is turned on, this specifies the seed used when selecting a random delay time.

Use Clip Transition Graph

When turned on, the crowd object’s clip transition graph may optionally be used to control transitions between states and animation clips. This can be used to delay transitions until an appropriate point in the current animation clip, make use of intermediate transition clips, and provide information about how to smoothly blend into the new clip.

Additionally, the clip transition graph allows per-clip control over this behavior (which is useful if the Input State parameter specifies multiple states, or if Clip Assignment is set to Random Distribution for any of the input states).

Interrupt Active Transitions

When turned on, allows an active or pending transition to be interrupted in order for this transition to begin. For example, this can be useful for immediately switching into a ragdoll state after an impact occurs, regardless of whether an agent is in the middle of a transition.

Duration

Length of the transition between states (in seconds).

State Blend

Specifies how the crowd solver should blend between the Input State and Output State as the transition progresses.

Examples

ClipTransitionGraph

This example demonstrates how to use a clip transition graph to provide transition clips for state transitions.

See also

Dynamics nodes