Steer
Steer Behavior (beSteer) adds a goal to flock Entities in addition to Flock Behavior.
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 Distance, Weight 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
Reach Mode |
Three Reach Modes are available:
|
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 PoptoolIf 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 SystemIf 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 AttributeIn 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 ExpressionIf this mode is selected, the target comes from an expression evaluation. A helper provides the special names to use entity data.
Follow CurveIn this mode, each entity fill follow a curve among the ones that are mapped to the Steer Behavior. Target MeshIn 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
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:
|
Curve Start Mode |
This attribute determines the point on the curve from which the entity will start following 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.
|
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:
|
Mesh Assign Mode |
This defines the way mesh components are assigned as targets:
global proc int defaultSlotAssign(int $index) { return $index; }
|
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
Notice that these attributes can also be configured in the Crowd Visual Feedback
Enable |
Enable or disable the display of visual feedback. |