Houdini 20.0 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 will 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

Enables guide geometry to visualize the collision radius of each agent.

Avoidance

Enable Avoidance

Controls whether avoidance is applied to the motion paths.

Tip

Collision detection (for example, generating the Collision Point Group) is still performed when avoidance is disabled, 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 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 a future collision that is considered when anticipating collisions against neighbors or obstacles.

Neighbors

Enable Neighbors

Enables 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

Enable Obstacles

Enables avoidance between agents and geometry from the Obstacles input.

Obstacle Distance

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

Collision Padding

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

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.

Steering

Max Initial Rotation

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

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.

Goal Position Weight

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

Collision Detection

Visualize Collisions

Highlights any points which are still colliding after applying avoidance.

Collision Point Group

Creates a point group containing any points on the motion paths in the Group which are still colliding after applying avoidance. This can be used for visualization or to determine which paths should be further edited 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. This can be used to apply avoidance to a specific time range of the motion paths.

End Frame

The last frame at which avoidance is applied. This can be used to apply 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.

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