glmExportTerrain

The glmExportTerrain command allows to export the Maya geometry used for Ground Adaptation in the simulation Terrain Locators of a Crowd Field as a cached Terrain geometry file (.gtg). This cached Terrain geometry can be then used by the Simulation Cache Layout tool to process ground snapping when some deformation layers are applied to the positions / orientations of the cached Entities. This command is used in the Terrain Attributes of the Simulation Cache Proxy Node
string glmExportTerrain [-meshes string] [-crowdField string] [-fileName string] [-fileDir string]

As it relies on previously exported Simulation Cache Files, this command can only be used once the simulation has been exported.

Flags

Long name (short name) Argument types Properties Description
-meshes (-me) string mandatory, multi-use Name of the maya meshes which will be exported as a Terrain File.
-crowdField (-cf) string mandatory Name of the CrowdField attached to this Terrain File (used to define the name of the exported terrain file)
-fileName (-fn) string mandatory Base name of the Terrain File
-fileDir (-fd) string mandatory Directory where the Terrain File will be exported

Return Value

This command the file path of the exported Terrain File or nothing if the export failed

MEL Examples

glmTerrainExport -me "pPlane1" -me "pCube1" -cf "crowdField1" -fn "myTerrain" -cd "N:/export/";
// Result: N:/export/myTerrain.crowdField1.terrain.gtg//