RLS Studios
ProjectsPatreonCommunityDocsAbout
Join Patreon
BeamNG Modding Docs

Guides

Reference

Server CommandsGE UtilitiesGame Engine MainNavigation GraphScreenshot CaptureServerServer ConnectionSpawnpoint ManagerSimulation TimeVehicle SpawningSuspension Frequency Tester
Editor AI TestsEditor AI VisualizationEditor – Assembly Spline ToolAsset BrowserAsset DeduplicatorAsset Management ToolSFX Previewer (Audio Events List)Audio Ribbon EditorAutoSaveBarriers EditorBiome ToolBuilding EditorBulk RenameCamera BookmarksCamera TransformCamera Path EditorCEF HelperCo-Simulation Signal EditorCrawl Data EditorCreate Object ToolDataBlock EditorDecal EditorDecal Spline EditorDocumentation HelperDrag Race EditorDrift Data EditorDrive Path EditorDynamic Decals Tool (Vehicle Livery Creator)Engine Audio DebugExtensions DebugExtensions EditorFFI Pointer Leak TestFile DialogFlowgraph EditorForest EditorForest ViewEditor Gizmo HelperEditor Ground Model Debug HelperEditor Headless Editor TestEditor Icon OverviewEditor ImGui C DemoEditor InspectorEditor Layout ManagerEditor Level SettingsEditor Level ValidatorEditor LoggerEditor Log HelperEditor MainEditor Main MenuEditor Main ToolbarEditor Main UpdateMap Sensor EditorMaster Spline EditorMaterial EditorMeasures Inspector HeaderMesh Editor (Base)Mesh Road EditorMesh Spline EditorMission EditorMission PlaybookMission Start Position EditorMulti Spawn Manager (Vehicle Groups)Navigation Mesh EditorEditor News MessageObject Tool (Object Select Edit Mode)Object To Spline EditorParticle EditorPerformance Profiler / Camera RecorderPhysics ReloaderPrefab Instance EditorEditor PreferencesRace / Path EditorRally EditorRaycast Test Editor ToolRenderer Components Editor ToolRender Test Editor ToolResource Checker Editor ToolRiver EditorRoad Architect EditorRoad DecorationsRoad Editor (Decal Road)Road Network ExporterRoad River Cache HandlerRoad River GUIRoad Spline EditorRoad Template EditorRoad UtilitiesScene TreeScene ViewScreenshot Creator BootstrapScript AI EditorScript AI ManagerSensor Configuration EditorSensor DebuggerShape EditorShortcut LegendSidewalk Spline EditorSites EditorSlot Traffic EditorSuspension Audio DebugTech Server ManagerTerraform ToolTerrain And Road ImporterTerrain EditorTerrain Materials EditorText EditorTool ManagerTool ShortcutsTraffic DebugTraffic ManagerTraffic Signals EditorUndo History ViewerVehicle Bridge TestVehicle Detail ViewerVehicle Editor MainEditor - VisualizationEditor Viz HelperEditor Water Object HelperEditor Windows Manager

UI

Resources

BeamNG Game Engine Lua Cheat SheetGE Developer RecipesMCP Server Setup

// RLS.STUDIOS=true

Premium Mods for BeamNG.drive. Career systems, custom vehicles, and immersive gameplay experiences.

Index

HomeProjectsPatreon

Socials

DiscordPatreon (RLS)Patreon (Vehicles)

© 2026 RLS Studios. All rights reserved.

Modding since 2024

API ReferenceGE Extensionseditor

Terrain Editor

Main terrain editing extension - provides brush-based terrain painting, heightmap manipulation, material management, and terrain block proxy system.

Main terrain editing extension - provides brush-based terrain painting, heightmap manipulation, material management, and terrain block proxy system.


Public API

FunctionSignatureDescription
M.onEditorInitialized()Registers terrain editor windows, edit modes, and preferences
M.onEditorDeactivated()Cleanup when editor is deactivated
M.onEditorGui()Main terrain editor GUI with brush controls and material panels
M.onEditorBeforeSaveLevel()Saves terrain data before level save
M.onEditorRegisterPreferences(prefsRegistry)Registers terrain editor preferences
M.onEditorPreferenceValueChanged(path, value)Handles preference changes
M.onEditorObjectAdded(objectId)Handles new terrain object addition
M.onClientEndMission()Cleanup on mission end
M.changeBrushSize(...)Changes the terrain brush size
M.updateTerrainBlockProxies()Updates terrain block material proxy list
M.updateMaterialLibrary()Refreshes the material library
M.getUniqueMtlName(...)Generates a unique material name
M.createMaterialProxy(...)Creates a material proxy object
M.getMtlIdByName(name)Returns material ID by name
M.setMaterialsDirty()Marks materials as needing save
M.setTerrainDirty()Marks terrain as needing save
M.saveMaterials()Saves terrain materials to disk
M.saveTerrainAndMaterials()Saves both terrain and materials
M.copyMaterialProxyWithInputs(...)Copies a material proxy with all input maps
M.setupVars(...)Initializes editor variables
M.dragDropTarget(...)Handles drag-drop for material assignment
M.updatePaintMaterialProxies()Updates paint material proxy list
M.updateMap(...)Updates a texture map on a material
M.removeMap(...)Removes a texture map from a material
M.selectPaintMaterial(...)Selects a paint material by proxy
M.fixGroundmodelName(...)Fixes ground model name references
M.checkForTerrainMaterialFileFormat()Checks material file format version
M.deleteMaterialInJson(name)Deletes a material from the JSON file
M.getTerrainBlockMaterialIndex(name)Returns material index on terrain block
M.getVars()Returns the internal variables table
M.getTerrainEditor()Returns the terrain editor C++ object
M.getTerrainBlock()Returns the current terrain block object
M.getMaterialsInJson()Returns materials loaded from JSON
M.getSelectedPaintMaterialProxy()Returns the currently selected paint material proxy
M.getPaintMaterialProxies()Returns all paint material proxies
M.getTerrainBlockProxies()Returns all terrain block proxies
M.getMatFilePath()Returns the material file path
M.getTerrainFolder()Returns the terrain folder path
M.getErrors()Returns current error state table
M.getLevelPath()Returns the level path
M.fixedFileFormat()Clears the deprecated material file format error
M.beginChangeBrushSizeWithKeys(direction)Starts key-based brush size change
M.endChangeBrushSizeWithKeys()Stops key-based brush size change

Notes

  • Core terrain editing extension with extensive material proxy system
  • Brush-based painting for heightmap and material layers
  • Supports terrain import dialog
  • Material file format: art/terrains/main.materials.json

See Also

  • Editor AI Tests - Related reference
  • Editor AI Visualization - Related reference
  • Editor – Assembly Spline Tool - Related reference
  • World Editor Guide - Guide

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.

Terrain Materials Editor

Editor window for editing terrain material properties - texture maps, ground model assignment, and material layer configuration.

On this page

Public APINotesSee Also