Houdini 20.5 Nodes Dynamics nodes

Crowd Solver 3.0 dynamics node

Updates agents according to their steer forces and animation clips.

On this page
Since 15.5

Parameters

Particle Motion

Velocity

Controls how the agent’s velocity can be manipulated by the solver.

Max Force

Specifies the maximum force that can be applied to the agent. This parameter can be overridden by a maxforce point attribute.

Drag

Specifies the strength of a drag that is applied to the agent’s velocity.

Constrain by Max Turn Rate

When turned on, the Max Turn Rate and Min Speed parameters will be used to limit how quickly the agent’s velocity can change direction. This can prevent agents from sliding sideways or backwards when a strong force is applied.

Project Forces

When turned on, forces will be projected onto the plane defined by the agent’s up vector. This can be used to prevent 3D forces from causing agents to move vertically.

Orientation Update

Controls how the agent’s orientation is updated based on its v and up vectors.

Min Speed

Specifies the agent’s minimum speed before its orientation can change. This can prevent agents from spinning around while at a low speed.

Max Turn Rate

Specifies how quickly the agent can change its orientation (in degrees per second) by rotating about its up axis. This parameter can be overridden by a maxturnrate point attribute.

Constrain Turn Acceleration

When turned on, the agent’s turning will follow a damped angular spring, where its acceleration varies based on the angle from the target direction and the current turn rate. This prevents sharp changes to the agent’s orientation or turn rate, while still allowing the agent to adjust quickly to large changes in its target direction. The Max Turn Rate and Max Acceleration parameters provide upper limits for the angular velocity and acceleration, respectively.

Turn Stiffness

Controls how quickly the agent accelerates based on the angle from its target direction.

This parameter is only available when Constrain Turn Acceleration is turned on.

Turn Damping

Specifies the damping for the angular spring. Larger values will avoid oscillation.

This parameter is only available when Constrain Turn Acceleration is turned on.

Max Acceleration

Specifies the maximum angular acceleration of the agent when turning.

Max Tilt Rate

Specifies how quickly the agent’s up vector can rotate (in degrees per second). This parameter can be overridden by a maxtiltrate point attribute.

Constrain Tilt Acceleration

When turned on, the agent’s tilting will follow a damped angular spring, where its acceleration varies based on the angle from the target up vector and the current tilt rate. This can produce significantly smoother motion when, for example, adjusting the agent’s up vector to follow the terrain normal.

Tilt Stiffness

Controls how quickly the agent accelerates based on the angle from its target up vector.

This parameter is only available when Constrain Tilt Acceleration is turned on.

Tilt Damping

Specifies the damping for the angular spring. Larger values will avoid oscillation.

This parameter is only available when Constrain Tilt Acceleration is turned on.

Max Acceleration

Specifies the maximum angular acceleration of the agent when tilting.

Adjust Up Vector

Specifies how the solver should adjust the agent’s up vector during the simulation.

Unchanged

The solver will not modify the agent’s up point attribute.

Set Perpendicular to Velocity

Updates the up vector to remain perpendicular to the velocity vector. This may be useful for situations such as birds flying around in space.

Set to Terrain Normal

Updates the up vector to match the terrain normal. This requires that Enable Terrain Projection is turned on. This may be useful for situations such as insects crawling on walls.

Reference Direction

The agent’s axis, aligned to follow the velocity vector. For example, setting this to 1,0,0 will align the agent’s X-axis with its velocity.

Reference Up

The original up vector of the agent. This parameter is used with Reference Direction when updating the agent’s orientation.

Locomotion Constraint

Provides advanced controls for how agents with a locomotive animation clip follow the motion specified by the clip’s locomotion channel.

Strength

Specifies how strong of an influence the locomotion channel’s target velocity has on the particle’s velocity (equivalent to the Air Resistance of a drag force).

Sim Influence

Reduces the effect of other forces in the crowd simulation on locomotive agents.

Particle Update

Update Particles

Specifies whether the embedded POP solver is turned on. This should be turned off when using this solver as a microsolver.

Age Particles

The age attribute will be updated for each time step and the particles flagged for deletion if they exceed their life attribute.

Reap Particles

All particles with the dead attribute set to 1 will be deleted.

Avoidance

Enable Avoidance Force

When turned on, enables a force that causes the agents to avoid each other based on their anticipated time to collision.

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.

Agent Group

Specifies a subgroup of agents that are affected by the avoidance force.

Weight

Specifies the weight of the avoidance force. Higher values will cause the avoidance force to take precedence over other forces.

Particle Scale Multiplier

The node uses pscale as the size of each agent/particle when calculating potential collisions. You can use this parameter to scale the value of pscale in the calculation, allowing agents/particles to be more or less tightly packed. This parameter can be overridden by a pscalemultiplier point attribute.

Force Scale

Scaling factor for the strength of the avoidance force.

Anticipation Time

How far into the future an agent will look for possible collisions (this uses the current velocity to project the possible distance). The maximum distance that an agent considers another agent as a neighbor is the minimum of:

  • Agent’s current speed multiplied by the Anticipation Time

  • Neighbor Distance

Neighbor Distance

Maximum distance an agent searches for nearby agents.

Max Neighbors

Maximum number of nearest agent neighbors to consider when computing the agent avoidance force.

Look At

Controls how agents' heads are adjusted to look at targets created by Agent Look At nodes.

Apply Look Ats

When turned on, enables the skeleton adjustment for look ats.

Look At Solver

Specifies which solver is used to select a look at target and adjust the agent’s skeleton. This option is provided for compatibility with existing scenes.

Simple (Deprecated)

The above versions of Agent Look At Apply must be used in combination with the corresponding versions of Agent Look At.

Agent Group

Specifies a subgroup of agents that are affected.

Guide

When turned on, displays the guide geometry indicating each agent’s current target.

Minimum Target Score

When an agent needs to select a look at target, it selects the target with the highest interest score. The target scores are calculated according to the Target Score parameters on Agent Look At. If the highest target score is below the Minimum Target Score, the agent will not select a look at target. This ensures that only important targets grab the agents' attention, or that targets that are about to become ineligible (for example, leaving the agent’s field of view) will not be selected.

Choose one of the options on this parameter to specify how to determine the minimum target score for each agent:

Set Value

Use the Minimum Target Score value.

Set from Attribute

Overrides the Minimum Target Score with the value of the point attribute, Minimum Target Score Attribute.

Scale by Attribute

Multiplies the Minimum Target Score with the value of the point attribute, Minimum Target Score Attribute.

Minimum Target Score Attribute

The point attribute on the agent.

This parameter is only available when the Minimum Target Score mode is set to Set from Attribute or Scale by Attribute.

Number of Joints

Limits the number of joints you can adjust in the IK chain. This number includes the head joint. When turned off, the default behaviour is to include all of the joints between the Lower Back and Head joints defined with Agent Prep.

Head Turn Stiffness

Controls how quickly the head adjusts to match the look at direction. This behaves like the stiffness of a damped angular spring.

Head Rotation Weight

Controls how much the head joint rotates relative to other joints in the IK chain, based on the angle to the target. For example, reducing the head joint’s weight as the target angle increases allows the rest of the spine to be more involved for larger rotations.

Angle Range

Specifies the angles that match the start and end of the Weight Ramp. Outside this angle range, the ramp extends the first and last values.

Weight Scale

Scales the value of the Weight Ramp.

Weight Ramp

Sets the head joint’s rotation weight based on the angle to the target, multiplied by the Weight Scale. The Angle Range defines the ramp’s range (outside this range, the first and last values are extended).

Eye Turn Stiffness

Controls how quickly the eye joints adjust to match the look at direction. This behaves like the stiffness of a damped angular spring.

Eye Rotation Weight

Controls how much the eye joints rotate relative to other joints in the IK chain, based on the angle to the target. For example, reducing the eye joints' weights as the target angle increases allows the head and spine to rotate more.

Angle Range

Specifies the angles that match the start and end of the Weight Ramp. Outside this angle range, the ramp extends the first and last values.

Weight Scale

Scales the value of the Weight Ramp.

Weight Ramp

Sets the eye joints' rotation weights based on the angle to the target, multiplied by the Weight Scale. The Angle Range defines the ramp’s range (outside this range, the first and last values are extended).

Adjust Immediately on Initial Frame

When turned on, adjusts the head immediately on the initial frame (if necessary), instead of being limited by the maximum turn rate.

Output Attributes

Outputs additional attributes with information about the agent’s current target (if the agent has multiple head joints, only the first joint is considered). These attributes can be convenient for controlling forces or other behaviors based on the agent’s current target.

Tip

You can use the Crowd Trigger DOP to transition between states based on the agent’s current target.

Target Name

When turned on, creates a string point attribute containing the name of the agent’s current target. This value is empty if the agent does not have a current target.

Target Position

When turned on, creates a vector point attribute containing the position of the agent’s current target.

Target Score

When turned on, creates a float point attribute containing the interest score of the agent’s current target.

Terrain

Show Guide Geometry

When turned on, displays guide geometry indicating the positions of the lower limb joints and whether the feet are locked.

Scale

Adjusts the size of the guide geometry.

Locked Scale

Adjusts the Scale to indicate when the foot is locked.

Color

Specifies the color of the guide geometry. When Enable Foot Locking is turned on, the color ramp indicates when the ankle and toe joints are locked or blending out of the locked position.

Enable Foot Locking

When turned on, prevents the ankle and toe from sliding when the foot should be planted. The channels specified on the Agent Prep SOP are used to determine when the foot should be planted during the animation clip, as well as how to blend out of the locked position. This option also improves terrain adaptation for situations where the unadjusted foot position is above the terrain, since the solver can distinguish between when the foot should be planted and when the foot is actually supposed to be above the ground. This option may still be used if no terrain object is specified.

The optional agentterrainadaptation_footdown float array point attribute can be used to override the foot down values computed from the agent’s animation clips. The attribute is expected to contain a replacement foot down value for each entry in the agentrig_footchannels point attribute. This may be useful when applying terrain adaptation to cached agents.

Adjust Hips

When turned on, adjusts the position of the hips to ensure that the legs are not over-stretched when planting the feet on uneven terrain.

Hip Offset

Specifies an additional offset to shift the hips up or down.

Hip Shift Per Frame

When turned on, specifies how much the hips can be shifted by in a single frame. This can reduce sudden hip motion on uneven terrain.

Knee Damping Threshold (%)

When the distance from the upper leg to the target ankle position is greater than this percentage of the maximum leg length, the knee angle will be damped so that it smoothly approaches a 180 degree angle as the target ankle position is extended. This can prevent the knee from popping when the leg is almost fully extended.

Note

This can allow the leg to stretch slightly, as keeping the foot planted on the terrain is a higher priority.

Enable Terrain Projection

When turned on, projects the agent particles on the given terrain.

Agent Group

Specifies a subgroup of agents to apply the terrain projection to.

Source

Source for the terrain object (SOP path or DOP object).

SOP

Use the SOP specified in the SOP Path parameter.

DOP Data

Use the DOP specified in the DOP Object parameter.

First Context Geometry

Use the SOP connected to the DOP network’s first input.

Second Context Geometry

Use the SOP connected to the DOP network’s second input.

Third Context Geometry

Use the SOP connected to the DOP network’s third input.

Fourth Context Geometry

Use the SOP connected to the DOP network’s fourth input.

SOP Path

The path to the SOP (when the terrain source is set to SOP).

DOP Object

The DOP object to use as the terrain geometry (when the terrain source is set to DOP Data).

DOP Data

The data attached to the DOP Object (when the terrain source is set to DOP Data).

Terrain Group

The primitives in the terrain geometry to be used for ray intersections.

Mode

Controls the direction of the agent projection.

Direction Vector

Use the vector specified by the Direction parameter.

Up Attribute

Use the agent’s up attribute.

Direction

Direction of the agent projection when Mode is set to Direction Vector.

Sampling Method

Specifies whether to cast a single ray from the agent’s point (Particle), or cast a ray from each of the agent’s legs (Foot).

Sample From Agent’s Plane

When Sampling Method is set to Foot, projects the foot positions onto the plane defined by the agent’s position and the Direction vector before casting rays. This produces results that are consistent with the Particle sampling method if the agent is on flat terrain. If this option is turned off, the agent will be lowered by the average distance of each foot from the terrain.

Offset

Additional offset that will shift all the agents up or down.

Stick to Deforming Geometry

When turned on, records the primitive number and UVW coordinates where the agent was projected onto the terrain. If the terrain geometry is deforming, this allows the solver to move the agent to the corresponding position on the deformed geometry at the start of the next frame.

Enable Terrain Adaptation

When turned on, adjusts the agents' legs to conform to the terrain.

Agent Group

Specifies a subgroup of agents to apply terrain adaptation to.

Lean Angle Per Frame

When navigating uneven terrain, the agent can lean forward or backward. When turned on, this parameter specifies the maximum angle (in degrees) that the agent can tilt in a single frame.

Backward Lean

Specifies how far (in degrees) the agent can lean backward.

Forward Lean

Specifies how far (in degrees) the agent can lean forward.

Attributes

Provides options for creating attributes that may be useful when debugging a simulation.

Agent Speed

When turned on, creates an agentspeed point attribute that contains the agent’s current speed.

Agent Angular Speed

When turned on, creates an agentangularspeed point attribute that contains the agent’s current angular speed.

Substeps

Time Scale

An overall scale applied to the actual timestep. This parameter can be animated.

Min Substeps

The POP solver will always enforce this minimum number of substeps.

This should rarely need to be changed.

Max Substeps

The POP solver will not break the simulation down to more substeps than this value.

CFL Condition

CFL Condition is a factor used to automatically determine the substep size that the scene requires. The idea is to control the distance that a particle can travel in a given substep.

For example, when CFL Condition is set to 0.5, the solver will set the length of each substep such that no particle travels more than 50% of the size of the smallest particle in a substep.

Quantize to Max Substeps

When turned on, use substeps that divide up the frame by Max Substeps so that the time always lands on a multiple of 1/Max Substeps.

For example, if Max Substeps is set to 4, but the CFL Condition only requires 3 substeps, the solver will divide up the frame into 3 substeps, with the substeps located at multiples of 1/Max Substeps. One combination of the substep lengths could be 0.25, 0.5, and 0.25, with the frame divided up from 0-0.25, 0.25-0.75, and 0.75-1. The solver also takes into account the current state of the particles (particle size and velocity) when dividing the frame into substeps.

This option can be useful for re-using input geometry that has been cached to file at increments of 1/Max Substeps. For example, if your geometry is cached on disk at 4 substeps per frame, then you may want your simulation’s substeps to always land on a multiple of 0.25 so that you don’t have to interpolate the geometry.

Frames Before Solve

Delays the actual simulation for a specified number of frames after object creation. Steps such as terrain adaptation will still occur during these frames.

Examples

AnimatedStaticAgents Example for Crowd Solver dynamics node

This example file demonstrates how to set up “animated static” agents for the crowd solver. These agents follow SOP-level animation and can be used for avoidance or turned into ragdolls.

CrowdHeightField Example for Crowd Solver dynamics node

This example demonstrates using heightfields for terrain adaptation in the crowd solver, and for collisions against ragdolls in the Bullet solver.

CrowdStickyCollisions Example for Crowd Solver dynamics node

This example demonstrates using the Bullet solver’s sticky collisions to keep arrows attached to ragdolls after a collision.

FollowTerrain Example for Crowd Solver dynamics node

This example demonstrates how to set up a crowd simulation where agents are oriented to follow the terrain normal.

FootLocking Example for Crowd Solver dynamics node

This example demonstrates how to set up foot locking for an agent.

PartialRagdolls Example for Crowd Solver dynamics node

This example demonstrates how to set up a partial ragdoll, where a subset of the agent’s joints are simulated as active objects by the Bullet solver and the remaining joints are animated.

PinnedRagdolls Example for Crowd Solver dynamics node

This example demonstrates how to set up constraints to attach a ragdoll to an external object, and how to use motors to drive an active ragdoll with an animation clip.

RagdollFromMotionPaths

This examples demonstrates how to bring agents following SOP-level animation into the crowd solver. These agents can be used for avoidance with simulated agents, or turned into ragdolls.

Formation Crowd Example Example for Crowd Solver dynamics node

Crowd example showing a changing formation setup

The setup creates an army of agents. There are two paths created. Middle part of the army starts moving and then splits into two formations. One goes to the left, the other groups keeps marching forward and slowly changes formation to a wedge shape.

To keep the agents in formation a custom geo shape is used. It’s points are used as goals for indiviudal agents. Using blendshapes the shape can change allowing for different formation changes. Dive inside the crowdsource object to see the construction.

Stadium Crowd Example Example for Crowd Solver dynamics node

Crowd example showing a stadium setup

The setup creates a stadium crowd. The rotating cheer_bbox object is used as a bounding box for the agents. When they are inside it it will trigger a transition from a sitting to a cheering state. After a few seconds the cheering crowd sits back down by transitioning into a sitting state.

Tip

To only see a section of the crowd for quicker preview there’s a switch node in /obj/crowdsource/switch_all_subsection. When 0 it will show all agents, when set to 1 will only show a small section.

Street Crowd Example Example for Crowd Solver dynamics node

Crowd example showing a street setup with two agent groups

The setup creates two groups of agents. The yellow agents are zombies which follow a path of the street. The blue agents are living pedestrians that wander around until they come into proximity of the zombies and then they swtich into a running state.

Triggers to change agent states are setup in the crowd_sim dopnet. The zombies group uses proximity to the stoplights and the color of the light to transition into a standing state when lights are red. The living group transition into a running state when they get close to the zombie agents.

See also

Dynamics nodes