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
Sidewalk Spline KitSidewalk Spline PopulateSidewalk 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 ExtensionseditorsidewalkSpline

Sidewalk Spline Populate

Handles the procedural placement of sidewalk meshes along splines - places rectangular pieces along the path with parallel-transport framing, fills gaps with triangular "pizza" pieces at turns, and ma

Handles the procedural placement of sidewalk meshes along splines - places rectangular pieces along the path with parallel-transport framing, fills gaps with triangular "pizza" pieces at turns, and manages mesh object pools.


Public API

FunctionSignatureDescription
M.populateSidewalkSpline(spline, splineIdx)Places all sidewalk meshes along a spline using rect + pizza pieces
M.tryRemove(spline)Removes all static mesh objects for a given spline

Placement Algorithm

Rect Placement

  1. Walk along the spline at fixed intervals (rectLength = 2.5m)
  2. At each step, evaluate position and frame using arc-length parameterization
  3. Apply parallel-transport framing for smooth roll continuity
  4. Align inner corners between consecutive rects for seamless joins
  5. Store frame data (forward, right, up) for pizza insertion pass

Pizza (Triangle) Placement

  1. After all rects are placed, iterate consecutive pairs
  2. Compute turn angle from forward vectors
  3. If angle ≥ 1° (pizzaMinAngleDeg), insert a scaled triangle piece
  4. Triangle base aligns with outer edge gap, scaled to fill the wedge
  5. Interior direction computed from inner corner midpoints

Mesh Dimensions

PieceWidth (X)Length (Y)
Rect (square.dae)2.0m2.5m
Pizza (triangle.dae)2.0m (scaled)2.5m (scaled)

Mesh Pool Management

  • Each spline maintains pools keyed by mesh path
  • Pools grow on demand (create TSStatic objects) and shrink when excess
  • Meshes are placed into scene tree folders per spline
  • All meshes use cansave = true for level persistence

Key Internal Functions

FunctionPurpose
evalFrameAtArc(spline, s, pos, fwd, up)Evaluates position and frame at arc length s using binary search on arcLengths
manageMeshPools(spline, splineIdx, numPlacements)Adds/removes TSStatic objects to match placement count
getNextMeshFromPool(path, splineId)Returns next available mesh from the pool for a given path

Notes

  • Maximum 2000 meshes per spline (maxMeshesPerSpline)
  • Exit distance: stops 2m before end of spline
  • Vertical offset applied uniformly to all placements
  • Pizza pieces are non-uniformly scaled (X and Y independently) to fill wedge gaps
  • Uses vec3.setCross, setRotate, setRotationFromTo for efficient frame computation

See Also

  • Sidewalk Spline Kit - Related reference
  • Sidewalk Spline Manager - Related reference
  • World Editor Guide - Guide

Sidewalk Spline Kit

Handles loading sidewalk mesh kits from folders - discovers meshes, extracts anchor points, groups base meshes with variations, and builds distribution groups for piece selection.

Sidewalk Spline Manager

Manages sidewalk spline data structures, including creation, removal, splitting, joining, undo/redo, profile copy/paste, and serialization. Works with `kit`, `populate`, and `geom` submodules.

On this page

Public APIPlacement AlgorithmRect PlacementPizza (Triangle) PlacementMesh DimensionsMesh Pool ManagementKey Internal FunctionsNotesSee Also