Houdini 20.0 Nodes Geometry nodes

Agent Look At 3.0 geometry node

Adjusts the agent’s skeleton to look at a target.

On this page
Since 19.5

This node selects and tracks a look at target for the agent, and adjusts the skeleton so the head or eye joints look at the target.

Define the joints to be adjusted with Agent Prep. Agent Prep adjusts the spine from the Lower Back to the Head joint, and also allows you to rotate the optional Eye joints.

Parameters

Group

The group of agents to modify.

Targets

Guide

When turned on, displays the guide geometry for the look at targets.

Target Type

Specifies how to determine the target’s position.

Position

Uses the target position specified by the Position parameter.

Object

Computes the target position using the object’s transform specified by the Object path. If the object contains geometry, it also includes the centroid of the geometry.

Points

You can use each point in the specified geometry as a target. The standard instancing point attributes define the target’s position, orientation, and velocity. You can also use the agentlookat_targetscore float point attribute to scale the Score Multiplier per point.

Agents

You can use each agent in the crowd as a target. You can also use the agentlookat_targetscore float point attribute to scale the Score Multiplier per agent.

Position

A world space position for the look at target.

This parameter is only available when Target Type is set to Position.

Object

The path to an object or SOP geometry.

This parameter is only available when Target Type is set to Object.

Group

The group of points to look at (when Target Type is set to Points).

Max Search Points

The maximum number of nearby points to consider when selecting a point to look at.

This parameter is only available when Target Type is set to Points.

Group

The group of agents to look at (when Target Type is set to Agents).

Max Neighbors

The maximum number of nearest neighbors to consider when selecting an agent to look at.

This parameter is only available when Target Type is set to Agents.

Match by Attribute

When the Target Type is Points or Agents, only consider points for which the Target Attribute matches the agent’s value for the Agent Attribute. This can be useful to precisely control which target(s) an agent looks at.

The attributes can be an integer or string type. For string attributes, the Agent Attribute can be a string pattern that is matched against the Target Attribute value. For integer attributes, if the Target Attribute is not specified, the point number will be used instead.

Agent Attribute

The name of a string or integer point attribute on the crowd geometry.

Target Attribute

The name of a string or integer point attribute on the target geometry. When the Target Type is Agents, the target geometry is also the crowd geometry.

Target Visibility

Horizontal FOV

The maximum horizontal angle (in degrees) at which the target is visible.

Choose one of the options on this parameter to specify how the horizontal FOV is determined for each agent:

Set Value

Use the Horizontal FOV value.

Set from Attribute

Overrides the Horizontal FOV with the value of the point attribute, Horizontal FOV Attribute.

Scale by Attribute

Multiplies the Horizontal FOV with the value of the point attribute, Horizontal FOV Attribute.

Horizontal FOV Attribute

The point attribute on the agent. If the Horizontal FOV mode is Set from Attribute, Horizontal FOV Attribute is in radians.

This parameter is only available when the Horizontal FOV mode is set to Set from Attribute or Scale by Attribute.

Vertical FOV

The maximum vertical angle (in degrees) at which the target is visible.

Choose one of the options on this parameter to specify how the vertical FOV is determined for each agent:

Set Value

Use the Vertical FOV value.

Set from Attribute

Overrides the Vertical FOV with the value of the point attribute, Vertical FOV Attribute.

Scale by Attribute

Multiplies the Vertical FOV with the value of the point attribute, Vertical FOV Attribute.

Vertical FOV Attribute

The point attribute on the agent. If the Vertical FOV mode is Set from Attribute, Vertical FOV Attribute is in radians.

This parameter is only available when the Vertical FOV mode is set to Set from Attribute or Scale by Attribute.

Distance Range

Specifies the minimum and maximum distance that the target is visible. When Target Type is Points or Agents, the maximum distance limits the number of nearby points considered.

Target Score

Controls how interesting the target is to an agent based on factors such as distance, speed, or orientation. The scoring factors are normalized values (from 0 to 1), and the final score is computed as a weighted average. The Agent Look At Apply DOP selects the target with the highest score when an agent chooses a target to look at.

Distance Weight

The weight for the target’s distance score. Adjusts the importance of targets that are close to the agent. The distance score has a value of 1 at the minimum of the Distance Range, and a value of 0 at the maximum distance.

Periphery Weight

The weight for the target’s periphery score. Adjusts the importance of targets that are entering the edge of the field of view.

Relative Orientation Weight

The weight for the target’s orientation score. Adjusts the importance of targets that are facing towards the agent and are in the center of the field of view.

Relative Speed Weight

The weight for the target’s speed score, which is higher for targets that have a larger speed relative to the agent. Adjusts the importance of fast-moving targets. The speed score has a value of 0 at the minimum of the Relative Speed Range, and a value of 1 at the maximum speed.

Relative Speed Range

Specifies the minimum and maximum relative speeds, which determine the target’s relative speed score when the Relative Speed Weight is non-zero.

Score Multiplier

Scales the target’s overall score. You can manually adjust the importance of specific targets. When the Target Type is Points or Agents, this can be multiplied per point with the agentlookat_targetscore attribute.

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.

Gaze Duration

Gaze Duration Time

Specifies the minimum and maximum time (in seconds) that the agent can look at this target. This allows the agent to lose interest in a target over time. After the minimum duration, the target’s score will gradually decrease, allowing the agent to switch to a target that has a higher score. After the maximum duration has elapsed, the agent will stop looking at the target.

Choose one of the options on this parameter to specify how the gaze duration is determined for each agent:

Set Value

Use the Gaze Duration Time value.

Set from Attribute

Overrides the Gaze Duration Time with the value of the point attribute, Gaze Duration Attribute.

Scale by Attribute

Multiplies the Gaze Duration Time with the value of the point attribute, Gaze Duration Attribute.

Gaze Duration Attribute

The point attribute on the agent. If the Gaze Duration Time mode is Set from Attribute, Gaze Duration Attribute has a tuple size of 2.

This parameter is only available when the Gaze Duration Time mode is set to Set from Attribute or Scale by Attribute.

Random Time Offset

Randomly increases the minimum gaze duration. This allows agents to start losing interest in the target at different times.

Random Seed

Seed used when randomly varying the gaze duration time.

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.

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.

Skeleton

Guide

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

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.

Reference Direction

The original facing direction of the agent. Used along with the Reference Up direction to define the agent’s field of view cone.

Reference Up

The original up vector of the agent. Used along with the Reference Direction to define the agent’s field of view cone.

Simulation

Reset Simulation

Clears the entire simulation cache.

Sub Steps

Specifies the number of substeps the DOP simulation should perform each frame.

Start Frame

Specifies the frame at which the simulation will start cooking.

Scale Time

Specifies a scale factor that relates global time to the simulation time for the DOP network.

Timeless (No History)

When turned on, the history from the previous frames is not used. This can be useful for quickly viewing a rough preview of a later frame without simulating all of the previous frames. Normally, the previous frame is used to track the agent’s selected target, and smoothly blend in and out of look ats.

Inputs

Agents

Agent primitives.

Target Points

The points to use as targets when the Target Type is Points.

Outputs

Agents

The modified agent primitives.

See also

Geometry nodes