TerrainBlock is the scene object that represents a heightfield terrain in a level.
It loads terrain height data from a .ter file and connects it with terrain material data, minimap imagery, terrain collision, and terrain rendering.
Most normal outdoor levels have one main terrain object, commonly named:
theTerrain
A typical TerrainBlock entry in items.level.json:
{
"class": "TerrainBlock",
"name": "theTerrain",
"__parent": "LevelObjects",
"position": [-1024, -1024, 0],
"terrainFile": "/levels/example/theTerrain.ter",
"materialTextureSet": "exampleTerrainMaterialTextureSet",
"minimapImage": "levels/example/example_minimap.png",
"squareSize": 1,
"maxHeight": 256,
"baseTexSize": 2048,
"castShadows": true
}
| Field | Type | Description |
|---|---|---|
class |
string | Must be "TerrainBlock". |
name |
string | Scene object name. Commonly "theTerrain". |
__parent |
string | Parent group, usually MissionGroup or a level object group. |
position |
array[3] | World position of the terrain block. |
terrainFile |
string/path | Source terrain data file, usually .ter. |
minimapImage |
string/path | Minimap image for this terrain block. |
materialTextureSet |
string | Terrain material texture set used for base, macro, and detail texture sizes. |
castShadows |
bool | Allows terrain to cast shadows. |
squareSize |
number | Terrain spacing in meters per height sample. |
maxHeight |
number | Maximum height range in meters. |
baseTexSize |
integer | Terrain base texture size setting. |
lightMapSize |
integer | Legacy terrain lightmap size. |
screenError |
integer | Legacy/not generally useful for modern authoring. |
TerrainBlock removes normal object scaling. Use squareSize, maxHeight, the heightmap, and the terrain import workflow instead of scaling the object.The main field is:
"terrainFile": "/levels/example/theTerrain.ter"
This file stores the terrain heightfield data used by the engine.
The level may also use matching terrain-related images and data:
For .ter, .terrain.json, terrain material, and texture packing details, see the Terrain format
documentation.
position places the terrain block in world space.
"position": [-1024, -1024, 0]
squareSize controls spacing between height samples:
"squareSize": 1
maxHeight controls the terrain height range:
"maxHeight": 256
Changing these values after authoring can affect roads, object placement, terrain material alignment, and gameplay readability.
materialTextureSet references the terrain texture setup used by the renderer.
"materialTextureSet": "exampleTerrainMaterialTextureSet"
Terrain materials are different from normal mesh materials. They are painted on the terrain and use base, macro, and detail texture behavior.
Groundmodel behavior is usually connected through terrain material setup rather than the TerrainBlock object itself.
For tools that create or modify terrain data:
terrainFile paths valid and portable.position, squareSize, and maxHeight unless the tool is intentionally rebuilding terrain scale.scale field to TerrainBlock; it is not the terrain sizing workflow.position does not match object and road placement.materialTextureSet or terrain materials are missing.squareSize, maxHeight, or terrain position.minimapImage points to an old image.terrainFile exists and loads.See also: Terrain authoring workflow , Terrain files , Groundmodels , GroundCover .
Was this article helpful?