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.
- Golaem Shelf:
- Golaem Menu: NavMesh Creator
- MEL command: glmNavMeshCreatorCmd;
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.).
Crowd Entity Parameters
|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.
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.
|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.|
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.|
|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|
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.