Steer

Steer Behavior (beSteer) adds a goal to flock Entities in addition to Flock Behavior.

Steer behavior in the Behavior Editor

For more information on flock concepts, see Flock Locator.

This Behavior needs to run in parallel with a Flock Behavior to define flock navigation. See how to properly handle dual Behaviors here.

CREATION

  • Behavior Editor / Behavior Library: 
  • Golaem Menu: Crowd Behaviors / Behaviors / CrowdBeSteer Node
  • MEL command: glmCrowdBeSteerCmd;

CONFIGURATION

Steering Weights Management

All Steer Behaviors are stacked according to their weight, which allow to flee some targets while seeking others.

For wander mode, as no target position is available, a constant Weight can be given to the wander effect.

For seek or flee mode, the weight can be further tweaked to be decreased (or increased) when boids are far from target.

3 Weights interpolation zones are defined :

  • from 0 to Min Distance, for seek mode only, weight will be linearly interpolated from 0 to Weight At Min Distance, else Weight At Min Distance will be used on all range. This is meant to preserve a natural flock volume, else the boids would tend to crowd around target.
  • from Min Distance to Max Distance, weight will be linearly interpolated from Weight At Min Distance to Weight At Max Distance
  • beyond Max DistanceWeight At Max Distance will be used

Default values define a Max Distance to 0, so that Weight At Max Distance default value 1 will be used at any distance, insuring that a single Steer behavior freshly dropped will behave as intended.

Final boid steering = ( weighted mean of Steer Behaviors + Flock Behavior output + steering to Flock Locator center if outside of the locator radius ), constrained by boid properties (mass, max force, speed).

Target Attributes

A steer Behavior defines the following target attributes.For common attributes see Behavior Common Attributes.
You can see GoTo behavior for more explanation on target modes
 

Target Attributes of a Steer Behavior
Reach Mode

Three Reach Modes are available:

  • Wander : the Crowd Entities just wander around : they pick a random value in the space and pick a new one when reached.
  • Reach: the Crowd Entities will reach their target based on the Target Mode and the Target Reach Threshold
  • Flee: the Crowd Entities will flee in the opposite direction of their target based on the Target Mode, the Target Reach Threshold and the Target Flee Threshold
Target Mode
It is possible to define a target to reach for each entity. The Target Mode attribute determines how targets are assigned:

Use Target Poptool

If this mode is selected, all entities will try to reach slots on the Crowd Target Locator selected in the "In Target Poptool" field.

Target Particle System

If this mode is selected, each Entity will be assigned to its corresponding particle in the target particle (or nParticle) system selected in the "In Particle System" field (i.e. entity of particleId 1 will be assigned to the target of particleId 1…). If the target particle system contains fewer particles than the navigating Entity, the entity particleId will be moduled by the size of the target particle system (i.e. entity of particle 6 will be assigned to the target of particleId 1 if the target particle system has 5 particles...).
Note that Golaem Crowd Population Tool can be used to emit the target particle system.
 
It is also possible to specify the assignment of each Entity in the targeted particle system thanks to the field "Target Id PPName". If this field is set, each Entity will be assigned to the target whose id is stored in the float per-particle attribute stored in the "Target Id PPName" attribute of its relative particle. If this field is not set, or its value for one Entity is negative, the particleId will be used. See ppAttributes Handling.

Per Particle Target Attribute

In this mode, each Entity will be assigned to the position stored in the vector Golaem Attribute (or per-particle attribute) stored in the "Target PPName" attribute. The Y value of this per-particle attribute will be projected on the terrain. See Golaem Attributes Handling  (or ppAttributes Handling).

Target Expression

If this mode is selected, the target comes from an expression evaluation. A helper provides the special names to use entity data.

Follow Curve

In this mode, each entity fill follow a curve among the ones that are mapped to the Steer Behavior.

Target Mesh

In this mode, each entity will target a component (vertex, face or edge) of the mesh that is mapped to the Steer Behavior.

Influence Radius

The radius around target, inside which the target has an influence.

Target PopTool Attributes

In Target Poptool See "Use Target Poptool" mode above.
Slot Assign Mode

Available in "Use Target Poptool" mode. This determines the way the population tool slots are assigned as goto targets

  • By Id: the population tool slots are assigned according to the entity id
  • Random: the population tool slots are assigned randomly. A random slot of the poptool will be chosen as target each time the behavior is restarted or if "Target is Dynamic" is checked.
  • MEL Command: the user can control how the slots are assigned through a MEL function specified by the "Slot Assign MEL" attribute. The MEL function uses the index of the entity. Here's a template for this function (equivalent to the "By Id" mode):
global proc int defaultSlotAssign(int $index)
{
    return $index;
}
Slot Assign MEL See "Slot Assign Mode" above

Target Curve Attributes

Follow Curves The curves to follow. 
Curve Assign Mode

If several curves are mapped to the GoTo behavior, this attribute determines the way an entity chooses a curve:

  • By Id: the curve is assigned according to the entity id
  • Random: the entity chooses a curve randomly
  • Closest: the entity chooses the closest curve (depending on the Curve Start Mode)
Curve Start Mode

This attribute determines the point on the curve from which the entity will start following the curve

  • Beginning: the entity will start to follow the cuve from its starting point
  • Closest Point: the entity will start to follow the cuve from the closest point on the curve
Curve Sampling Mode

This attribute determines how the curve is sampled. The GoTo behavior picks up a number of points on the curve that are used as waypoints to reach.

  • Automatic: only the edit points of the curve are taken into account
  • Uniform: a fixed number of points on the curve are taken into account at a regular interval. The number of points is defined by the Curve Sample Count parameter
Curve Sample Count The number of points to use on a curve in Uniform curve sampling mode.
Auto Path Lateral Offset When enabled, this computes the lateral offset to the path to follow autiomatically, according to the inital distance to the curve.
Reverse if checked, the curve following will go from the end to the start of the curve

Target Mesh Attributes

In Target Mesh The target mesh in Target Mesh mode

Mesh Component Mode

The type of mesh component to target:

  • Vertex
  • Face
  • Edge

Mesh Assign Mode

This defines the way mesh components are assigned as targets:

  • By Id: the mesh components are assigned according to the entity id
  • Random: the mesh components are assigned randomly. A random component will be chosen as target each time the behavior is restarted, or if "Target is Dynamic" is checked and Keep Initial Slots is disabled
  • Mel Command: the user can control how the components are assigned through a MEL function specified by the "Slot Assign MEL" attribute. The MEL function uses the index of the entity. Here's a template for this function (equivalent to the "By Id" mode):
global proc int defaultSlotAssign(int $index)
{
     return $index;
}
  • Relative Closest: use the closest component according to the Relative Position

Keep Initial Slots

If enabled, assigned slots will only be computed once, even if the target is dynamic.

Reference Position

The position to use relative to the entity when the Mesh Assign Mode is set to Relative Closest. The Relative Position is added to the Target mesh, and then the closest slot is computed.

Slot Assign MEL

See "Mesh Assign Mode" above.

Other Target Modes Attributes

In Particle System See "Target Particle System" mode above.
Target Id PPName See "Target Particle System" mode above.
Target PPName See "Per Particle Target Attribute" mode above.

General Target Attributes

Target Is Dynamic

Indicates if the target must be evaluated once or based on target update period.

Target Update Period

If the target is dynamic, it will be re-evaluated according to this update period (in frames)

Visual Feedback Attributes

Defines the Force Behavior Visual Feedback displayed in the Crowd Visual Feedback and inside the viewport. For common Visual Feedback attributes see Behavior Common Attributes.

Notice that these attributes can also be configured in the Crowd Visual Feedback

Display Attributes of a Steer Behavior
 
Enable

Enable or disable the display of visual feedback.