Flock Locator

The Flock Locator defines the volume in which flocks can move thanks to the Flock and Steer behaviors.

a

CREATION

A Flock Locator is automatically created when a Flock or a Steer behavior is added to the simulation.

  • Golaem Shelf:  / right click / Flock Locator
  • Golaem Menu: Environments / Flock Locator
  • MEL command: glmFlockLocatorCmd;
Note that several Flock Locators can be used in a simulation and can be chosen in the Crowd Manager and in each Crowd Field. Thus, if two Crowd Fields are using two different Flock Locators, their Entities will not be able to avoid each other.

Preliminary Notes

Golaem Crowd flock implementation is based on Craig Reynolds' Boids.

Each flock entity is a boid. Each boid has 3 basic rules in addition to optional steering behavior:

  • Separation : avoid crowding with neighbors
  • Alignment: try to align its velocity with neighbors
  • Cohesion: try to stay near neighbors

For each of these rules, a specific neighborhood is considered. The neighborhood is defined by a radius around the current boid, and an angle with current boid direction. All boids outside of radius, or forming an angle with boid velocity wider than angle, are ignored. Additionnaly all boids inside 3*boid radius will be considered in neighborhood so the boid radius, defined when generating from Population Tool, has a strong impact on the final flock homogeneity : greater radius will lead to more separation, cohesion and alignment.

Known limitations

  • The flock locator can only be a sphere (i.e. cannot use meshes as flock containers).
  • Locator keyframed positions, size and scale will be ignored. Flock Locator radius and position are evaluated at start frame. 
  • Goalem Crowd Flock does not provide an out of the box solution for controlling yaw/pitch/roll limitations on boids.

CONFIGURATION

Flock Attributes

Flock Attributes
Flock radius Controls the enclosing volume of the flock. Boids will tend to stay in this volume but they may wander outside of this radius.
is 2D In 2D mode, flock will drive boids to avoid themselves in a XZ plane only.

Weights Attributes

Weights Attributes
You can control the global behavior of a flock by giving different weights to each flock goal.
Steering Flocking Ratio Depending on the desired result, one can choose to emphasize on steering toward a target (flee/seek/wander), or on flocking effect. A ratio of 0 will negate flocking effect, and just steer toward the current target. A ratio of 1 will only apply flocking effect and won't steer at all. Beware than only applying flocking effect won't move a boid, if it has no other boids in its neighborhood (because no cohesion/separation/alignment can be determined in that case). A ratio of 0.8 is given by default : mostly flocking, while still keeping some steering influence.
Separation Weight Weight of separation in boid final decision. When null, boids will crowd in some points, while great values make them split as much as possible
Alignment Weight Weight of alignment in boid final decision. Try to align boids velocity with their neighbors
Cohesion Weight Weight of cohesion in boid final decision. Try to make boids stay near neighbors

Boid Neighborhood Perception Attributes

Attributes of a flock locator
These are advanced flock parameters. They allow to define a custom shape and size for the neighborhood considered for each goal. Note that default values should be fine in most cases.
See Craig Reynolds' Boids page for detailed explanations and a neighborhood space figure. 
See EntityType and PopulationTool for more information on entity radius and scale parameter.
 
Inner radius Factor Controls the radius in which all boids will be considered as neighbors, expressed as an entity radius factor. This neighborhood is used by all goals, in addition to each specific neighborhood definition. 
Separation Radius Factor Boid neighborhood radius factor for separation, expressed as an entity radius factor
Separation Angle Boid neighborhood angle for separation
Alignment Radius Factor Boid neighborhood radius factor for alignment, expressed as an entity radius factor
Alignment Angle Boid neighborhood angle for alignment
Cohesion Radius Factor Boid neighborhood radius factor for cohesion, expressed as an entity radius factor
Cohesion Angle Boid neighborhood angle for cohesion
An inner radius value greater than other radii will void the other neighborhood parameters effects.

Obstacles Attributes

Obstacles Attributes
You can add additional steering constraints to flock, based on obstacles avoidance.
 
In Obstacles Maya meshes mapped to this field to will be avoided by flock
Obstacle Choice Frequency Each boid will avoid nearest obstacle at such frequency. For free flights and random obstacles, a frequency of 1 to 3 should be sufficient. To constrain boids inside a given volume, the frequency must be higher (around 10) to detect properly the volume and to avoid flying through a face while avoiding the last detected one. This parameter will have to be set accordingly to max speed / acceleration and extrapolation time of the boids.
Extrapolation Time Each boid will interpolate its current speed on the given time, to test if it intersects a mesh face. The closest intersection found, if any, will generate a repulsion base on the intersection face normal and current boid speed/direction.
 
Obstacle avoidance is not a guaranteed constraint, due to its evaluation which only takes nearest face for a given duration (1/frequency). Though, increasing frequency can help having better results.
 

Maya Mesh flock avoidance