Flock

 
Flock Behavior (beFlock) applies basic flock navigation forces to entities. Its parameters defines boids characteristics and a link to the 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

A boid is a Crowd Entity but is called boid here to comply with usual flock algorithms wording. Each boid has 3 main charateristics : mass, max speed and max force.


 
Boid Mass Mode

This attribute allows a choice of three modes :

  • Random: Randomly set the Boid Mass value between the specified "Boid Mass Min" and "Boid Mass Max" bounds (this attribute is influenced by the random seed of the Crowd Manager)
  • Per-Particle Attribute: Use the "Boid Mass Attr" attribute to get the name of the float per-particle field of the relative particle system.
  • Golaem Attribute: allows setting the Boid Mass value from the Golaem attribute set in "Boid Mass Attr". The value of this Golaem attribute can be changed dynamically

The Boid Mass is in kilograms.

Boid Mass Min See Random option of the Boid Mass Mode above
Available only when the Boid Mass Mode is set to "Random"
Boid Mass Max See Random option of the Boid Mass Mode above
Available only when the Boid Mass Mode is set to "Random"
Boid Mass Attr Name of the float per-particle attribute of the relative particle system (see ppAttributes Handling) in Per-Particle mode or of the "Golaem Attribute" (see Golaem Attribute handling) in "Golaem Attribute mode", containing the Boid Mass value which will be used.
Boid Mass value is chosen randomly if the attribute name is empty or invalid.
Available only when the Boid Mass Mode is set to "Per-Particle Attribute" or "Golaem Attribute"
 
Boid Max Force Mode

This attribute allows a choice of three modes :

  • Random: Randomly set the Boid Max Force value between the specified "Boid Max Force Min" and "Boid Max Force Max" bounds (this attribute is influenced by the random seed of the Crowd Manager)
  • Per-Particle Attribute: Use the "Boid Max Force Attr" attribute to get the name of the float per-particle field of the relative particle system.
  • Golaem Attribute: allows setting the Boid Max Force value from the Golaem attribute set in "Boid Max Force Attr". The value of this Golaem attribute can be changed dynamically

The Boid Max Force value is in newtons and in influenced by the Crowd Unit.

Boid Max Force Min See Random option of the Boid Max Force Mode above
Available only when the Boid Max Force Mode is set to "Random"
Boid Max Force Max See Random option of the Boid Max Force Mode above
Available only when the Boid Max Force Mode is set to "Random"
Boid Max Force Attr Name of the float per-particle attribute of the relative particle system (see ppAttributes Handling) in Per-Particle mode or of the "Golaem Attribute" (see Golaem Attribute handling) in "Golaem Attribute mode", containing the Boid Max Force value which will be used.
Boid Max Force value is chosen randomly if the attribute name is empty or invalid.
Available only when the Boid Max Force Mode is set to "Per-Particle Attribute" or "Golaem Attribute"
 
Boid Max Speed Mode

This attribute allows a choice of three modes :

  • Random: Randomly set the Boid Max Speed value between the specified "Boid Max Speed Min" and "Boid Max Speed Max" bounds (this attribute is influenced by the random seed of the Crowd Manager)
  • Per-Particle Attribute: Use the "Boid Max Speed Attr" attribute to get the name of the float per-particle field of the relative particle system.
  • Golaem Attribute: allows setting the Boid Max Speed value from the Golaem attribute set in "Boid Max Speed Attr". The value of this Golaem attribute can be changed dynamically

The Boid Max Speed value is in m/sec and in influenced by the Crowd Unit.

Boid Max Speed Min See Random option of the Boid Max Speed Mode above
Available only when the Boid Max Speed Mode is set to "Random"
Boid Max Speed Max See Random option of the Boid Max Speed Mode above
Available only when the Boid Max Speed Mode is set to "Random"
Boid Max Speed Attr Name of the float per-particle attribute of the relative particle system (see ppAttributes Handling) in Per-Particle mode or of the "Golaem Attribute" (see Golaem Attribute handling) in "Golaem Attribute mode", containing the Boid Max Speed value which will be used.
Boid Max Speed value is chosen randomly if the attribute name is empty or invalid.
Available only when the Boid Max Speed Mode is set to "Per-Particle Attribute" or "Golaem Attribute"

Weights Attributes

The weight attributes determine the global look of a flock (swarming, flock, etc). 

Steering Flocking Ratio

If 0, the boid will only use its steering value, ignoring flocking behavior with other boids.
If 1, the boid will form a flock but will ignore the steering force of any Steer Behavior.
Any value between those 2 values will blend the two forces, default to 0.8 (a little of steering, mainly flocking).

Separation Weight Weight given to the separation force from the neighbor boids. Higher values lead to a bigger flocking volume
Alignment Weight Weight given to the alignment force : with high values, the boids will tend to align strongly in a single flow. With low values, the flock will behave more as a bees swarm, going in all directions.
Cohesion Weight Weight given to the cohesion force : with low values, you will have numerous small boid groups. With high values, the boids will behave more as a "single packed" entity.

Stopping Duration Attributes

The 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"
Stopping Duration pp 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)
Boid Max Force value is chosen randomly if the ppAttribute name is empty or invalid
Available only when the Stopping Duration Mode is set to "Per-Particle Attribute"

Advanced Attributes

A few options on the orientation management of the flock

Time To Align Up

This value forces the entity to come back to a vertical up in a given time, when the boid does not have any force keeping it turned. This avoids birds flying straight, on their back, because they rolled at some point.

Bank Amount Gives the bank (roll) response speed to turns : a higher value gives a faster bank, boids will then tend to roll easily. Lower values prevent them from rolling easily.
Maximum Y/Up Angle This prevent a boid to reach a up direction having a greater angle with (positive) vertical direction. By default 180 degrees will allow any orientation, but one may restrain it to "believable orientations" for some usage, such as non-acrobatic planes .