Houdini 20.0 Nodes Dynamics nodes

Crowd Trigger 2.0 dynamics node

Defines a Crowd Trigger

On this page
Since 14.5

Crowd Trigger defines a trigger or event that will cause the agents to change their state. If the trigger evaluates to true, this will cause the Crowd Transition node to activate.

A custom trigger can be implemented using the Custom VEXpression or 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

Only process the trigger for a group of agents.

Guide

If 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.

Type

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

Object Bounds

Check if the agents are bounded by an object.

Bounding Object

Name of the DOP object to use as a bounding object for the agents when Object Source is set to DOP Data.

Check

Incoming

Trigger if the agent is going inside the bounding shape.

Outgoing

Trigger if the agent is going outside the bounding shape.

Continuous

Trigger as long as the agent is inside.

Object Attribute

Read an attribute from the specified DOP object and perform a comparison.

Attribute Object

Name of the object to read the attribute from.

Attribute Name

Name of the attribute to read.

Search Radius

Distance the agent will search to find the closest point on the object.

Comparison

Type of comparison to be made.

Comparison Value

Value to compare the attribute against.

Object Distance (position)

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

Position Object

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

Type of comparison to be made.

Comparison Distance

Distance to compare against.

Object Distance (pointcloud)

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

Pointcloud Object

Name of the DOP object that contains the point cloud.

Search Radius

Distance the agent will search.

Comparison

Type of comparison to be made.

Comparison Distance

Distance to compare against.

Object Raycast

Check if the agent raycast hits the object. A single ray will be sent along the Reference Direction from the point representing the agent.

Raycast Object

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

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

Raycast Length

Maximum distance to look for the hit.

Raycast

Hit

Trigger will activate when the object is hit.

No Hit

Trigger will activate when the object is not hit.

Particle Speed

Compares the particle/agent speed against the given value.

Angular Speed

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

Comparison

Type of comparison to be made.

Speed

Value to compare against the agent speed.

Particle Proximity

Checks if another particle/agent is within the given proximity. Allows for checking if the particle belongs to the same groups.

Search Radius

Distance for the particle/agent to look for another.

Field of View

The size of the agent’s field of view, in degrees, relative to the agent’s heading vector. Particles outside of the field of view are ignored. A value of 90 degrees means that the field of view covers 45 degrees on either side of the heading vector.

Ignore Same Group

When turned on, ignores the particle/agent that belongs to the same group.

Group Attribute

The name of a string point attribute. Agents will ignore other nearby agents that have the same value for this attribute.

Particle Attribute Lookup

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

Attribute Name

Name of the attribute.

Array Index

If the attribute is an array type, specifies the index in the array to read the value from.

Comparison

Type of comparison to be made.

Comparison Value

Value to compare against.

Particle Attribute Comparison

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

Attribute Name

Name of the attribute.

Search Radius

Distance for the particle/agent to look for another.

Comparison

Type of comparison to be made.

Ignore Same Group

When turned on, ignores the particles/agents that belong to the same group.

Group Attribute

Attribute name that is used to hold the group name.

Time (Current)

Compares the current scene time against a given value.

Units

Specifies whether the Playback Time and Random Offset are in frames or seconds.

Comparison

Type of comparison to be made.

Playback Time

Value to compare against in seconds.

Random Offset

Random amount added to the compared value.

Current State Duration

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

Units

Specifies whether the Duration is in frames or seconds.

Comparison

Type of comparison to be made.

Duration

Value to compare against.

Animated Parameter

Lets the user animate a parameter to create a trigger.

Value

Value to be animated (int).

Custom VEXpression

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

Inputs

Input 1, 2, 3, 4

These control the four virtual inputs accessible inside of VOPs.

They can be accessed with the OpInput1-4 wires from the VOP, or with 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 will be cooked prior to running the VEX, and the result is wired to this input.

DOP Data

Data in the current simulation to reference. Specified as an object/data, for example, pyro1/vel to refer 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); 
Bindings

Evaluation Node Path

VEX functions like ch() usually evaluate with respect to this node. Providing a path here can override where the path search starts from. This is useful when embedding in a digital asset, where you would like the top level digital asset to be the search root.

RBD Impact Data

RBD impact data greater than the threshold will activate the trigger.

DOP Impact Objects

The objects to consider for impacts.

Impact Threshold

Magnitude of the impact that is required to activate the trigger.

Transform Group

The name of a transform group that specifies a subset of the joints in the agent’s rig that impacts should be detected for.

Animation Clip Loops

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

Comparison

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

Number of Loops

The number of loops to compare against.

Look At Target

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

Target Names

A name or pattern of target names for which the trigger should be activated. The name of a target is configured by the Target Name parameter on Agent Look At.

Target Point Group

If the Agent Look At 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

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

Units

Specifies whether the Gaze Duration is in frames or seconds.

Comparison

Type of comparison to be made.

RBD Sticky Collisions

Activates the trigger based on the number of other objects that a sticky collision has occurred with.

Transform Group

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

Comparison

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

Number of Sticky Collisions

The number of collisions to compare against.

Trigger Name

The name of the trigger. This must be unique, as each Crowd Trigger node 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.

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