Flock

 
Flock Behavior (beFlock) applies basic flock navigation forces to entities. Its parameters defines boids characteristics and a link to the Flock Locator.
Flock behavior in the behavior editor

For more information on flock in Golaem Crowd, see Flock Locator

To use a Flock Behavior, a Flock Locator is mandatory. A Flock Behavior uses the Flock Locator attached to its related CrowdField.

To define a goal for the flock, see Steer.

Even without Steer Behavior, each boid will move in its current direction, and according to its neighbors (some flocking forces are applied). 

Additionally, boids going outside of the Flock Locator radius will tend to come back inside this radius.

CREATION

  • Behavior Editor / Behavior Library: 
  • Golaem Menu: Crowd Behaviors / Behaviors / CrowdBeFlock Node
  • MEL command: glmCrowdBeFlockCmd;

CONFIGURATION

A Flock Behavior defines the following specific attributes. For common attributes see Behavior Common Attributes.

Flock Behavior Attributes

attributes of a Flock Behavior

A boid is an entity, as produced by population tool. It is called boid here to comply with usual flock algorithms wording .

Each boid has 3 main charateristics : mass, max speed and max force. 

Each of this parameters can be randomized between a lower and an upper bound, or set via a per particle attribute (See ppAttributes Handling).

Boid Mass Min

Boid minimum mass if randomized (if no PPName)

Boid Mass Max

Boid minimum mass if randomized (if no PPName)

Boid Mass PPName

If the boid mass is randomized, let empty. Else this field holds the name of the per particle attribute used as mass.

Boid Max Force Min

Boid maximum force lower bound if randomized (if no PPName)

Boid Max Force Max

Boid maximum force higher bound if randomized (if no PPName)

Boid Max Force PPName

If the boid maximum force is randomized, let empty. Else this field holds the name of the per particle attribute used as maximum force.

Boid Max Speed Min

Boid maximum speed lower bound if randomized (if no PPName)

Boid Max Speed Max

Boid maximum speed higher bound if randomized (if no PPName)

Boid Max Speed PPName

If the boid maximum speed is randomized, let empty. Else this field holds the name of the per particle attribute used as maximum speed.

Stopping Duration Attributes

The Starting / Stopping Duration value determines the time (in seconds) during which the flock goes from fully active to inactive. This time can be used to transition smoothly between two behaviors.

Stopping Duration Mode

This attribute allows a choice of two modes :

  • Random: Randomly set the Stopping Duration value between the specified "Stopping Duration Min" and "Stopping Duration Max" bounds (this attribute is influenced by the random seed of the Crowd Manager)
  • Per-Particle Attribute: Use the "Stopping Duration Name" attribute to get the name of the float per-particle field of the relative particle system.

The Stopping Duration value is in seconds.

Stopping Duration Min See Random option of the Stopping Duration Mode above
Available only when the Stopping Duration Mode is set to "Random"
Stopping Duration Max See Random option of the Stopping Duration Mode above
Available only when the Stopping Duration Mode is set to "Random"
Starting / Stopping Durationpp Name Name of the float per-particle field of the relative particle system, containing the Stopping Duration Mode value which will be used (for more explanation about how to use ppAttributes, see ppAttributes Handling)
Stopping Duration value is set to 0 if the ppAttribute name is empty or invalid
Available only when the Stopping Duration Mode is set to "Per-Particle Attribute"