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
Road Architect - ClothoidRoad Architect - DecalsRoad Architect - ExportRoad Architect - GeometryRoad Architect - GroupsRoad Architect - ImportRoad Architect - JunctionsRoad Architect - LinkRoad Architect - OverlaysRoad Architect - ProfilesRoad Architect - RenderRoad Architect - Road MeshRoad Architect RoadsRoad Architect - Static MeshRoad Architect - Static Mesh ManagerRoad Architect - TerraformRoad Architect - Tunnel MeshRoad Architect Utilities

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 ExtensionseditortechroadArchitect

Road Architect - Render

Handles all editor viewport rendering for the Road Architect. Draws road surfaces, outlines, centerlines, lane numbering, direction arrows, node spheres, guidelines, layer visualizations, junctions, l

Handles all editor viewport rendering for the Road Architect. Draws road surfaces, outlines, centerlines, lane numbering, direction arrows, node spheres, guidelines, layer visualizations, junctions, links, groups, multi-selections, terrain edit ranges, tunnels, overlays, and bridges.


Public Functions

FunctionDescription
M.drawRoadMarkups(...)Main render entry point: draws all visual road markups in the editor viewport

Parameters for drawRoadMarkups:

  • roads - array of all road structures
  • map - road name to index map
  • tree - spatial query tree for camera-frustum culling
  • selectedRoadIdx - currently selected road index
  • selectedNodeIdx - currently selected node index
  • selectedLayerIdx - currently selected layer index
  • selectedLink - proposed link preview data
  • selectedCandidateJct - proposed junction preview data
  • isGuidelines - whether to show alignment guidelines
  • isGroupMode - whether group editing mode is active
  • isProfileMode - whether profile editing mode is active
  • isCreateGroup - whether user is drawing a group polygon
  • gPolygon - group polygon vertices being drawn
  • multi - multi-selection array
  • isShowTerraSingle / isShowTerraGroup - terraform visualization flags
  • selectedPlacedGroup - selected placed group for terraform vis
  • terraParams - terraform parameter set

Example: Road Rendering Pipeline

local render = require('editor/tech/roadArchitect/render')

-- Called each frame from the Road Architect editor's onEditorGui:
render.drawRoadMarkups(
  roads,                    -- all roads
  roadMap,                  -- name → index map
  spatialTree,              -- R-tree for culling
  selectedRoadIdx,          -- selected road
  selectedNodeIdx,          -- selected node
  selectedLayerIdx,         -- selected layer
  selectedLink,             -- proposed link (or nil)
  selectedCandidateJct,     -- proposed junction (or nil)
  isGuidelines,             -- show guidelines
  isGroupMode,              -- group mode active
  isProfileMode,            -- profile mode active
  isCreateGroup,            -- drawing group polygon
  gPolygon,                 -- polygon verts
  multi,                    -- multi-selected roads
  isShowTerraSingle,        -- terraform single road vis
  isShowTerraGroup,         -- terraform group vis
  selectedPlacedGroup,      -- placed group for terraform
  terraParams               -- terraform parameters
)

-- Rendering is camera-culled: only roads within 350 units are drawn
-- Each road controls its own display flags:
--   road.isDisplayRoadSurface[0]   - semi-transparent surface mesh
--   road.isDisplayRoadOutline[0]   - edge outline lines
--   road.isDisplayRefLine[0]       - centerline reference line
--   road.isDisplayLaneInfo[0]      - lane numbers and direction arrows
--   road.isDisplayNodeSpheres[0]   - spheres at node positions
--   road.isDisplayNodeNumbers[0]   - text labels at nodes

Internal Render Functions

The module contains many local helper functions:

  • renderRoadSurface - draws semi-transparent lane polygons
  • renderRoadOutline - draws edge lines with selection highlighting
  • renderRoadCenterline - draws the reference/center line
  • renderLaneNumbering - draws lane number labels
  • renderLaneDirectionTriangles - draws direction arrow triangles
  • renderNodeSpheres - draws spheres at road nodes
  • renderNodeNumbering - draws node index labels
  • renderLayer - draws a specific profile layer visualization
  • renderOverlay - draws overlay patches
  • renderAutoTunnel - draws tunnel geometry
  • renderProposedJoin_End2End - draws proposed link preview
  • renderProposedJoin_End2Mid - draws proposed junction preview
  • renderGroupPolygonFence - draws group creation polygon
  • renderMultiSelectNodes - highlights multi-selected nodes
  • renderGuidelines - draws alignment guidelines
  • renderTerraSingle / renderTerraGroup - terraform range visualization

Notes

  • Uses debugDrawer for 3D line/sphere/triangle rendering
  • Camera culling via spatial tree query (350-unit radius)
  • Selected roads get distinct coloring and additional detail

See Also

  • Road Architect - Clothoid - Related reference
  • Road Architect - Decals - Related reference
  • Road Architect - Export - Related reference
  • World Editor Guide - Guide

Road Architect - Profiles

Manages road cross-section profiles in the Road Architect. Profiles define the lateral structure of a road: lane widths, layer materials, shoulder/curb geometry, and elevation offsets. Supports profil

Road Architect - Road Mesh

Generates procedural meshes for roads including sidewalks, curbs, and bridges using the Road Architect system.

On this page

Public FunctionsExample: Road Rendering PipelineInternal Render FunctionsNotesSee Also