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

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 Extensionseditor

Editor - Visualization

Central visualization management tool for the BeamNG editor, providing toggles for debug rendering modes, object visibility/selectability, material debug overlays with legends, and navgraph visualizat

Central visualization management tool for the BeamNG editor, providing toggles for debug rendering modes, object visibility/selectability, material debug overlays with legends, and navgraph visualization.


Module Exports

ExportTypeDescription
M.dependenciestable{'editor_aiViz'} - for navgraph visualization
M.onEditorGuihookRenders the Visualization tool window and material debug legend
M.onEditorInitializedhookRegisters all visualization types and material debug modes
M.onEditorRegisterPreferenceshookRegisters visualization preferences
M.onEditorPreferenceValueChanged(path, value)hookApplies preference changes to visualization state

Key Internals

VariableTypePurpose
materialDebugVisualizationTypeIntPtrSelected material debug mode index
materialDebugVisualizationTypestable/nilList of material debug mode definitions
vizFilterTextFilterSearch filter for visualization types
legendDefstableLegend definitions for material debug overlay
renderDebugFlagstableBitfield constants for material debug flags

Three Tabs

Debug Tab

  • Material Debug combo box with 20+ modes (None, Triangle Size, Mip Level, Base Color, Opacity, Metallic, Roughness, Normals, UV channels, etc.)
  • Per-mode legend overlay with gradient bars, color chips, and description bullets
  • Toggleable visualization types (wireframe, bounding boxes, frustum lock, triggers, terrain, decals, lighting, navgraph, etc.)

Visible Tab

  • Checkbox per renderable object class to toggle scene visibility
  • Classes from worldEditorCppApi.getRenderableObjectClassNames()

Selectable Tab

  • Checkbox per object class to toggle editor selectability

Material Debug Modes

ModeFlagDescription
NoneFlagsDebugNoneNo debug overlay
Triangle SizeFlagsDebugTriangleSizeGPU overdraw visualization (Vulkan only)
Base Color MipFlagsDebugMipBaseColorMipmap LOD level coloring
Base ColorFlagsDebugBaseColorAlbedo color
OpacityFlagsDebugOpacityAlpha channel grayscale
MetallicFlagsDebugMetallicMetallic grayscale
RoughnessFlagsDebugRoughnessRoughness grayscale
Normals WSFlagsDebugNormalsWSWorld-space normal vectors
AOFlagsDebugAmbientOcclusionAmbient occlusion
EmissiveFlagsDebugEmissiveEmissive color
Clear CoatFlagsDebugClearCoatClear coat intensity
UV0/UV1VariousUV coordinate encoding, checkerboard, color grid
DeprecatedFlagsDebugMaterialDeprecatedOld vs new material pipeline
Layer CountFlagsDebugLayerCountNumber of material layers

Registered Visualization Types

  • BeamNG waypoints, navgraph (road type, drivability, speed limit, hidden)
  • Advanced text drawing, wireframe, bounding boxes, frustum lock
  • Sound emitters, triggers, terrain, decals, light frustums
  • Zone culling, terrain occlusion disable
  • NavMesh, portals, BV tree
  • Shadow disable
  • Advanced Lighting: color/specular/normals/depth visualizers
  • Annotation visualizer (research license only)

Lua Code Example

-- The visualization window is registered on editor init:
-- editor.registerWindow(toolWindowName, im.ImVec2(500,600))

-- Material debug mode switching:
-- materialDebugSetFlag(renderDebugFlags.FlagsDebugTriangleSize)
-- enableMaterialDebug(true)

-- Legend overlay renders at 80% viewport height, centered:
-- im.SetNextWindowPos(vec2(vp.Size.x * 0.5, vp.Size.y * 0.8), im.Cond_Always, vec2(0.5, 0.5))
-- Gradient bars drawn via TextureDrawPrimitive with jet/grayscale palettes

-- Jet colormap for triangle size / mip visualization:
-- function _jetRGB(t)
--   local r = max(0, min(1, 4*t - 2))
--   local g = max(0, min(1, 2 - abs(4*t - 2)))
--   local b = max(0, min(1, 2 - 4*t))
--   return r, g, b
-- end

-- Visualization type registration:
-- editor.registerVisualizationType({
--   type = editor.varTypes.LuaVar,
--   name = "GFXDevice.renderWireframe",
--   displayName = "Wireframe Mode"
-- })

-- Custom visualization types with setter/getter:
-- editor.registerVisualizationType({
--   type = editor.varTypes.Custom,
--   name = "$AL_LightColorVisualizeVar",
--   displayName = "Advanced Lighting: Light Color Viz",
--   setter = function(on) setConsoleVariable(varName, on and "1" or "0") end,
--   getter = function() return getConsoleVariable(varName) == "1" end
-- })

-- Preferences stored under gizmos.visualization:
-- visTypes (table), visible (table), selectable (table)
-- visualizationDrawDistance (int, default 250, range 50-2000)
-- saveVisualizationSettings (bool, default true)
-- showMaterialDebugLegend (bool, default true)

-- Reset to defaults via preference registry
-- Filter search supports multi-token case-insensitive matching

See Also

  • Editor AI Tests - Related reference
  • Editor AI Visualization - Related reference
  • Editor – Assembly Spline Tool - Related reference
  • World Editor Guide - Guide

Vehicle Editor Main

Main entry point for the Vehicle Editor - manages static/live editor modes, headless editor activation, extension loading, menu creation, and vehicle data management.

Editor Viz Helper

Provides an in-editor visual helper tool for level designers to place temporary decal markers on surfaces. Uses dynamic decals from `art/vizhelper/` with mouse-driven placement, rotation, and scaling

On this page

Module ExportsKey InternalsThree TabsDebug TabVisible TabSelectable TabMaterial Debug ModesRegistered Visualization TypesLua Code ExampleSee Also