Справка Houdini на русском Crowd simulations

Adding diversity to crowds

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

On this page

Agent layers

Layers let you choose between several different available display geometries for each individual agent. This lets you create crowd diversity within a single agent class.

Creating layers

When you create an agent from a character, Houdini generates a default layer from the original character’s visible geometry. The Agent Layer geometry node lets you add additional layers.

For example, to create a layer with a different overall character skin:

  1. In the crowd source geometry network, add an Agent Layer node.

  2. Click the Add button next to Layer bindings to add a binding.

    • Set the SOP path to the geometry node representing the new character skin.

    • Enter a Shape name for the skin.

    • In the Transform name menu, choose the top-level transform of the rig.

Setting the current layer

Each individual agent primitive has a current display layer. (It also has a collision layer, which is the geometry used in dynamics for collisions.)

Tip

You can use a layer to display low-res proxy geometry. For example, you could create a low-poly character skin and set it up as a layer on the agent, then branch the crowd source network to an Agent Edit that sets the low-poly layer as the current layer for all agents. Then give that branch the display flag and the "real" branch the render flag.

Attaching parts using layers

Each layer is not really a different geometry, they are different sets of bindings between transforms on the rig and bits of geometry (shapes). This means you can create a layer that is based on a base layer, but adds a binding to attach, for example, a hammer or sword to the character’s hand.

  1. In the crowd source geometry network, add an Agent Layer node.

  2. In the Agent Layer’s parameters, turn on Source Layer to base the layer on an existing layer (the default layer).

  3. Click the Add button next to Layer bindings to add a binding.

    • Set the SOP path to the geometry node representing the part you want to attach.

    • Enter a Shape name for the part.

    • In the Transform name menu, choose the transform you want to attach the shape to.

Tip

A powerful way to create variation is to use a loop block to create multiple layers that attach different parts (for example, different hats).

Crowd source randomize

The crowd source node has a Randomize tab that lets you automate some variation in a single crowd source node. For example, instead of naming every agent in the group guy, you can randomly assign each agent to be one of guy1, guy2, or guy3 using the Randomize controls (note that each of these names is a different character class that needs its own baked out set of animation clips).

Attributes

  • If the input points have agent related attributes on them, the attributes will be copied onto the new agent primitives. This is a very effective way for expert users to manually or randomly specifying different starting conditions, looks, and so on across agents.

  • You can use controls on the Crowd Source geometry node node’s Randomize tab to vary the scale of agents (setting pscale). The solver will take the scale into account and vary the agent’s gate speed appropriately. To slow down agents, try randomizing max speed. Set Allowed variance on the Crowd Solver DOP to 100% so agents can vary their speed (otherwise the solver limits how much agent speed can vary from the original gate speed, leading to foot slippage).

Material stylesheets

Material stylesheets let you modify material settings on agents at render time. This lets you, for example, randomize texture setting on agents to give them different looks.

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.