Navmesh Creator

The NavMesh Creator allows to convert any geometry into a Golaem NavMesh (i.e. navigable zones available to the Crowd Entities) and saves it in the Golaem Crowd file format (.gse). Loaded in a Terrain Locator, this NavMesh can be used for navigation and pathfinding, as well as for placing Entities while avoiding obstacles.

LAUNCH

  • Golaem Shelf: 
  • Golaem Menu: NavMesh Creator
  • MEL command: glmNavMeshCreatorCmd;

Geometry Prerequisites

The NavMesh Creator only handles meshes composed of triangles or convex quads. All other meshes will be considered invalid. However, Maya provides a tool that can triangulate any mesh, thus making it useable by the NavMesh Creator. Just select the geometry and use the Maya Polygons / Mesh / Triangulate menu.
 
The NavMesh Creator can either take one merged mesh, connected meshes, or disconnected meshes, it will not make a difference. When using disconnected meshes (i.e. disconnected navigation areas for the Crowd Entity), it is useful to uncheck the "Keep Only Greatest Connex Zone" parameter (see below).
 
Also notice that even if the geometry is displayed with a smooth level, the NavMesh Creator will only take into account the base geometry without smoothing.

Configuration

To start using the NavMesh Creator, first select the geometry you wish to transform. You can select any mesh or group of meshes in Maya.
If no mesh is selected a warning will be displayed.

Subdivision Type

The used subdivison technique creates a voxel mold that approximates the input geometry. The voxels are then used to extract contours around obstacles and around the edges of the world, which in turn are used to create the navigation mesh. The process uses the Recast library (see http://code.google.com/p/recastnavigation/).

This technique is very fast on most environments, especially when increasing the voxel size. On the other hand, the computed navigation mesh is only a loose approximation of the input geometry (depending on the voxel size), and some details like steps will not be preserved. The computation time mostly depends on the size of the environment, and it is not influenced by the topological complexity of it (like the number of triangles, of obstacles, holes, slopes, etc.).

Statistics

The statistics panel is updated each time the geometry selection changes. It shows the total number of triangles, the bounding box origin and the bounding box size of the selected meshes.

Crowd Unit

This combo box specifies how to convert Maya's units to Crowd units (see here for more explanation). It should also be set in the Crowd Manager afterwards.

Crowd Entity Parameters

This tab contains all the Entity related parameters needed to compute the navMesh. These parameters are available on both voxel based and exact subdivisions.
 
 
Maximum Step Height the maximum navigable step height for the simulated Entities (in maya units). An object with a height exceeding this parameter will be considered an obstacle and Entities will navigate around it. This parameter cannot exceed the minimum clearance (see below).
Minimum Radius the minimum radius of the simulated Entities (in maya units).
Minimum Clearance the minimum height of the simulated Entities (in maya units). This parameter cannot be smaller than the maximum step height (see above).
Maximum Navigable Slope the maximum angle of a slope on which Entities will navigate on the computed navMesh. Slopes with a higher angle will be considered obstacles.

By default, those parameters are set for regular human characters.

Advanced Parameters

Notice that the default advanced parameters are suitable for most cases. This tab contains the advanced parameters of the voxel subdivision. They are divided into 3 categories: Rasterization, Regions and Contours.

Rasterization Parameters

 
Double Sided Geometry Voxel based subdivision is sensitive to the orientation of the input triangles. Triangles facing down will not be taken into account unless this option is checked.
Voxel Length/Width Width and length of a voxel. Using bigger voxels reduces computing time but the computed navmesh will also be less precise.
Voxel Height Height of a voxel. Using bigger voxels reduces computing time but the computed navmesh will also be less precise.
Voxel Count Total number of voxels that will be generated from the input geometry, and also the number of voxels along each axis (x, y and z). The voxels count is updated when the voxel length/width, height, or input geometry change.
Tile Length/Width Large environments are divided into square tiles that can be computed individually, thus reducing the memory footprint of the computation. This parameter defines the length and width of each tile, in voxels.
Tiles Count Number of tiles along the x and the z axis. The tiles count is updated then the voxel length/width, the tile length/width or the input geometry change.

Regions Parameters

The walkable voxels are grouped together into regions, based on the obstacles detected in the environment.

 
Minimum Region Size This parameter defines the minimum number of interconnected voxels that are allowed to form isolated areas.
Merged Region Size Regions with a voxel count smaller than this parameter will be merged with other regions if possible.

Polygons Parameters

 
Maximum Edge Length This parameter sets the maximum length of an edge along the borders of the navigation mesh. Edges longer than this value will be split into several edges as needed.
Maximum Edge Error Raw contours are computed as limits between voxels of different regions. These contours are then simplified to reduce the number of edges in the navMesh. This parameter sets the maximum distance a simplified contour's borders should deviate from the original raw contour.
Maximum Vertices Per Poly The maximum number of vertices allowed for polygons generated during the subdivision process.
Erosion The distance to erode/shrink the walkable area away from obstacles.

Detailed Mesh Parameters

 
Sample Distance The sampling distance to use when generating the detail mesh
Maximum Sample Error The maximum distance the detail mesh surface should deviate from heightfield data

Greatest Zone

Additionally you can configure if you want to keep the greatest navigable zone only, or minimum surface size to keep.

Decreasing Tile Length/Width (and Voxel Length/Width if tiles are still too large) will give a more refined Roadmap, which can be helpful in case of large flat environments, when characters need to pass closer to obstacles in the navigation mesh.

Export

The NavMesh computation can be launched by using the "Compute and save…" button.Note that depending on the scene complexity, computation can take a long time and that you will not be able to use this Maya instance until it ends. You can check the computation progress in the NavMesh Creator status bar.
 
When computation is done, the process automatically creates a Terrain Locator with the exported .gse file loaded. The input geometry used to generate the navMesh is also mapped to the Terrain Locator as ground geometry.