Houdini 21.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 is placed at each point position.

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

    • If the second input is not connected, agent primitives are 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 creates agents using primitive 0 from the first input.

Parameters

Setup

Layout

The shape pattern of the crowd agents.

Random

Randomly scatter agents based on the number and area size.

Formation

Create a group based on rows and columns.

Orientation

The orientation plane of the layout pattern.

Area Size

When Layout is set to Random, this is the size of the area that is used to scatter agents onto.

Use Area Size for Scatter Density

When turned on, and Layout is set to Random, this creates a number of agents per unit area.

Number of Agents

When Layout is set to Random, and Use Area Size for Scatter Density is turned off, this is the number of agents to create.

Number / Unit Area

When Layout is set to Random, and Use Area Size for Scatter Density is turned on, this is the number of agents per unit area to create.

Random Seed

When Layout is set to Random, this is the seed used when randomly scattering agents.

Relax

When Layout is set to Random, this is used to push the agents apart to prevent initial self collisions.

Particle Scale Multiplier

The agent’s pscale point attribute is used as the agent’s size for relaxation. When Layout is set to Random, this parameter scales the value of pscale in the calculation, allowing agents to be more or less tightly packed. This parameter can be overridden by a pscalemultiplier point attribute on the input agent.

Density Attribute

When Layout is set to Random, , this is the name of the attribute that stores the density to use for scattering agents.

Density Scale

When Layout is set to Random, this is the multiplier on the density attribute.

Match Number of Agents

When turned on, the number of agents is specified by the Number of Agents parameter. When turned off, the number of agents is based on the Density Attribute and Density Scale values. This parameter is available when Layout is set to Random.

Rows

When Layout is set to Formation, this is the number of rows of agents.

Columns

When Layout is set to Formation, this is the number of columns of agents.

Spacing

When Layout is set to Formation, this is the spacing between the agents.

Initial State

Initial state that the agent is in when the simulation starts. By default, this parameter is empty, which uses the name of the agent’s current clip.

Scale

Size of the agent (sets the 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 use for the agents.

Group Name

When turned on, creates a point group of agents with the specified name.

Color

When turned on, creates a color point attribute for the agent points and wireframe bones.

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 in this tab to randomize different attributes of the agents in the crowd. Turning on a checkbox shows the controls for that particular type of randomization.

Randomize Agent Primitive

When Randomize Agent Primitive is turned on, an agent type is randomly chosen 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 (Custom Distribution), or by selecting a random primitive number from the specified range (By Number).

Min Primitive Number

When Method is set to By Number, this is the minimum primitive number.

Max Primitive Number

When Method is set to By Number, this is the maximum primitive number.

Seed

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

Agent Groups

When Method is set to Custom Distribution, this is the number of groups of agents in the custom distribution.

Agent Names

When Method is set to Custom Distribution, this is 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

When Method is set to Custom Distribution, this specifies how likely the agents are to be selected.

Randomize Initial State

When Randomize Initial State is turned on, the agents' initial state is randomized.

Method

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

Initial State Prefix

When Method is set to By Number, this is the prefix part of the state name. The variations are created by appending random numbers based on the seed and distribution parameters (state1, state3, state8, etc).

Min Value

When Method is set to By Number, this is the minimum value for the suffix of the state name.

Max Value

When Method is set to By Number, this is the maximum value for the suffix of the state name.

Step Size

When Method is set to By Number, the generated values are between Min Value and Max Value, landing only on values that are a multiple of Step Size greater than Min Value.

Seed

Seed used when randomly varying the initial state.

State Groups

When Method is set to Custom Distribution, this is the number of groups of states in the custom distribution.

States

When Method is set to Custom Distribution, this specifies one or more state names. The Weight value for the group is divided evenly between the states.

Weight

When Method is set to Custom Distribution, this specifies how likely the states are to be selected.

Randomize Clip Time

When Randomize Clip Time is turned on, the clip time of each agent is randomized.

Clip Time

The clip time to use for the agent’s current clip. Specify the units of Clip Time from the drop-down menu:

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

When Randomize Current Layer is turned on, the agents' display layer is randomized.

Note

The Crowd Assign Layers SOP 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 (Custom Distribution), or by appending a random number to the Layer Prefix (By Number).

Layer Prefix

When Method is set to By Number, this is the prefix part of the layer name. The variations are created by appending random numbers based on the seed and distribution parameters (variation_1, variation_3, variation_7, etc).

Min Value

When Method is set to By Number, this is the minimum value for the suffix of the layer name.

Max Value

When Method is set to By Number, this is the maximum value for the suffix of the layer name.

Step Size

When Method is set to By Number, the generated values are between Min Value and Max Value, landing only on values that are a multiple of Step Size greater than Min Value.

Seed

Seed used when randomly varying the current layer.

Layer Groups

When Method is set to Custom Distribution, this is the number of groups of layers in the custom distribution.

Layers

When Method is set to Custom Distribution, this is 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

When Method is set to Custom Distribution, this specifies how likely the layers are to be selected.

Randomize Scale

When Randomize Scale is turned on, the size of the agents is randomized.

Scale

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

When Randomize Initial Velocity is turned on, the initial velocity of the agents is randomized.

Initial Velocity

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

When Randomize Heading is turned on, the initial direction of the agents is randomized.

Heading

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

When Randomize Up is turned on, the up vector of the agents is randomized.

Up

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.

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 is 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 are set to the layers with these names, if the value is not empty.

On point

agentcurrentlayer

string

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

On point

agentcurrentlayers

string array

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

On point

agentname

string

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

On point

agent_id

int

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

On point

state

string

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

On point

Inputs

Agents

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 use in a 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