Houdini 17.0 Crowd simulations

Agent attributes

Useful attributes for reading in triggers, or that you can set to affect behavior.

On this page

Setting up attributes in the geometry network

Many of the these attributes are initialized by parameters on the Crowd Source node, and can also be overridden on some or all agents.

  • If you are using points as inputs to the Crowd Source node, crowd-related attributes on the points will be copied to the agents.

  • Alternatively, you can apply attributes to the agent primitives created by the Crowd Source node using an Attribute node or Attribute Wrangler.

Note that the input to Crowd Source is points, but the output is (agent) primitives.

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

Visualizing Attributes

You can also use the group and attribute list in the viewport to visualize agent attributes. Turn on the group list in the display options window. Then use the gear menu to switch the group list to Points mode. Then use the Attributes submenu of the gear menu to choose an agent attribute to visualize. For example, visualizing the state attribute will color each agent depending on the state it is currently in. All walking agents will be one color, and all standing agents will be another.

Attributes

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

agentgroup

string

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

On point

agentname

string

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 is being updated externally. This implies that i@crowdactive==0.

On point

Cd

vec3

The visualization color for this particular agent in the viewport. This is useful to differentiate groups or individuals.

On point

heading

vec3

The target direction that the agent should face. 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 this particular agent.

On point

maxturnrate

float

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

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 have contributed 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 which controls the agent’s animation and which 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.