Houdini 20.5 Nodes Geometry nodes

Crowd MotionPath Avoid geometry node

Deforms motion paths to avoid other agents and obstacles.

On this page
Since 20.0

This SOP applies an anticipatory avoidance model to deform motion paths to avoid future collisions with other agents or obstacles. This can be useful for resolving collisions in an automated manner. For precise control over individual agents' paths, use Crowd MotionPath Follow or Crowd MotionPath Edit.

The collisionignore and collisiongroup string attributes can be used to filter the avoidance behavior between paths. These attributes can either be specified as point attributes on the agents (matching POP Steer Avoid) or as primitive attributes on the motion paths. If a path’s collisionignore string pattern matches the collisiongroup of a neighboring path, the agent does not attempt to avoid the neighboring path. Since the collisionignore attribute can have a different value for each path, the neighboring path could still be configured to avoid the agent.

See SOP motion paths for more information on the SOP Crowds MotionPath toolset.

Parameters

Group

The motion paths that are deformed to avoid other agents and obstacles.

Particle Scale Multiplier

The agent’s pscale point attribute is used as the agent’s size for collision detection. This parameter scales the value of pscale in the calculation, allowing agents to be more or less tightly packed. This parameter can be overridden by a pscalemultiplier point attribute on the agent.

Visualize Particle Scale

When turned on, guide geometry is displayed to visualize the collision radius of each agent.

Avoidance

Avoidance

When turned on, avoidance is applied to the motion paths.

Tip

When Avoidance is turned off, collision detection (for example, generating the Collision Point Group) is still performed, so this can be used to detect existing collisions without deforming the paths.

Iterations

The number of avoidance iterations to apply.

Tip

Applying additional avoidance iterations may resolve the remaining collisions from prior iterations. However, later iterations may have little effect if, for example, the Steering parameters such as Max Turn Rate are too restrictive.

Max Collision Time

The maximum time to start avoiding potential collisions against neighbors or obstacles.

Neighbors

Neighbors

When turned on, performs avoidance between neighboring agents.

Neighbor Distance

The maximum distance an agent searches for nearby agents when anticipating collisions.

Max Neighbors

The maximum number of nearby agents to consider when anticipating collisions.

Obstacles

The parameters in this section are available when there is geometry connected to the Obstacles input.

Obstacles

When turned on, performs avoidance between agents and geometry from the Obstacles input.

Obstacle Distance

The maximum distance an agent searches for obstacles when anticipating collisions.

Collision Padding

An additional padding distance around the obstacle geometry. This can be used to control how close agents can be to the obstacle.

Horizontal FOV

The agent’s horizontal field of view (in degrees) when detecting obstacles.

Vertical FOV

The agent’s horizontal field of view (in degrees) when detecting obstacles.

Ray Samples

The number of raycasts to perform within the agent’s field of view when detecting obstacles. A higher number provides more accurate results at the cost of performance.

Samples Seed

When the Horizontal FOV and Vertical FOV are both non-zero, the Ray Samples are sent in randomly sampled directions within the FOV cone. This controls the random seed for the sampling.

Time Dependent

When turned on, the Obstacles input is cooked for each frame in the motion path’s time range. This allows the obstacle avoidance to be evaluated against time-dependent geometry.

Steering

Steering Mode

Specifies how the agent’s orientation can change.

2D

The agent can only be steered around its up vector. The up vector is determined by combining the Reference Up vector with the path’s transform attribute.

3D

The agent can be steered in any direction.

Speed Threshold

Specifies the minimum speed at which steering changes can be applied. This can prevent agents from spinning around while at a low speed.

Max Initial Rotation

When turned on, allows the motion path’s initial point to be immediately rotated by up to this angle (in degrees) from its original direction, regardless of the Max Turn Rate and other steering limits. This can be effective for avoiding collisions near the beginning of the motion path by changing the path’s initial direction, rather than requiring the steering limits to be less restrictive (which affects the entire path’s motion).

Max Turn Rate

Specifies how quickly the agent can change its orientation (in degrees per second) by rotating about its up axis.

Turn Stiffness

When turned on, the agent’s turning follows 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. Turn Stiffness controls how quickly the agent accelerates based on the angle from its target direction, and Max Turn Rate provides an upper limit for the angular velocity.

Turn Damping

When Turn Stiffness is turned on, this is the damping for the angular spring. Larger values will avoid oscillation.

Goal Position Weight

Controls the importance of steering the agent towards the Goal Position. If the value is 0, the motion path is entirely steered based on avoidance and does not have a target destination.

Goal Position

Specifies the target position to steer the agent towards when the Goal Position Weight is non-zero.

Original End Point

Steers the agent to the original end position of its motion path. This produces more gradual steering changes than targeting the Original Path, but the agents will not follow their input motion paths as closely.

Original Path

Steers the agent back to its original motion path, within the Distance Variance.

Distance Variance

The maximum difference between an agent’s original and current distance to the curve. Small values force an agent to maintain its original distance to the curve, but may involve more abrupt changes in the agent’s motion.

This parameter is only available when the Goal Position parameter is set to Original Path.

Collision Detection

Visualize Collisions

When turned on, highlights any points that are still colliding after applying avoidance.

Collision Point Group

When turned on, creates a point group containing any points on the motion paths in the Group that are still colliding after applying avoidance. This can be used for visualization or for determining the paths that should be edited further to resolve the collisions.

Advanced

Substeps

The number of substeps to use for avoidance and collision detection. Increasing the number of substeps may provide higher quality results, but incurs a performance cost.

Start Frame

The first frame at which avoidance is applied. When turned on, applies avoidance to a specific time range of the motion paths.

End Frame

The last frame at which avoidance is applied. When turned on, applies avoidance to a specific time range of the motion paths.

Reference Up

The original up vector of the agent. This is combined with the path’s transform attribute to determine the axis that the agent is steered around when the Steering Mode is 2D.

Inputs

Motion Paths

Polyline curves representing the paths of the agents over a time range.

Agents

A crowd of agents whose motion is represented by the Motion Paths.

Obstacles

Obstacle geometry that the motion paths should be deformed to avoid.

Outputs

Motion Paths

Polyline curves representing the paths of the agents over a time range.

Agents

A crowd of agents whose motion is represented by the Motion Paths.

Examples

MotionPathAvoidanceFiltering

This example demonstrates how the Crowd MotionPath Avoid SOP can be used to apply avoidance between neighboring agents and against obstacles, and also uses the collisionignore attribute to build more complex avoidance rules and collision filtering between different groups of agents.

See also

Geometry nodes