RLS Studios
ProjectsPatreonCommunityDocsAbout
Join Patreon
BeamNG Modding Docs

Guides

Reference

Server CommandsGE UtilitiesGame Engine MainNavigation GraphScreenshot CaptureServerServer ConnectionSpawnpoint ManagerSimulation TimeVehicle SpawningSuspension Frequency Tester
Auto AnnotationBoosterCalibrate ESCCompile ImpostersCompile MeshesConfig List GeneratorDecal Roads EditorDependency TreeDoc CreatorVehicle ExporterFollow The White RabbitForest GeneratorGround Model DebugInput System UtilsInstanced Line Render DemoJBeam StatsLog StreamsMap TilesNode Beam ExportNode StreamPhotomodePrecompile ShadersPrecompile VehiclesProcedural Track GeneratorRectangle GeneratorRender Components APIResave MaterialsRich PresenceSave Dynamic DataScreenshot CreatorShowroomSort LinesStep HandlerTerrain GeneratorTest Extension ProxiesTest JSON Files SyntaxVehicle Rope DebugBatch WorkerWebSocket Test
Basic BordersBasic CentersBorder Wall MeshCamera TransitionCeiling MeshTrack MarkersMaterial UtilTrack MeshesMulti Track MergerObstacle PlacerTrack PiecesProcedural PrimitivesQuickrace SetupSegment To Procedural MeshSpline Track

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 Markers

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

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


Exports

KeySignatureDescription
interpolate(nameOfField, track)Interpolates a named field across the track segments
interpolatePointsOfSegment(segment, startValue, endValue, startLength, endLength, nameOfField)Interpolates points within a single segment
interpolateOverPoints(nameOfField, track)Point-based interpolation pass
interpolateOverSegments(nameOfField, track)Segment-based interpolation pass
interpolateSingle(nameOfField, track)Single-segment interpolation (checkpoints)
interpolateField(name, t, a, b, point, length)Applies a specific field's interpolation function
transformMarkers(name, allNodes)Positions/rotates visual markers for a field type
hideMarkers(name)Hides all markers of a given type
clearMarkers(name)Deletes all marker objects of a given type
addMarkerChange(name, index)Marks a piece index as needing re-interpolation
unloadAll()Resets all marker lists
caps(segments, closed)Calculates start/end cap flags for mesh segments
namestableList of marker field names: bank, height, width, checkpoint, leftWall, rightWall, ceilingMesh

Interpolation Functions (also exported)

KeySignatureDescription
step(t) → value, slopeNo interpolation (constant)
linear(t) → value, slopeLinear ramp 0→1
pow2(t) → value, slopeQuadratic ease
pow3(t) → value, slopeCubic ease
pow4(t) → value, slopeQuartic ease
smoothSlope(t) → value, slopeHermite smooth step (zero slope at endpoints)
smootherSlope(t) → value, slopePerlin smoother step

Internals

  • Marker types are defined in a types table mapping each field name to its interpolation strategy (points, segments, both, single), interpolation function, transform function, and optional cap function.
  • Visual markers are TSStatic objects created on-demand and pooled via expandTruncateList. Colors distinguish types: red=bank, blue=height, green=width, white=checkpoint, orange=walls.
  • markerChanges tracks which piece indices need re-interpolation per field name. After interpolation, the changes are cleared.
  • Cap logic determines whether mesh start/end caps are needed at boundaries between different wall/mesh values.

How It Works

  1. When a user edits a marker (e.g. bank angle), addMarkerChange("bank", pieceIndex) is called.
  2. interpolate("bank", track) dispatches to the correct strategy - for bank/height/width it uses interpolateOverPoints, which finds bracketing control points and interpolates intermediate segment points.
  3. Each point receives computed values (bank angle, width, zOffset, pitch) using the chosen easing function (smooth, linear, etc.).
  4. transformMarkers("bank", allNodes) repositions the 3D marker objects in the scene.
  5. caps(segments, closed) updates mesh cap flags so adjacent segments with different meshes get proper end/start caps.
-- Mark piece 5's bank as changed and re-interpolate
markers.addMarkerChange("bank", 5)
markers.interpolate("bank", track)
markers.transformMarkers("bank", allNodes)
markers.caps(track, isClosed)

Additional Exports

  • M.addMarkerChange - (undocumented)
  • M.caps - (undocumented)
  • M.clearMarkers - (undocumented)
  • M.hideMarkers - (undocumented)
  • M.interpolate - (undocumented)
  • M.interpolateField - (undocumented)
  • M.interpolateOverPoints - (undocumented)
  • M.interpolateOverSegments - (undocumented)
  • M.interpolatePointsOfSegment - (undocumented)
  • M.interpolateSingle - (undocumented)
  • M.linear - (undocumented)
  • M.names - (undocumented)
  • M.pow2 - (undocumented)
  • M.pow3 - (undocumented)
  • M.pow4 - (undocumented)
  • M.smoothSlope - (undocumented)
  • M.smootherSlope - (undocumented)
  • M.step - (undocumented)
  • M.transformMarkers - (undocumented)
  • M.unloadAll - (undocumented)

See Also

  • Track Builder - Basic Borders - Related reference
  • Track Builder - Basic Centers - Related reference
  • Track Builder - Border Wall Mesh - Related reference
  • Game Engine Overview - Guide

Ceiling Mesh

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

Material Util

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.

On this page

ExportsInterpolation Functions (also exported)InternalsHow It WorksAdditional ExportsSee Also