Houdini 22.0 Nodes Dynamics nodes

Crowd Trigger 2.0 dynamics node

Defines a crowd trigger.

On this page
Since 14.5

This node defines a trigger or event that will cause the agents to change their state. If the trigger evaluates to true, the Crowd Transition SOP is activated.

A custom trigger can be implemented using the Custom VEXpression and Animated Parameter trigger types.

A user-defined asset can also be used as a trigger if it has a triggerattrib parameter specifying the name of the point attribute that contains its trigger value.

Parameters

Group

When turned on, processes the trigger for the specified group of agents.

Guide

When turned on, shows the guide geometry for this node.

Note

Even if the guide geometry is turned on here, it can be turned off by using the hidden flag on the DOP node.

This parameter is available when Type is not set to one of Object*.

Type

Specifies what the trigger is based on (for example, object attribute, particle speed, time).

Object Bounds

Checks if the agents are bounded by an object.

Object Attribute

Reads an attribute from the specified DOP object and performs a comparison.

Object Distance (position)

Checks the distance between the agents and the specified DOP object.

Object Distance (pointcloud)

Checks the distance between the agent and a point cloud specified by the DOP object.

Object Raycast

Checks if the agent raycast hits the object. A single ray is sent along the Reference Direction from the point representing the agent.

Particle Speed

Compares the particle/agent speed against the given value.

Particle Proximity

Checks if another particle/agent is within the given proximity. Can also check if the particle belongs to the same groups.

Particle Attribute Lookup

Reads the specified particle/agent attribute and performs a comparison.

Particle Attribute Comparison

Compares the attribute values on particles/agents within a search radius.

Time (Current)

Compares the current scene time against a given value.

Current State Duration

Checks how long the particle/agent has been in the current state.

Animated Parameter

Lets you animate a parameter to create a trigger.

Custom VEXpression

Lets you write custom wrangle code to determine when to fire the trigger.

RBD Impact Data

Activates the trigger if the RBD impact data is greater than the threshold.

Animation Clip Loops

Activates the trigger based on the number of times the agent’s current animation clip has looped around.

Look At Target

Activates the trigger based on the agent’s current look at target.

RBD Sticky Collisions

Activates the trigger based on the number of sticky collision occurrences.

Trigger Name

The name of the trigger. This must be unique, as each Crowd Trigger DOP creates its own crowdtrigger_triggername attribute.

Fuzzy Logic Output

When turned on, the trigger produces a float value rather than a boolean value. The float value is the actual value for a trigger that is used to determine whether to transition the crowd state rather than the boolean value you would get from making a comparison. For example, for the Object Distance trigger, the particle’s distance from the object would be the float value produced by the trigger.

Turn this on if you are wiring the Crowd Trigger DOP into a Crowd Fuzzy Logic DOP as an input to a fuzzy logic network.

This parameter is not available when Type is set to the following - Object Bounds, Object Raycast, Particle Attribute Comparison, Custom VEXpression, RBD Impact Data, Look At Target, and RBD Sticky Collisions.

Object Bounds

These parameters are available when Type is set to Object Bounds.

Object Source

Specifies where the object geometry comes from.

SOP

Use the geometry from the SOP in the Object SOP Path parameter.

DOP Data

Use the geometry of a DOP object in this simulation.

Object SOP Path

When Object Source is set to SOP, this is the path to the SOP to use as a bounding object for the agents.

Bounding Object

When Object Source is set to DOP Data, this is the name of the DOP object to use as a bounding object for the agents.

Check

Specifies how the trigger activates based on whether the agent is inside the bounding object.

Incoming

Activates the trigger if the agent is going inside the bounding shape.

Outgoing

Activates the trigger if the agent is going outside the bounding shape.

Continuous

Activates the trigger as long as the agent is inside the bounding shape.

Object Attribute

These parameters are available when Type is set to Object Attribute.

Object Source

Specifies where the object geometry comes from.

SOP

Use the geometry from the SOP in the Object SOP Path parameter.

DOP Data

Use the geometry of a DOP object in this simulation.

Object SOP Path

When Object Source is set to SOP, this is the path to the SOP to read the attribute from.

Attribute Object

When Object Source is set to DOP Data, this is the name of the object to read the attribute from.

Attribute Name (float)

The name of the attribute to read.

Search Radius

The distance the agent searches to find the closest point on the object.

Comparison

The type of comparison to make.

Less Than

Activates the trigger when the attribute value is less than Comparison Value.

Equal

Activates the trigger when the attribute value is equal to Comparison Value.

Greater Than

Activates the trigger when the attribute value is greater than Comparison Value.

Comparison Value

The value to compare the attribute against.

Object Distance (position)

These parameters are available when Type is set to Object Distance (position).

Object Source

Specifies where the object geometry comes from.

SOP

Use the geometry from the SOP in the Object SOP Path parameter.

DOP Data

Use the geometry of a DOP object in this simulation.

Object SOP Path

When Object Source is set to SOP, this is the path to the SOP to measure the distance to.

Position Object

When Object Source is set to DOP Data, this is the name of the DOP object.

Distance To

Use the distance from the agent to the Centroid or Closest Point of the object’s geometry.

Comparison

The type of comparison to make.

Less Than

Activates the trigger when the distance is less than Comparison Distance.

Equal

Activates the trigger when the distance is equal to Comparison Distance.

Greater Than

Activates the trigger when the distance is greater than Comparison Distance.

Comparison Distance

The distance to compare against.

Object Distance (pointcloud)

These parameters are available when Type is set to Object Distance (pointcloud).

Object Source

Specifies where the object geometry comes from.

SOP

Use the geometry from the SOP in the Object SOP Path parameter.

DOP Data

Use the geometry of a DOP object in this simulation.

Object SOP Path

When Object Source is set to SOP, this is the path to the SOP that contains the point cloud.

Pointcloud Object

When Object Source is set to DOP Data, this is the name of the DOP object that contains the point cloud.

Search Distance

The distance the agent searches.

Comparison

The type of comparison to make.

Less Than

Activates the trigger when the distance is less than Comparison Distance.

Equal

Activates the trigger when the distance is equal to Comparison Distance.

Greater Than

Activates the trigger when the distance is greater than Comparison Distance.

Comparison Distance

The distance to compare against.

Object Raycast

These parameters are available when Type is set to Object Raycast.

Object Source

Specifies where the object geometry comes from.

SOP

Use the geometry from the SOP in the Object SOP Path parameter.

DOP Data

Use the geometry of a DOP object in this simulation.

Object SOP Path

When Object Source is set to SOP, this is the path to the SOP to cast rays against.

Raycast Object

When Object Source is set to DOP Data, this is the name of the DOP object.

Ray Direction

Specifies whether to cast a ray in the direction of the agent’s velocity (Agent Velocity) or its current facing direction (Agent Orientation).

Reference Direction

When Ray Direction is set to Agent Orientation, this is the original direction of the agent. The Reference Direction is transformed by the agent’s current orientation to determine the ray direction.

Raycast Length

The maximum distance to look for the hit.

Raycast

Specifies how the trigger activates based on the ray cast.

Hit

Activates the trigger when the object is hit.

No Hit

Activates the trigger when the object is not hit.

Particle Speed

These parameters are available when Type is set to Particle Speed.

Angular Speed

When turned on, uses the angular speed, in degrees per second, computed from the previousorient and orient attributes. The Crowd Solver DOP creates the previousorient attribute when its Agent Angular Speed parameter is turned on.

Comparison

The type of comparison to make.

Less Than

Activates the trigger when the agent’s speed is less than Speed.

Equal

Activates the trigger when the agent’s speed is equal to Speed.

Greater Than

Activates the trigger when the agent’s speed is greater than Speed.

Speed

The value to compare against the agent’s speed.

Particle Proximity

These parameters are available when Type is set to Particle Proximity.

Search Radius

The distance the particle/agent looks for another particle/agent.

Field of View

When turned on, the particle/agent looks within the specified field of view (in degrees) relative to the agent’s heading vector. Particles outside the field of view are ignored. A value of 90 degrees means the field of view covers 45 degrees on either side of the heading vector.

Ignore Same Partition

When turned on, ignores any particles/agents that have the same value for the Partition Attribute as this agent.

Partition Attribute

When Ignore Same Partition is turned on, this is the name of a string point attribute. Agents will ignore nearby agents that have the same value for this attribute.

Particle Attribute Lookup

These parameters are available when Type is set to Particle Attribute Lookup.

Attribute Name

The name of the attribute.

Array Index

When turned on and the attribute is an array type, reads the value from the specified index in the array.

Comparison

The type of comparison to make.

Less Than

Activates the trigger when the attribute value is less than Comparison Value.

Equal

Activates the trigger when the attribute value is equal to Comparison Value.

Greater Than

Activates the trigger when the attribute value is greater than Comparison Value.

None

Uses the attribute value as the trigger value without a comparison. An integer value greater than 0 activates the trigger.

Comparison Value

When Comparison is set to Less Than, Equal, or Greater Than, this is the value to compare against.

Particle Attribute Comparison

These parameters are available when Type is set to Particle Attribute Comparison.

Attribute Name

The name of the attribute.

Search Radius

The distance the particle/agent looks for another particle/agent.

Comparison

The type of comparison to make.

Less Than

Activates the trigger when the agent’s attribute value is less than the other agent’s attribute value.

Equal

Activates the trigger when the agent’s attribute value is equal to the other agent’s attribute value.

Greater Than

Activates the trigger when the agent’s attribute value is greater than the other agent’s attribute value.

Ignore Same Partition

When turned on, ignores any particles/agents that have the same value for the Partition Attribute as this agent.

Partition Attribute

When Ignore Same Partition is turned on, this is the name of a string point attribute. Agents will ignore nearby agents that have the same value for this attribute.

Time (Current)

These parameters are available when Type is set to Time (Current).

Units

Compares the time using Frames or Seconds.

Comparison

The type of comparison to make.

Less Than

Activates the trigger when the time is less than Playback Time.

Equal

Activates the trigger when the time is equal to Playback Time.

Greater Than

Activates the trigger when the time is greater than Playback Time.

Playback Time

The value to compare against the current scene time, using the time units from the Units parameter.

Random Offset

The random amount added to the compared value.

Current State Duration

These parameters are available when Type is set to Current State Duration.

Units

Compares the duration using Frames or Seconds.

Comparison

The type of comparison to make.

Less Than

Activates the trigger when the duration is less than Duration.

Equal

Activates the trigger when the duration is equal to Duration.

Greater Than

Activates the trigger when the duration is greater than Duration.

Duration

The duration value to compare against.

Animated Parameter

This parameter is available when Type is set to Animated Parameter.

Value

The value to animate (int).

Custom VEXpression

These parameters are available when Type is set to Custom VEXpression.

Parameters

VEXpression

The VEX code that runs on each agent to calculate the trigger value. Set i@trigger to a value greater than 0 to activate the trigger. A value of 0 or less keeps the trigger inactive.

Inputs

Input 1, 2, 3, 4

Controls the four virtual inputs accessible inside VOPs. They can be accessed with the OpInput1-4 wires from the VOP, or the @OpInput1-4 string parameters when using VEXpressions. They can also be accessed numerically as 0-3 with VEX functions that take an input number.

None

No geometry is wired to this input.

SOP

The SOP geometry is cooked prior to running VEX and the result is wired to this input.

DOP Data

The data in the current simulation to reference, specified as an object/data. For example, pyro1/vel refers to the velocity field of the pyro1 object (which will show up as three volume primitives).

Myself

Binds the input to a copy of the geometry being processed. This allows querying of the original version of the geometry using VEX geometry functions (for example, point()).

Nth Context Geometry

Refers to the SOPs wired into the parent DOP network itself.

Myself (No Reads of Outputs)

Binds the input to the geometry being processed, operating in-place rather than on a copy of the geometry. This can be more efficient than Myself, but has additional restrictions - because VEX is multithreaded, it is not permitted to read from input geometry attributes that are bound for writing.

For example, the following code will produce an error if the first input is bound to Myself (No Reads of Outputs):

@P = point(0, "P", 0); 

SOP Path

When the input is set to SOP, this is the path to a SOP to wire in.

DOP Data

When the input is set to DOP Data, this is the object/data path of a piece of DOP data in THIS simulation to wire in. If Use This Object’s Data is turned on, this specifies the data path for the data attached to the currently solved object.

Use This Object’s Data

When turned on, the DOP Data specifies the name of the data attached to the currently solved object. If the referenced data is the geometry being currently processed, a copy is made (similar to the Myself binding option).

Bindings

Evaluation Node Path

The path to start the path search. VEX functions like ch() usually evaluate with respect to this node. This is useful when embedding in a digital asset, where you want to specify the top level digital asset to be the search root.

RBD Impact Data

These parameters are available when Type is set to RBD Impact Data.

DOP Impact Objects

The objects to consider for impacts.

Impact Threshold

The magnitude of the impact required to activate the trigger.

Transform Group

The name of a transform group that specifies a subset of joints in the agent’s rig to detect for impacts.

Animation Clip Loops

These parameters are available when Type is set to Animation Clip Loops.

Comparison

Specifies how to compare the agent’s current number of clip loops against the target Number of Loops.

Less Than

Activates the trigger when the agent’s current number of clip loops is less than Number of Loops.

Equal

Activates the trigger when the agent’s current number of clip loops is equal to Number of Loops.

Greater Than

Activates the trigger when the agent’s current number of clip loops is greater than Number of Loops.

Number of Loops

The number of loops to compare against.

Look At Target

These parameters are available when Type is set to Look At Target.

Target Names

A name or pattern of target names for which to active the trigger. The name of a target is set in the Agent Look At DOP’s Target Name parameter.

Target Point Group

If the Agent Look At DOP’s Target Type is Points or Agents, the trigger is only activated if the target point or target agent is in the specified point group.

Gaze Duration

When turned on, the trigger is activated by comparing this value against the time that the agent has been looking at its current target.

Units

When Gaze Duration is turned on, compares the duration using Frames or Seconds.

Comparison

When Gaze Duration is turned on, this is the type of comparison to make.

Less Than

Activates the trigger when the time that the agent has been looking at its current target is less than Gaze Duration.

Equal

Activates the trigger when the time that the agent has been looking at its current target is equal to Gaze Duration.

Greater Than

Activates the trigger when the time that the agent has been looking at its current target is greater than Gaze Duration.

RBD Sticky Collisions

These parameters are available when Type is set to RBD Sticky Collisions.

Transform Group

The name of a transform group that specifies a subset of joints in the agent’s rig that sticky collisions are counted for. If not specified, collisions against any of the agent’s shapes are counted.

Comparison

Specifies how to compare the agent’s current number of sticky collisions against the target Number of Sticky Collisions.

Less Than

Activates the trigger when the agent’s current number of sticky collisions is less than Number of Sticky Collisions.

Equal

Activates the trigger when the agent’s current number of sticky collisions is equal to Number of Sticky Collisions.

Greater Than

Activates the trigger when the agent’s current number of sticky collisions is greater than Number of Sticky Collisions.

Number of Sticky Collisions

The number of collisions to compare against.

Inputs

None

Outputs

Crowd Transition, Crowd Trigger Logic

Examples

CrowdTriggers Example for Crowd Trigger dynamics node

This example file demonstrates how the built-in trigger types for the Crowd Trigger DOP can be used.

See also

Dynamics nodes