Houdini 17.0 Crowd simulations

Crowd basics

An overview of Houdini crowd simulation concepts.

On this page

Overview

Agents are character skeletons with skin geometry and animation, each related to a particle-like point in a DOP simulation. Agents have a current state. A state corresponds to a clip that animates the agent while it’s in that state. A state also contains behavior nodes that modify the agent, such as DOP particle forces that move the agent’s point. At each simulation step, Houdini evaluates triggers for each agent. If a trigger matches for an agent, it activates a transition node that gives the agent a new current state.

For example, to have a crowd mill about, you could have some agents in a walk state and some in an idle state. The walk state would have behavior nodes inside to move the point of an agent in that state. A trigger could check if each agent has been in its current state for longer than a certain period. The trigger could lead to two transition nodes (walk → idle and idle → walk) to flip the state of each matching agent.

Crowds are created from points in a geometry network, where you can use the full power of Houdini' geometry nodes and create agent positions from existing models such as terrain. The actual crowd simulation runs in a simulation network, where the agents can interact with other dynamic elements.

See how to set up a crowd simulation for information on how to use the shelf tools and the network editor to create a basic crowd simulation.

Concepts

Source points

The "source" for a crowd simulation is points in a geometry network, representing the starting location of the agents in the simulation.

However, if you don’t give it source points, the Crowd Source surface node will randomly scatter a certain number of points over a given area automatically.

Agents

Agents are the "actors" of the crowd simulation, for example individual people in a crowd scene. An agent gets its look from a Houdini object subnet or asset containing the agent’s skeleton and geometry.

Each agent is created from a source point, defining the agent’s initial location. The Crowd Source node converts points to special agent primitives, with primitive attributes containing information used by the crowd solver. The agent’s geometry is loaded as a packed primitive, so displaying and rendering large number of agents is still fast.

See setup for how to create an initial crowd simulation.

Clips

Clips are bits of animation associated with an agent (such as walk or run). You can set an agent to perform a clip when it’s in a certain state.

States

At any given time, every agent is in a certain state, for example "walk", "idle", "attack", or "run_to_goal". The state encapsulates behavior nodes. These nodes affect the agent primitive, such as moving it around or changing its attributes. How the forces inside the state are actually applied to agents in that state depends on weights.

Houdini animates agents in a given state using an animation clip with the same name as the state.

After each state, you can add particle DOP nodes to move agents in the state.

Houdini includes many "steering force" nodes that implement useful crowd behaviors such as "move toward a point" and "follow a path". These are very similar to DOP particle nodes, and in fact you can use particle forces to affect agents as well, although plain particle forces do not have the concept of weights.

Triggers and transitions

At each step in the simulation, Houdini looks at each agent and checks a series of trigger nodes (for example "distance to target > 2"). A logic node is available to combine triggers. If a trigger applies, Houdini checks for a transition attached to the trigger to change the agent to a new state (for example, "walk" → "run"). Transitions can have a duration during which Houdini will automatically blend the animation clips of the old and new states.

Obstacles

You can specify static DOP objects for agents to avoid using a behavior. You can put this behavior before the behavior merge node

Terrain

Houdini currently supports a single terrain object (a static RBD object). Agents will follow the terrain, with optional IK foot adaptation.

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.