Houdini 20.0 Nodes Geometry nodes

Crowd Source 3.0 geometry node

Populates a crowd of agent primitives.

On this page
Since 15.5

Overview

This node takes two inputs:

  • The first input contains one or more agent primitives to use when populating the crowd, as created by an agent setup network.

  • The optional second input can contain either a point cloud or a surface.

    • If the second input contains a point cloud, an agent primitive will be placed at each point position.

    • If the second input contains a surface, agent primitives will be scattered across the surface.

    • If the second input is not connected, agent primitives will be scattered within the boundary defined by the Area Size parameter.

Using multiple agent types

The first input can contain multiple agent types. You can use the following methods to control which agent types are created in the crowd:

  • On the Randomize tab, turn on Randomize Agent Primitive to have the node randomly assign different agent types to each point.

  • The geometry in the second input can have an agent_id attribute that specifies the primitive number of an agent from the first input to use at each point. Alternatively, the agentname point attribute can be used to specify the name of an agent (such as mocapbiped3) from the first input to use at each point.

If you don’t use Randomize Agent Primitive or the agent_id attribute, the node only creates agents using primitive 0 from the first input.

Attributes

When the second input contains a point cloud, the following attributes can be used to control how agents are created and placed on the points.

agentcollisionlayer

string

The agent will be assigned a single collision layer with this name, if the value is not empty. This is deprecated in favor of using the agentcollisionlayers array attribute.

On point

agentcollisionlayers

string array

The agent’s collision layers will be set to the layers with these names, if the value is not empty.

On point

agentcurrentlayer

string

The agent will be assigned a single current layer with this name, if the value is not empty. If the value is empty, the agent’s current layer will be left as-is unless Randomize Current Layer is enabled. This is deprecated in favor of using the agentcurrentlayers array attribute.

On point

agentcurrentlayers

string array

The agent’s current layers will be set to the layers with these names, if the value is not empty.

On point

agentname

string

Specifies the name of an agent from the first input to use at this point.

On point

agent_id

int

Specifies the primitive number of an agent from the first input to use at this point.

On point

state

string

Specifies the initial state that the agent will be in. If the value is empty, the agent’s state will be set using the Initial State and Randomize Initial State parameters.

On point

Parameters

Setup

Layout

Shape pattern of the crowd agents created.

Random

Scatter randomly based on the number and area size.

Formation

Create a group based on rows and columns.

Area Size

Size of the area that will be used to scatter agents onto.

Use Area Size for Scatter Density

Specifies whether to create a number of agents per unit area.

Number of Agents

Number of agents to create.

Number / Unit Area

The number of agents per unit area to create.

Random Seed

Seed used when randomly scattering agents.

Relax

Used to push the agents apart to prevent initial self collisions.

Density Attribute

Name of the attribute that stores density to be used for scattering agents.

Density Scale

Multiplier on the density attribute.

Match Number of Agents

Controls number of agents scattered using density attribute. When off number will be based on the density values; when on it will use value specified by the Number of Agents parameter.

Initial State

Initial state that the agent will be when the simulation starts. By default this parameter is empty, which means to use the name of the agent’s current clip.

Scale

Size of the agent (sets pscale attribute on the agent point).

Initial Velocity

Initial velocity of the agent.

Set Heading from Velocity

When turned on and the initial velocity is not zero, the heading direction is set to match the initial velocity direction.

Heading

The initial direction of the agents.

Up

Up vector to be used for the agents.

Create Group

Specifies whether to create a point group containing the agents.

Group Name

Name of a point group that the agents will belong to if Create Group is enabled.

Set Color

Specifies whether to create a color point attribute.

Color

Color of the agent points and wireframe bones if Set Color is enabled.

Reference Direction

The agent’s axis, aligned to follow the velocity vector. For example, setting this to 1,0,0 will align the agent’s X-axis with its velocity.

Reference Up

The original up vector of the agent. This parameter is used with Reference Direction when updating the agent’s orientation.

Randomize

Use the controls on this tab to randomize different attributes of the agents in the crowd. Turning on a checkbox shows controls for that type of randomization.

Randomize Agent Primitive

Randomly chooses an agent type from the first input for each agent in the crowd. This lets you populate the crowd with more than one type of agent. If geometry is provided for the second input, the agent_id or agentname point attribute can also be used to specify which agent primitive from the input geometry should be copied to each point.

Method

Specifies whether to select the agent from a custom distribution of agent names and weights, or by selecting a random primitive number from the specified range.

Min Primitive Number

The minimum primitive number.

Max Primitive Number

The maximum primitive number.

Seed

Seed used when randomly varying the agent primitive copied to each point.

Agent Groups

Specifies the number of groups of agents in the custom distribution.

Agent Names

A string pattern that specifies one or more agent names. The pattern follows the same syntax as the match VEX function. The Weight value for the group is divided evenly between the agents.

Weight

Specifies how likely the agents are to be selected.

Randomize Initial State

This will randomize the agents' initial state.

Method

Specifies whether to select the state from a custom distribution of state names and weights, or by appending a random number to the Initial State Prefix.

Initial State Prefix

Prefix part of the state name. The variations will be created by appending random numbers based on the seed and distribution parameters (state1, state3, state8, etc).

Min Value

The minimum value for the suffix of the state name.

Max Value

The maximum value for the suffix of the state name.

Step Size

The generated values will be between Min Value and Max Value, landing only on values that are some multiple of Step Size greater than Min Value.

Seed

Seed used when randomly varying the initial state.

State Groups

Specifies the number of groups of states in the custom distribution.

States

Specifies one or more state names. The Weight value for the group is divided evenly between the states.

Weight

Specifies how likely the states are to be selected.

Randomize Clip Time

Randomizes the clip time of each agent.

Clip Time

Specifies the clip time to use for the agent’s current clip.

Clip Time Units

Specifies the units of the Clip Time.

Seconds

The clip time is specified in seconds, relative to the clip’s start time.

Phase

The clip time is specified as a normalized phase, where 0 is the beginning of the clip, and 1 is the end of the clip. This can be simpler to use when working with clips of different lengths.

Relative to Clip Start Time

When turned on, treats the Clip Time as relative to the clip’s start time. When turned off, treats the Clip Time as an absolute time.

This parameter is available when Clip Time Units is set to Seconds.

Random Clip Offset

Randomly shifts the clip time forward for each agent by up to the specified number of seconds.

Seed

Seed used when randomly varying the clip time.

Randomize Current Layer

This will randomize the agents' display layer.

Note

Crowd Assign Layers provides more controls for assembling geometry variations, such as support for assigning multiple layers to an agent.

Method

Specifies whether to select the layer from a custom distribution of layer names and weights, or by appending a random number to the Layer Prefix.

Layer Prefix

Prefix part of the layer name. The variations will be created by appending random numbers based on the seed and distribution parameters (variation_1, variation_3, variation_7, etc).

Min Value

The minimum value for the suffix of the layer name.

Max Value

The maximum value for the suffix of the layer name.

Step Size

The generated values will be between Min Value and Max Value, landing only on values that are some multiple of Step Size greater than Min Value.

Seed

Seed used when randomly varying the current layer.

Layer Groups

Specifies the number of groups of layers in the custom distribution.

Layers

A string pattern that specifies one or more layer names. The pattern follows the same syntax as the match VEX function. The Weight value for the group is divided evenly between the matching layers.

Weight

Specifies how likely the layers are to be selected.

Randomize Scale

This will randomize the size of the agents.

Scale

Specifies the default size of the agents.

Randomness

Specifies how much the Scale can be randomly varied by.

Seed

Seed used when randomly varying the scale.

Randomize Initial Velocity

This will randomize the initial velocity of the agents.

Initial Velocity

Specifies the default initial velocity of the agents.

Randomness

Specifies how much the Initial Velocity can be randomly varied by in each direction.

Seed

Seed used when randomly varying the initial velocity.

Randomize Heading

This will randomize the initial direction of the agents.

Heading

Specifies the default heading of the agents.

Randomness

Specifies how much the Heading can be randomly varied by in each direction.

Seed

Seed used when randomly varying the heading.

Randomize Up

This will randomize the up vector of the agents.

Up

Specifies the default up vector of the agents.

Randomness

Specifies how much the up vector can be randomly varied by in each direction.

Seed

Seed used when randomly varying the up vector.

Inputs

Agent SOP

One or more agent primitives, as created by the Agent SOP.

Custom Surface/Points

A surface to scatter agents across, or a point cloud representing agent positions.

Outputs

Agents

Agent primitives to be used in crowd simulation.

Examples

PopulateRandomAgents Example for Crowd Source geometry node

This example demonstrates how populate a crowd with several different types of agents.

See also

Geometry nodes