Terrain Locator

The Terrain Locator determines:

  • the ground geometry on which to place Entities and to which the Entities will adapt their feet height
  • the navigation mesh (static obstacles, borders of the environments, inaccessible areas...) that will be used during the navigation of Entities in a simulation.

Notice that, even if the navigation mesh is often computed from the ground geometry, those can be different if required. It is possible to use a rough geometry proxy to create a navigation mesh (will be faster to compute) and use a more detailed geometry as ground geometry. It is also possible to use the "Default Plane" navigation mesh mode if there are no obstacles in your scene (and even if your geometry has reliefs.

CREATION

  • Golaem Shelf: 
  • Golaem Menu: Environments / Terrain Locator
  • Crowd Tool: NavMesh Creator
  • MEL command: glmTerrainLocatorCmd;
If the Maya selection contains meshes when creating a Terrain Locator, they will also be mapped to the Terrain Locator.
 
Note that several Terrain 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 Terrain Locators, their Entities will not be able to avoid each other.

Configuration

Ground Attributes

Ground Mode Ground to which the Entities will adapt during the crowd simulation. The available choices are:
  • Default Plane: the ground is considered to be an infinite plane at zero height (y = 0)
  • NavMesh Ground: the ground is the navMesh loaded from the NavMesh File attribute. This can be faster than Maya Geometry but also less accurate
  • Maya Geometry: this option allows to map any Maya geometry as ground to be used in the crowd simulation.
  • None: no ground is used
In Maya Geometry Maya polygons used as ground geometry, when the Ground Type is set to Maya Geometry.
update Mode A ground can be either static, transformed by a matrix, or dynamically deformed
  • Static: the mesh is not moved/modified during the simulation.
  • Dynamic transform: the ground is transformed (moved or rotated), but is not deformed
  • Dynamic Mesh: the ground can be transformed AND potentially deformed.
Pin On Ground If checked, the entities displacement will be adapted toward the terrain geometry. Alone, it impacts mainly the navigation part.
Orient On Ground Normal If using Pin On Ground, also change the entity normal so that playing a walk movement will walk all around a sphere for example.
Double Sided If checked, all the mapped geometry will be used as ground geometry, otherwise only the geometry facing up will be used.
Ignore hidden meshes Should the hidden meshes be used or ignored for this ground.

Navigation Attributes

NavMesh Mode

Mode of the navigation mesh. The available choices are:

  • Default Plane: the navigation mesh is considered to be an infinite space without any obstacles
  • NavMesh File: the navigation world is defined by a navigation mesh file (see below).
  • None: no navigation mesh is used

The navigation mesh is required when using navigation and path finding (see GoTo Behavior and Navigation Behavior).

NavMesh File Navigation mesh file (gse file) to use in the crowd simulation and to display. The Navigation Mesh gile can be computed with the Navmesh Creator.
NavMesh is deformable When using a Maya Mesh as ground, after producing a navmesh file form this mesh (with use maya triangulated mesh option), this option may be nabled to track the mesh deformation. Note that this option is experimental, and some crashes may occur if the tracked mesh is not the one used to produce the navmesh file. Only one (the first) maya mesh may be tracked by the navmesh.

Display Attributes

Obstacle Borders (red lines)

Ff checked the locator displays the obstacles in the environment. If no NavMesh file is loaded nothing is displayed.

When a terrain locator with a NavMesh is used with the Population Tool or with the GoTo Behavior and the Navigation Behavior, the zones surrounded by obstacle borders are not accessible by Entities

Roadmap (orange lines) graph linking all the accessible areas in the environment. If an area or a corridor is not covered by the roadmap, it means that it is not accessible.
Partial Borders (blue lines) these are special constraints in the navMesh. They can be crossed by Entities
Free Borders (grey lines) these are all the other edges in the navMesh that can be crossed by Entities
Navigation Cells (green lines and triangles) all the walkable cells of a navigation mesh. If Draw Connex Zones (see below) is not empty, only the cells in the given connex zones are drawn
Ground Geometry (dark grey lines and triangles) the input ground geometry
Specific Edges Draws the specified edges. To specify multiple ids, use "-" for a range and "," for multiple ids or ranges (ex: 0-3,6-8,11,12). The available ids are shown in the Statistics below (0 to Edges Count-1)
Specific Cells Draws the specified cells. To specify multiple ids, use "-" for a range and "," for multiple ids or ranges (ex: 0-3,6-8,11,12). The available ids are shown in the Statistics below (0 to Cells Count-1)
Draw Connex Zones Draws only the cells belonging to the specified Connex Zones when Navigation Cells is checked. To specify multiple ids, use "-" for a range and "," for multiple ids or ranges (ex: 0-3,6-8,11,12). The available ids are shown in the Statistics below (Connex Zones). There can be than one Connex Zones only if "Keep Only Greatest Connex Zone" is unchecked in the Navmesh Creator.
Statistics

Shows navmesh statistics:

  • Cells Count
  • Edges Count
  • Connex Zones Count
  • Connex Zones
Display Color Main color of the Terrain Locator
Line Width width of the lines drawn by the Terrain Locator
Locator Height height difference to add to the lines drawn by the Terrain Locator

Animating a Terrain Locator

It is possible to parent a Terrain Locator to animate it. Golaem handles parenting the TerrainLocator, and its maya mesh used as ground, in a parent group, and animate them. The NavigationMesh will be transformed accordingly, allowing to compute a complex terrain in voxel mode (see NavMesh Creator) and transform it afterward. 

It is then possible to simulate people boarding on a boat/train, which later goes away. It can be achieved by using a SetTerrain Behavior, a still Terrain Locator, and another one which can be animated (the boat / train / etc). Of course, There has to be some overlapping geometry between the two terrain locators, or a third Terrain Locator overlapping both, to allow a smooth transitionning between the terrains (those can be made of hidden geometry if needed). The train / boat Terrain Locator would require at least a "pin to ground" to move their passengers.