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
Mesh Spline - ImportMesh Spline - PopulateMesh Spline - Spline 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 ExtensionseditormeshSpline

Mesh Spline - Populate

Handles the placement of TSStatic mesh objects along mesh splines. Computes positions, rotations, and component selection for each mesh unit based on spacing, jitter, caps, and distribution mode.

Handles the placement of TSStatic mesh objects along mesh splines. Computes positions, rotations, and component selection for each mesh unit based on spacing, jitter, caps, and distribution mode.


Key Internal Functions

FunctionDescription
computeMeshMap(numMeshes, spline)Assigns mesh component paths and rotations to each placement slot
tryRemove(spline)Removes all placed TSStatic objects for a spline
populate(spline)Places all mesh units along the spline curve
updatePopulation(spline)Incremental update of existing placements

Mesh Assignment Logic

For each placement slot, the system picks a component using:

  1. Start/End Caps: First/last mesh forced to cap path if enabled
  2. Round-Robin: Cycles through active components (main, alias1-3) in order
  3. Random: Weighted random selection using mainRandomWeight and alias weights

Placement Pipeline

  1. Compute number of meshes from spline length and component extents + spacing
  2. Build mesh map via computeMeshMap()
  3. For each mesh unit:
    • Compute position on spline curve (chord-length or local interpolation)
    • Apply pre-rotation quaternion based on rot setting (0-3 = 90° increments)
    • Apply jitter offsets (forward, right, up)
    • Apply vertical offset
    • Create or update TSStatic in scene tree

Pre-Rotation Modes

RotAngleUse Case
00°Mesh X-axis along spline
190°Mesh Y-axis along spline
2180°Mesh X-axis reversed
3270°Mesh Y-axis reversed
-- Populate is called automatically when a spline is marked dirty
-- and has a valid mesh path set

Dependencies

  • editor/toolUtilities/geom
  • editor/toolUtilities/util

Functions

populateMeshSpline(spline, splineIdx)

Handles populate mesh spline.

  • spline (object)
  • splineIdx (any)

Returns: self

Additional Exports

  • M.populateMeshSpline
  • M.tryRemove

See Also

  • Mesh Spline - Import - Related reference
  • Mesh Spline - Spline Manager - Related reference
  • World Editor Guide - Guide

Mesh Spline - Import

Handles importing existing scene mesh sequences into the Mesh Spline tool. Analyses patterns in TSStatic chains to detect caps, distribution modes, and mesh types, then reconstructs a parametric splin

Mesh Spline - Spline Manager

Core data management module for the Mesh Spline tool. Handles creation, deletion, serialization, undo/redo, linking to master splines, and mesh spline presets.

On this page

Key Internal FunctionsMesh Assignment LogicPlacement PipelinePre-Rotation ModesDependenciesFunctionspopulateMeshSpline(spline, splineIdx)Additional ExportsSee Also