glmTerrainFileRaycast

As of August 5th, 2025, Golaem will no longer provide direct support.

All support for Autodesk Golaem will now be handled exclusively through Autodesk support channels and this website will be deactivated soon.

Please bookmark the Autodesk Golaem Support section for any future support needs related to Autodesk Golaem packages.

The glmTerrainFileRaycast command allows to get elevations and normals of a Golaem Terrain File (.gtg) at some specific positions :
floatArray glmTerrainFileRaycast [-terrainFile string] [-frame int] [-positions float float float]

Flags

Long name (short name) Argument types Properties Description
-terrainFile (-tf) string mandatory File path to the Character File to get / set.
-frame (-fr) int   Frame at which the terrain file will be evaluated (0 by default)
-positions (-pos) float float float mandatory, multi-use Positions at which the elevations and normals will be returned

Return Value

This command returns 6 values per positions: 3 for the terrain position (including elevation), 3 for the normal at the terrain position. Notice that the returned X and Z component of the return terrain position will be the same than the input X and Z position.

MEL Examples

glmTerrainFileRaycast -terrainFile "C:/terrain.gtg" -positions 0 0 0 -positions 1 0 1;
// Result: 0 6.029333 0 15.881 18.812 1.044 1 5.889918 1 12.124 21.123 -1.4918 //

 

Python Examples

import maya.cmds as cmds
cmds.glmTerrainFileRaycast(terrainFile="C:/terrain.gtg", positions=[[0, 0, 0], [1, 0, 1]])
// Result: 0 6.029333 0 15.881 18.812 1.044 1 5.889918 1 12.124 21.123 -1.4918 //