API ReferenceGE Extensionseditor
Terrain And Road Importer
Editor tool for importing terrain heightmaps and road networks from external data - supports IDW interpolation, peak-based terrain conforming, and DecalRoad generation.
Editor tool for importing terrain heightmaps and road networks from external data - supports IDW interpolation, peak-based terrain conforming, and DecalRoad generation.
Public API
| Function | Signature | Description |
|---|---|---|
M.conformTerrainToPeaks | (...) | Conforms terrain to a set of peak points using IDW interpolation |
M.importTerrain | (...) | Imports terrain heightmap data |
M.importRoads | (...) | Imports road network data and creates DecalRoad objects |
M.reset | () | Resets the importer state |
M.toggleWorldEditor | () | Toggles the world editor visibility |
M.onEditorGui | () | Main GUI with import controls and parameter sliders |
M.onEditorInitialized | () | Registers the importer window and edit mode |
Key Features
- Terrain import: Load heightmap data and apply to terrain blocks
- Road import: Create DecalRoad objects from road network data
- IDW interpolation: Inverse Distance Weighting for smooth terrain generation from sparse peaks
- Parameter controls: Z-max height, DOI (domain of influence), margin sliders
Dependencies
| Module | Purpose |
|---|---|
kdtreebox2d | Spatial indexing for efficient point queries |
Notes
- Uses
decalRoadMaterial = "road_asphalt_2lane"as default road material - Section size for road discretisation: 1.0m
- Edge smoothing width: 2 pixels
See Also
- Editor AI Tests - Related reference
- Editor AI Visualization - Related reference
- Editor – Assembly Spline Tool - Related reference
- World Editor Guide - Guide
Terraform Tool
Utility extension providing terraforming functions and preference-backed parameters - used by other editor tools for terrain manipulation.
Terrain Editor
Main terrain editing extension - provides brush-based terrain painting, heightmap manipulation, material management, and terrain block proxy system.