Houdini 20.5 Nodes Geometry nodes

Crowd MotionPath Follow geometry node

Deforms motion paths to follow guiding curves.

On this page
Since 20.0

This SOP deforms motion paths to follow the orientation of the curves provided in the Curves to Follow (third) input. This is useful for procedurally guiding the motion of many agents using a small number of guiding curves.

Agents follow the closest curve to their initial position, and track their current distance along the curve to avoid jumping to another part of a looping curve. If closed curves are provided, agents continue to follow the curve again after reaching the end of the curve.

Tip

The curves do not need to be polyline curves. They could also be NURBS or Bezier curves, which are more suitable for representing a smooth path to follow.

You can use the Curve SOP to draw smooth curves for this node.

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

Parameters

Group

The motion paths that are deformed to follow the guiding curves.

Curves

Curve Group

The curves from the Curves to Follow input that the agents follow.

Match by Attribute

When selecting a curve to follow, only considers curves for which the Curve Attribute matches the value of the Agent Attribute on the motion path or agent primitive. This can be useful for precisely controlling which curve each agent follows.

If Curve Attribute is turned off, the Agent Attribute is matched against the curves' primitive numbers. If there is no matching curve, the default behavior is used (select the closest curve to the motion path’s initial position).

Agent Attribute

When Match by Attribute is turned on, this is the name of an integer or string primitive attribute on the Motion Paths input. This can also be provided as a point or primitive attribute on the agent primitive associated with each path.

Curve Attribute

When Match by Attribute and Curve Attribute are turned on, the specified name is an integer or string primitive attribute on the Curves to Follow input. If not specified, the curve’s primitive number is used.

Target Up Vector

The up vector to use when computing orientations along the guiding curves. This is used to break the tie between all possible rolls around the tangent.

Reference Direction

The direction to align with the curve’s tangent vector. This should be set to the original facing direction of the agent.

Level of Detail

The point density to use when converting other curve types to polygon curves.

Deformation

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.

Smoothing

In addition to sampling the curve’s closest point to the agent’s position, the orientations at other nearby points on the curve are also sampled in order to produce smoother changes in the agent’s motion. This is particularly important for agents that are farther from the curve, since the closest point to the agent can shift rapidly as the agent moves, which would produce sudden orientation changes.

Smoothing Radius

When searching for additional points, the sample radius is extended to be the agent’s minimum distance to the curve plus this distance.

Cone Angle

Only consider sample points for which the distance along the curve from the agent’s closest point is within the arc length described by this angle and the sample radius. This ensures that only nearby points along the curve are considered (ignoring points that are only spatially close, such as from a figure-eight curve), while also increasing the number of samples for agents farther from the curve.

Max Search Points

The maximum number of sample points to consider.

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.

Curves to Follow

Guiding curves that the motion paths are deformed to follow.

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

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.

MotionPathFollowCurve

This examples demonstrates how to deform motion paths to follow guiding curves, along with more advanced options such as following closed loops and using attributes to control which curves are followed by each agent.

See also

Geometry nodes