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

Track Builder - Ceiling Mesh

Generates ceiling/tunnel mesh geometry above track segments in the track builder system.

Generates ceiling/tunnel mesh geometry above track segments in the track builder system.


Overview

util_trackBuilder_ceilingMesh creates a box-shaped ceiling above the track using a width-dependent LUT system (like basicCenters). The ceiling height is configurable per point via point.ceilingMeshHeight. Used for tunnels and covered track sections.

Module path: lua/ge/extensions/util/trackBuilder/ceilingMesh.lua


Exports (M)

FunctionSignatureDescription
getMeshes(segment) → tableReturns ceiling mesh data if the ceiling is active.

Internals

Cross-Section Shape

A 7-point rectangular box profile:

   1───6───7(=1)
   │       │
   2       5
   │       │
   3───4───3

Points 2, 3, 5, 6 are marked sharp for hard edges. The shape forms a closed rectangular cross-section.

Width-Based LUT

Like basicCenters, precomputes vertices and normals for each width step:

  • Width scaled by LUTDetail = 10 subdivisions per unit.
  • X coordinates scaled by width/2.
  • Normals computed with smooth/sharp handling.

Ceiling Height

Each point's ceilingMeshHeight offsets the entire cross-section upward via:

point.ceilingMeshHeight * point.orientation.nz

UV Mapping

  • U: Distance along cross-section from center × uv.width.
  • V: point.uvY * uv.height for along-track tiling.

Start/End Caps

Cap UVs are computed from the actual start/end point widths. Caps respect segment.meshInfo.ceilingMesh.startCap/endCap and forceStartCap/forceEndCap.

Quality and Activation

  • Returns empty at quality level 4.
  • Returns empty if segment.meshInfo.ceilingMesh.active is false.

Output Format

{
  verts = {{x,y,z}, ...},
  uvs = {{u,v}, ...},
  normals = {{x,y,z}, ...},
  faces = {{v, n, u}, ...},
  material = "track_editor_A_center",
  tag = "ceiling"
}

How It Works

  1. Track builder marks ceilingMesh.active = true and sets ceilingMeshHeight per point.
  2. getMeshes(segment) precomputes width LUT, then compiles the mesh.
  3. The ceiling floats above the track surface at the specified height.

Lua Examples

-- Used internally by track builder:
local ceilingMeshes = extensions.util_trackBuilder_ceilingMesh.getMeshes(segment)
-- Returns: {ceilingMeshData} or {} if inactive/low quality

Additional Exports

  • M.getMeshes - (undocumented)

Track Builder - Camera Transition

Smoothly lerps the free camera from its current position/rotation to a target over a specified duration.

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.

On this page

OverviewExports (M)InternalsCross-Section ShapeWidth-Based LUTCeiling HeightUV MappingStart/End CapsQuality and ActivationOutput FormatHow It WorksLua ExamplesAdditional Exports