glmNavMeshCreator

glmNavMeshCreator command provides a way to create a NavMesh File (.gse) from a set of Maya meshes.
glmNavMeshCreator [-outputFile string] [-meshList string] [-crowdUnit int] [-navMeshType int] [-maxStepHeight double] [-agentRadius double] [-minClearance double] [-maxNavSlope double] [-keepGreatestConnexZone bool] [-connexZoneSurface double] [-doubleSidedGeometry bool] [-voxelWidth double] [-voxelHeight double] [-tileSize int] [-minRegionSize int] [-mergedRegionSize int] [-maxEdgeLength double] [-maxEdgeError double] [-maxVertsPerPoly int] [-detailSampleDist int] [-detailSampleMaxError int] [-erosion int]

Flags

Long name (short name) Argument types Properties Description
-outputFile (-of) string mandatory File path where to write the NavMesh file (.gse)
-meshList (-ml) string mandatory, multi-use List of the meshes to process
-crowdUnit (-cu) string   Crowd Unit to use ( 0 stands for millimeters, 1 for centimeters, 2 for decimeters, 3 for meters, 4 for inches, 5 for feet, 6 for inches )
-navMeshType (-nmt) string   0 for Voxel based NavMesh creation - 1 for Maya mesh based NavMesh Creation. If set to 1 only the agentRadius flag is required
-maxStepHeight (-msh) string   See here.
-agentRadius (-ar) string   See here.
-minClearance (-mnc) string   See here.
-maxNavSlope (-mns) string   See here.
-keepGreatestConnexZone (-kgc) string   See here.
-connexZoneSurface (-czs) string   See here.
-doubleSidedGeometry (-dsg) string   See here.
-voxelWidth (-vw) string   See here.
-voxelHeight (-vh) string   See here.
-tileSize (-ts) string   See here.
-minRegionSize (-mrs) string   See here.
-mergedRegionSize (-mes) string   See here.
-maxEdgeLength (-mel) string   See here.
-maxEdgeError (-mee) string   See here.
-maxVertsPerPoly (-mvp) string   See here.
-detailSampleDist (-dsd) string   See here.
-detailSampleMaxError (-dme) string   See here.
-erosion (-ers) string   See here.

Return Value

This command returns true or false if it has succeeded or failed. 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.

MEL Examples

// convert a list of meshes in a NavMesh file
glmNavMeshCreator -outputFile "N:/navMesh.gse" -meshList "pPlane1" -meshList "pCube1" -maxStepHeight 0.41 -agentRadius 0.15 -minClearance 2.0 -maxNavSlope 45.0;

Python Examples

import maya.cmds as cmds
# convert a list of meshes in a NavMesh file
cmds.glmNavMeshCreator(outputFile='N:/navMesh.gse', meshList=['pPlane1', 'pCube1'], maxStepHeight=0.41, agentRadius=0.15, minClearance=2.0, maxNavSlope=45.0)