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
trackbuilder/trackBuilder - Track Builder Editor UI

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 Extensionstrackbuilder

trackbuilder/trackBuilder - Track Builder Editor UI

Reference for `extensions.trackbuilder.trackBuilder`, the ImGui-based editor UI for building procedural race tracks.

Reference for extensions.trackbuilder.trackBuilder, the ImGui-based editor UI for building procedural race tracks.


Overview

Comprehensive track building tool with a full ImGui editor interface. Supports creating tracks from parametric pieces (curves, straights, S-curves, loops, beziers, spirals), modifying per-piece properties (banking, height, width), painting materials, editing borders/walls/ceilings, placing obstacles, managing checkpoints, and driving the finished track. Includes a complete material editor with drag-and-drop texture/decal assignment.


Key Components

Piece Types

TypeParameters
freeCurveradius, length, direction
freeForwardlength
freeOffsetCurvelength, xOffset, hardness
freeLoopradius, xOffset
freeBezierxOff, yOff, dirOff, forwardLen, backwardLen, absolute, empty
freeSpiralsize, angle, inside, direction

Modifiers (Per-Piece)

ModifierRangeDescription
bank-720° to 720°Track banking angle
height-500m to 2000mTrack elevation
width0 to 50mTrack width
leftMesh / rightMeshBorder typesBorder mesh shape
centerMeshCenter typesCenter mesh shape
leftWall / rightWall0-50m heightSide walls
ceilingMesh0-50m heightCeiling/tunnel
checkpointposition, sizeRace checkpoint
obstaclesup to 10 per piecePlaced objects

Border Types

regular, bevel, wideBevel, highBevel, smallDiagonal, bigDiagonal, rail, none, demoConvex, smoothedRect, racetrack

Obstacle Types

cube, bump, sharp, ramp, obstacle, ring, cylinder, cone


Material Editor

Full material system with 8 material slots (A-H), each with:

  • Base texture: Shared diffuse map for center and border
  • Center decal: Glow map for center lane
  • Border decal: Glow map for border
  • Base/glow colors: RGBA color tinting
  • Glow toggle: Emissive rendering
  • Ground model: Physics material (affects tire friction)
  • Paint mode: Click-to-paint materials on track segments

Supports drag-and-drop for textures and decal maps.


Editor Windows

WindowContent
Main toolbarPiece placement, navigation, undo/redo
Advanced modifiersBanking, height, width with shift/ctrl step buttons
Borders & CentersBorder/center mesh selection and click-to-change
Walls & CeilingWall height, ceiling, interpolation
Material EditorTexture, color, glow, ground model, paint
ObstaclesPer-piece obstacle placement with transforms
SettingsTime of day, fog, race settings, track position
Save/LoadFile management, preview screenshots

How It Works

-- Track builder is opened via the editor
-- Internally managed by editor_trackBuilder and the tb (track builder core) module

-- Navigation between pieces
tbFunctions.navigate(1)    -- next piece
tbFunctions.navigate(-1)   -- previous piece
tbFunctions.navigate('first')
tbFunctions.navigate('last')

-- Modify current piece
modifierValues.bank.value[0] = 45
tbFunctions.modifierChange('bank')

modifierValues.width.value[0] = 15
tbFunctions.modifierChange('width')

-- Material painting (in Paint mode)
-- Click on track segments to apply selected material
selectMode("Paint")

Notes

  • Uses ImGui for all UI rendering
  • Track position can be aligned to camera or vehicle
  • Supports multi-sub-track editing
  • Materials use PersistenceManager for save/load
  • Ground model changes require "Drive" to apply
  • Screenshot/preview functionality with hidden-UI capture
  • Extensive i18n support via translateLanguage()

M.showTrackBuilder()

Shows the track builder UI.

  • Returns: None

M.hideTrackBuilder()

Hides the track builder UI.

  • Returns: None

M.toggleTrackBuilder()

Toggles the track builder UI visibility.

  • Returns: None

M.showTrackBuilderWindow(show)

Controls track builder window visibility.

  • Parameters: show - boolean - Whether to show or hide
  • Returns: None

M.onWindowResized(size)

Hook called when the game window is resized.

  • Parameters: size - table - New window dimensions
  • Returns: None

M.onUpdate()

Per-frame update hook for the track builder.

  • Returns: None

M.onClientEndMission()

Hook called when a mission ends, cleans up track builder state.

  • Returns: None

telemetry/core - Telemetry Event Collection System

Reference for `extensions.telemetry.core`, the central telemetry system that collects, buffers, and persists gameplay events to JSONL files.

ui/ambientSound - Ambient Sound Stream Player

Reference for `extensions.ui.ambientSound`, which plays randomized ambient sound streams from JSON configuration files.

On this page

OverviewKey ComponentsPiece TypesModifiers (Per-Piece)Border TypesObstacle TypesMaterial EditorEditor WindowsHow It WorksNotesM.showTrackBuilder()M.hideTrackBuilder()M.toggleTrackBuilder()M.showTrackBuilderWindow(show)M.onWindowResized(size)M.onUpdate()M.onClientEndMission()