Houdini 21.0 Crowd simulations

Agent attributes

Attributes for reading in triggers and affecting behavior.

On this page

Many of the agent attributes are initialized by the parameters on the Crowd Source SOP and can be overridden on the agents.

See how to change agent attributes as part of the state behavior.

Visualizing attributes

You can use the group and attribute list in the viewport to visualize agent attributes:

  1. Click on the right toolbar of the viewport to display the group list HUD.

  2. In the group list HUD, click the gear menu and select Points.

  3. In the gear menu, select Attributes and choose an agent attribute to visualize. For example, selecting the state attribute will color each agent based on its current state, so all walking agents will be one color, and all standing agents will be another color:

Attributes

Use the geometry spreadsheet to view the attributes of agent primitives.

agentgroup

string

Created by the Crowd Source SOP when Group Name is turned on. This attribute can be used to differentiate agents created from a particular source.

On point

agentname

string

A unique identifier for the type of agent (the agent definition). For example, this could be soldier or average_male.

On point

crowdactive

int

Used internally by the crowd solver to track whether agents should be moved by the solver and have their pose updated. This value is determined by the state’s ragdoll settings and the crowdanimated point attribute.

On point

crowdanimated

int

Indicates to the crowd solver that the agent’s transform and pose are being updated externally. This implies that i@crowdactive==0.

On point

Cd

vec3

The visualization color for the agent in the viewport. This is useful for differentiating groups or individuals.

On point

heading

vec3

The agent’s target direction. When using the crowd solver, up and heading describe the agent’s target orientation, and orient is the agent’s actual orientation. These may differ due to parameters such as the max turn rate.

On point

id

int

A unique number identifying the agent.

On point

maxturnrate

float

The maximum rate (in degrees per second) at which agents will turn when driven by the crowd solver’s default movement behavior. This attribute overrides the default max turn rate on the crowd solver.

On point

nextstate

string

Once a transition has been triggered, this attribute stores the name of the agent’s next state.

On point

orient

quaternion

The orientation of the agent.

On point

pscale

float

The “radius” of the agent.

On point

state

string

The name of the agent’s current state, for example, walk.

On point

stateduration

float

The amount of time (in seconds) the agent has been in the current state.

On point

steerforce

float

The amount of force to be applied by the solver to the agent in the current time step. Behavior nodes modify this value to move agents.

On point

steerforceweight

float

The total weight of all behavior nodes that contribute to steerforce. The solver uses this to normalize the forces applied to the agent.

On point

up

vector

The agent’s up vector. When using the crowd solver, up and heading describe the agent’s target orientation, and orient is the agent’s actual orientation. These may differ due to parameters such as the max turn rate.

On point

v

vector

The current velocity of the agent.

On point

See also

Crowd simulations

Getting started

  • Basics

    An overview of Houdini crowd simulation concepts.

  • Setup

    How to set up and edit a crowd simulation.

The moving parts

  • Agents

    About agents, the moving actors that make up a crowd simulation.

  • States

    About agent states, the virtual mood of each agent that controls the agent’s animation and the behaviors it runs.

  • Triggers

    How to specify conditions that cause agents to change from one state to another.

  • Caches

    Tips for efficiently caching and loading crowd sims.

Behavior

Appearance

  • Diversity

    How to create a more realistic crowd by making agents look and act differently.

  • Attaching cloth

    You can add and constrain vellum cloth as part of agent shape geometry, and then simulate the cloth based on agent movements.

Terrain

  • Foot planting

    How to set up agents to adapt their animation to terrain and prevent skating.

  • Terrain

    How to specify terrain geometry for agents to walk across.

  • Obstacles

    How to set up obstacles for agents to avoid.

SOP crowds

Crowd Procedural