Navigation

A Navigation Behavior (beNavigation) allows an Entity to avoid other Entities and obstacles.

The Navigation Behavior is needed when using a Go To Behavior, but it can also be used alone for static Entities who need to react to others.

To use a Navigation Behavior, the Terrain Locator associated to the Crowd Manager must use a NavMesh.

 


A Navigation Behavior in the behavior editor

CREATION

  • Behavior Editor / Behavior Library: 
  • Golaem Menu: Crowd Behaviors / Behaviors / CrowdBeNavigation Node
  • MEL command: glmCrowdBeNavigationCmd;

Configuration

A Navigation Behavior defines the following specific attributes. For common attributes see Behavior Common Attributes.
 
The Navigation Behavior relies on the Entity Perception Shape defined in the Character Maker or overridden in the Entity Type.
 

Navigation Attributes


Navigation attributes of a navigation behavior
 
Navigation Speed Mode

This attribute allows to choose how the navigation speed of each crowd entity is set:

  • Random: the navigation speed is set randomly between the values Navigation Speed Min and Navigation Speed Max. The navigation speed is influenced by the random seed of the Crowd Manager.
  • Per-Particle Attribute: the navigation speed is read from the per particle float attribute given by Navigation Speedpp Name.

The Navigation Speed value is in Crowd units.

Navigation Speed Min See the Random option of the Navigation Speed Mode described above. Available only when the Navigation Speed Mode is set to Random.
Navigation Speed Max See the Random option of the Navigation Speed Mode described above. Available only when the Navigation Speed Mode is set to Random.
Navigation Speedpp Name  Name of the float per-particle attribute containing the Navigation Speed value to use. For more explanations about how to use ppAttributes, see ppAttributes Handling
The Navigation Speed is set to 1 if the pp attribute name is empty or invalid. Available only when the Navigation Speed Mode is set to Per-Particle Attribute.
Acceleration/Deceleration The maximum acceleration or deceleration allowed for navigating entities.
Dynamic Speed/Acceleration  When enabled, the Navigation Speed and Acceleration will be reread and changed dynamically while the behavior is running. 
Boldness Mode

The boldness attribute of an entity controls how much an entity takes his neighbors into account in the navigation algorithm. The greater the boldness the less the entity will try to avoid its neighbors, simulating a "bold" behavior. 

This attribute allows to choose how the boldness of each crowd entity is set:

  • Random: the boldness is set randomly between the values Boldness Min and Boldness Max. The boldness is influenced by the random seed of the Crowd Manager.
  • Per-Particle Attribute: the boldness is read from the per particle float attribute given by Boldnesspp Name.

The Boldness value is between 0 and 1.

Boldness Min See the Random option of the Boldness Mode described above. Available only when the Boldness Mode is set to Random.
Boldness Max See the Random option of the Boldness Mode described above. Available only when the Boldness Mode is set to Random.
Boldnesspp Name Name of the float per-particle attribute containing the Boldness value to use. For more explanations about how to use ppAttributes, see ppAttributes Handling
The Boldness is set to 0.5 if the pp attribute name is empty or invalid. Available only when the Boldness Mode is set to Per-Particle Attribute.
Time To Turn Around

The time it takes to do a 180 degrees turn. This parameter defines the maximum angular velocity of a navigating entity and can be used to facilitate (lower value) or make it more difficult (greater value) to turn.

Avoidance Type
Avoidance type of a navigation behavior

Three different collision avoidance algorithms are available in the Navigation Behavior. For more information about these navigators please refer to the related references:

  • Extrapolation : this avoidance algorithm tries to predict the future position of the neighbors of an agent based on their current position and speed, and then adapts the agent's speed and direction in order to avoid collision with surrounding entities and obstacles while still navigating towards a goal.
     
  • Social Force : this avoidance algorithm computes forces between an agent and its neighbors as well as the surrounding obstacles and changes the speed of the agent according to these forces.
     
  • RVO : this avoidance algorithm takes into account the reactive behavior of the other agents by implicitly assuming that the other agents make similar collision-avoidance reasoning.
1 [LamDon04] F. Lamarche and S. Donikian, "Crowd of Virtual Humans: a New Approach for Real Time Navigation in Complex and Structured Environments", 2004.
2 [HelMol95] D. Helbing and P. Molnar, "Social force model for pedestrian dynamics", 1995.
3 [BerLinMan08] J. Van den Berg, M. Lin and D. Manosha, "Reciprocal Velocity Obstacles for Real-Time Multi-Agent Navigation", 2008.

Sensors

This layout shows the Sensors that are used within the Navigation Behavior. The Default Sensor parameters can be changed in the relative Perception Locator.


Navigation Behavior Sensors attributes

Use Default Sensors

When checked, the navigation behavior uses default sensors. The default sensors are:

  • The default entities sensor: a cylinder sensor with a radius of 25 times the entity detection width and twice the entity detection height (see Entity Type Perception Attributes
  • The default obstacles sensor: a cylinder sensor with a radius of 8 times the entity detection width and twice the entity detection height (see Entity Type Perception Attributes



Default sensors: interior - default obstacles sensor, exterior - default entities sensor

Sensors list When Use Default Sensors is disabled, this control shows all the sensors that the navigation behavior uses (mapped to the CrowdBeNavigation node). Use the "+" and "-" buttons to add or remove sensors among the Sensor Locators in the scene. Without any mapped sensors, the navigation behavior will not be able to avoid entities or obstacles.

Advanced Attributes

This layout contains advanced parameters intended mainly for advanced users.


Advanced attributes of a navigation behavior
 
Group Laxness Specific to groups. Determines the individual navigation behaviors of entities inside a group, how lax they will be in trying to keep the formation when avoiding obstacles, or other entities. See Set Formation.
Update Period (in frames)

Determines the number of frames to wait before updating the navigation (1 meaning that the navigation is updated at each frame). Increasing this parameter also increases performance but the navigation will be less precise.

Min Extrapolation Time, Max Extrapolation Time

Specific to the Extrapolation algorithm. Time interval in which the entity predicts other entities/obstacles position to calculate the path to avoid it. A low value of 1 sec for min and max, means the entity predicts the position of others 1 sec ahead.

The actual extrapolation time is computed as a weighted average between the two parameters, using the boldness as weight (i.e.  Extrapolation Time = Boldness * Min Extrapolation Time + (1 - Boldness) * Max Extrapolation Time ). 
Obstacles Penalty Specific to the Extrapolation algorithm. Determines how far away from obstacles the entity will try to navigate. In other words it influences the distance at which the entity goes around the obstacle, a low value keeps it close to the obstacle and a high value keeps it far away.
Entities Penalty

Specific to the Extrapolation algorithm. Determines how far aways the entity will navigate from other entities to avoid collision. In other words it influences the distance at which the entity goes around other entities, a low value keeps it close to the other entities and a high value keeps it far away.

Repulsion Linear Factor Specific to the Social Force algorithm. It linearly increases the repulsion force.
Repulsion Inverse Exponential Factor Specific to the Social Force algorithm. When this factor increases, the repulsion force increases exponentially.
Body Force Linear Factor Specific to the Social Force algorithm. The body force counteracts body compression from neighbors.
Friction Force Linear Factor Specific to the Social Force algorithm. The friction force reduces speed due to physical contact with neighbors.
Awareness Field Specific to the Social Force algorithm. Angle in degrees describing the field of view of an entity. The effective angle of view is twice this value. All forces not in the field of view are decreased by the Rear Forces Linear Factor (see below)
Rear Forces Linear Factor Specific to the Social Force algorithm. The linear factor applied to forces that don't belong to the awareness field. If set to 1 (default), the awareness field has no influence.
Collision Penalty Specific to the RVO algorithm. It determines how far away from other entities the current entity will try to navigate. Increasing this parameter will make the entity try to stay further away from other entities. Its the penalty applied linearly to the minimum time to collision.
 

Velocity Sampling

These parameters are specific to the Extrapolation and RVO algorithms. The two algorithms work by choosing the best velocity among a sample of velocities (the one with the lowest penalty). The samples are built with default penalties defined with the parameters below. 

 
Acceleration Penalty / Deceleration Penalty
Sets the preferences of the entity in avoidance. A higher Acceleration Penalty value than Deceleration will make the entities favor Deceleration to avoid other entities.
Left Turn Penalty / Right Turn Penalty
Determines whether the entity favors right or left turn to avoid other entities. A higher value of Left Turn Penalty than the Right turn would make the entities favor Right turn during avoidance.
Nb Samples
Number of velocity samples used to compute the avoidance. Higher samples result in better avoidance but decreases performance.

Adapt Orientation

This layout contains advanced parameters for controlling Entities orientation adaptation.

 
Use Automatic Orientation Enables/disables the automatic orientation of the Entity visual representation by the navigation behavior. If disabled the Entity visual representation will not be oriented by this behavior.
Orientation Speed Threshold Speed threshold for adapting orientation. When the speed of the entity is lower than this value, its orientation is not adapted.
Orientation Low Pass Filter Number of low pass filter samples for adapting orientation. It represents the number of frames used for smoothing the orientation corrections applied to the entities (it's used to avoid orientation jitter).