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. |
-frame (-fr) | float | Frame at which the geometry will be evaluated | |
-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 |
-ignoreHiddenMeshes (-ihm) | int | If set to 1, hidden maya meshes will not be exported as a Terrain File. |
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" -fd "N:/export/";
// Result: N:/export/myTerrain.crowdField1.terrain.gtg//
Python Examples
import maya.cmds as cmds
cmds.glmTerrainExport(meshes=["pPlane1", "pCube1"], cf="crowdField1", fn="myTerrain", fd="N:/export/")
// Result: N:/export/myTerrain.crowdField1.terrain.gtg//