RLS Studios
ProjectsPatreonCommunityDocsAbout
Join Patreon
BeamNG Modding Docs

Guides

Reference

server/commands - Camera & Input Commandsge_utils - Game Engine Utility Functionsmain.lua - GE Lua Entry Point & Game Loopmap.lua - Navigation Graph (AI Road Map)screenshot.lua - Screenshot Systemserver/server - Level Loading & Game ServerserverConnection - Client-Server Connection Manager`setSpawnpoint` - Default Spawn Point Persistence`simTimeAuthority` - Simulation Time & Bullet Time Control`spawn` - Vehicle Spawning & Safe Placement`suspensionFrequencyTester` - Suspension Natural Frequency Analysis
Auto AnnotationBoosterCalibrate ESCCompile ImpostersCompile MeshesConfig List GeneratorDecal Roads EditorDependency TreeDoc CreatorExport (glTF)Follow The White RabbitForest GeneratorGround Model DebugInput System UtilsInstanced Line Render DemoJBeam StatsLog StreamsMap TilesNode Beam ExportNode StreamPhotomodePrecompile ShadersPrecompile VehiclesProcedural Track (Gymkhana Generator)Rectangle GeneratorRender Components APIResave MaterialsRich PresenceSave Dynamic DataScreenshot Creator (Vehicle Thumbnails)ShowroomSort LinesStep HandlerTerrain GeneratorTest Extension ProxiesTest JSON Files Syntaxutil/vehicleRopeDebug - Rope Physics Debug UIutil/worker - Batch Job Workerutil/wsTest - WebSocket Test Server
Track Builder - Basic BordersTrack Builder - Basic CentersTrack Builder - Border Wall MeshTrack Builder - Camera TransitionTrack Builder - Ceiling MeshtrackBuilder/markers - Track Marker Interpolation & VisualizationtrackBuilder/materialUtil - Track Material ManagementtrackBuilder/meshes - Cross-Section Mesh DefinitionstrackBuilder/multiTrackMerger - Track Intersection MergingtrackBuilder/obstaclePlacer - Track Obstacle PlacementtrackBuilder/pieces - Track Piece Geometry GenerationtrackBuilder/proceduralPrimitives - Procedural 3D Primitive GeneratorstrackBuilder/quickraceSetup - Quick Race Track LoadertrackBuilder/segmentToProceduralMesh - Segment Mesh GeneratortrackBuilder/splineTrack - Main Track Builder Engine

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 ExtensionsutiltrackBuilder

trackBuilder/materialUtil - Track Material Management

Reference for `extensions/util/trackBuilder/materialUtil.lua`. Manages track surface materials (colors, textures, glow, ground type) for the 8 material slots (A–H) used by the track editor.

Reference for extensions/util/trackBuilder/materialUtil.lua. Manages track surface materials (colors, textures, glow, ground type) for the 8 material slots (A–H) used by the track editor.


Exports

KeySignatureDescription
getMaterials() → tableReturns current materials with default values removed
setMaterials(materials, skipSet)Applies a table of materials keyed by letter
setSingleMaterial(letter, material, skipSet)Applies a full material definition to one slot
loadMaterials(?)Reference exists but function not defined locally
currentMaterialstableLive material state for all 8 slots
resetMaterialsToDefault(letter?)Resets one or all slots to original defaults

Internals

  • 8 material slots labeled A–H. Each slot has a center and border material object looked up via scenetree.findObject("track_editor_X_center/border").
  • Material properties: baseCenterColor, baseBorderColor, centerColor, borderColor, baseTexture, baseTextureN, baseTextureS, centerTexture, borderTexture, centerGlow, borderGlow, groundtype.
  • Defaults: Slots A–D are light gray asphalt with colored borders (orange/green/blue/red). Slots E–H are dark with glow-enabled neon strips.
  • removeDefaults(material, original) strips unchanged values for compact serialization.
  • fillDefaults(material, original) restores omitted values from the original template.

How It Works

  1. loadMaterial(letter) finds the scenetree material objects and reads their current state.
  2. setSingleMaterial(letter, material) writes all properties (textures, colors, glow, groundmodel) then flushes and reloads the engine material.
  3. getMaterials() loads all 8 slots, then returns a diff against the originals so only changed properties are included.
  4. setMaterials(materials) iterates the input table and applies each slot via setSingleMaterial.
-- Change slot A border to green
local mat = materialUtil.currentMaterials['A']
mat.borderColor = {0.2, 0.8, 0.2, 1}
materialUtil.setSingleMaterial('A', mat)

-- Get compact materials for saving
local mats = materialUtil.getMaterials()
-- mats['A'] only contains fields that differ from defaults

Additional Exports

  • M.currentMaterials - (undocumented)
  • M.getMaterials - (undocumented)
  • M.loadMaterials - (undocumented)
  • M.resetMaterialsToDefault - (undocumented)
  • M.setMaterials - (undocumented)
  • M.setSingleMaterial - (undocumented)

trackBuilder/markers - Track Marker Interpolation & Visualization

Reference for `extensions/util/trackBuilder/markers.lua`. Manages visual editor markers (bank, height, width, checkpoints, walls, ceiling) and interpolates track properties between control points.

trackBuilder/meshes - Cross-Section Mesh Definitions

Reference for `extensions/util/trackBuilder/meshes.lua`. Defines cross-section profiles (tubes and side walls) used by the track builder's procedural mesh system.

On this page

ExportsInternalsHow It WorksAdditional Exports