Houdini 20.0 Crowd simulations

Crowd basics

An overview of Houdini crowd simulation concepts.

On this page

Overview

Crowds are essentially animated characters attached to particles. The movement of the characters in a crowd simulation is based on an underlying particle simulation in DOPs.

In a crowd simulation, the characters are called agents, and at any given time, the agents are in a particular state, such as standing, walking, or running. Events can happen in a crowd simulation that change the state of the agent, for example, from walking to running. These events are called triggers.

To have a crowd mill about, you could have some agents in an “idle” state and some in a “walk” state. In the idle state, the underlying point that an agent is attached to would remain stationary. In the walk state, the underlying point would move. A trigger checks if each agent has been in its current state for longer than a certain period of time, and for every agent that satisfies that condition, a state transition is made between idle → walk or walk → idle.

Crowd simulations require both a geometry (SOP) network and a simulation (DOP) network:

  • A geometry (SOP) network is used to create and define the agents. The full power of Houdini’s SOP nodes can be used to create agent positions from existing models such as terrain.

  • A simulation (DOP) network is used to run the actual crowd simulation. The DOP crowd simulation network holds the logic that controls the movement of each particle (and in turn, the agent that is attached to it). Within the DOP network, agents can interact with other dynamic (DOPs) elements.

See setting up a crowd simulation for information on using the shelf tools and the network editor to create a basic crowd simulation.

Tip

If you want to jump right into learning how to create crowds, have a look at the Zombies for Everyone tutorial.

Concepts

Agents

Agents are the “actors” of the crowd simulation, for example, individual people in a crowd scene. An agent is a character skeleton with skin geometry and animation. Each particle in a crowd simulation has an agent attached to it.

Crowd source

The “source” for a crowd simulation are the points in a geometry (SOP) network. Agents are copied onto these points, and the points represent the starting location of the agents in the simulation. If you don’t give the crowd simulation source points, the Crowd Source SOP node will randomly scatter a specified number of points over a given area.

Clips

Clips are bits of animation on an agent (such as “walk” or “run”) that is played when the agent is in a particular state.

States

At any given time, every agent is in a particular state, such as “walk”, “idle”, “attack”, or “run_to_goal”. A state is defined by an animation clip that is played for the agents in that state, and the behavior nodes that affect the movement of the underlying particles that the agents are attached to.

Triggers and transitions

At each step in the crowd simulation, Houdini looks at every agent and checks a series of trigger conditions (for example, “distance to target > 2”). If a trigger applies, Houdini checks for a transition that is attached to the trigger to change the agent to a new state (for example, walk → run). Transitions can have a duration during which Houdini automatically blends the animation clips of the old and new states.

Weights

Houdini has many useful POP forces that you could use as behavior nodes to control the movement of the underlying particles that the agents are attached to. These “steering force” nodes are essentially particle forces with the added concept of weights, and they provide useful crowd behaviors such as “move toward a point” or “follow a path”. At any given moment, an agent could be affected by multiple forces (for example, both “follow this path” and “avoid obstacles”). The crowd solver deals with multiple forces by normalizing the weights (scaling them so they add up to 1), and then multiplying the individual forces by the normalized weights.

Along with the crowd steering force nodes, there are also default forces on the crowd solver that have the concept of weights.

Obstacles

You can specify static DOP objects for agents to avoid.

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 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.

SOP crowds

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.