Houdini 16.5 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

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

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.

  • Clips

    How to associate animation with agents in certain states.

  • Triggers

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

Next steps

  • Foot planting

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

  • Transition graphs

  • Attributes

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

  • Sensors

    How to make agents behave differently based on their virtual senses.

  • Diversity

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

  • Weights

    How the Houdini crowd solver decides which behaviors to apply to an agent at each time step.

  • Terrain

    How to specify terrain geometry for agents to walk across.

  • Obstacles

    How to set up obstacles for agents to avoid.

  • Dynamics interaction

    Tips on setting up interaction between agents and other types of dynamics.

  • Ragdoll simulation

  • Adding direction

    How to assert manual control over different aspects of the crowd simulation.

  • Fuzzy Logic

  • Caches

    Tips for efficiently caching and loading crowd sims.