RLS Studios
ProjectsPatreonCommunityDocsAbout
Join Patreon
BeamNG Modding Docs

Guides

Reference

server/commands - Camera & Input Commandsge_utils - Game Engine Utility Functionsmain.lua - GE Lua Entry Point & Game Loopmap.lua - Navigation Graph (AI Road Map)screenshot.lua - Screenshot Systemserver/server - Level Loading & Game ServerserverConnection - Client-Server Connection Manager`setSpawnpoint` - Default Spawn Point Persistence`simTimeAuthority` - Simulation Time & Bullet Time Control`spawn` - Vehicle Spawning & Safe Placement`suspensionFrequencyTester` - Suspension Natural Frequency Analysis
ui/ambientSound - Ambient Sound Stream PlayerUI Apps ManagerUI AudioBindings LegendCamera Distance AppConsole (consoleNG)Credits MusicExternal App (WebSocket UI Server)Fade ScreenGame BlurGameplay App ContainersGrid SelectorLivery EditorMessages DebuggerMessages/Tasks App ContainersMission InfoPolice InfoTop BarUI ModsUI Navigation / MapVehicle Paint EditorVehicle Vicinity AppUI Visibility

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 Extensionsui

Vehicle Paint Editor

ImGui tool for editing metallic paint properties on the player vehicle.

ImGui tool for editing metallic paint properties on the player vehicle.


Overview

ui_vehiclePaint provides a simple ImGui window with sliders for adjusting metallic paint data (roughness, metallic, coat, coat roughness) on paint slots 0–2 of the player vehicle.

Extension path: lua/ge/extensions/ui/vehiclePaint.lua Dependencies: ui_imgui


Exports (M)

FunctionSignatureDescription
show()Opens the paint editor window.
onUpdate()Draws the ImGui window each frame.
onExtensionLoaded()Initializes imgui pointers.
changeData(value, index)Programmatically changes a paint property on slot 0.

Data Fields

FieldDescription
M.dependencies{"ui_imgui"} - required for ImGui paint editor.

Internals

Paint Data Format

Each paint slot stores 4 floats as a space-separated string in metallicPaintData:

"roughness metallic coat coatRoughness"
  • Index 1: Roughness
  • Index 2: Metallic
  • Index 3: Coat
  • Index 4: Coat Roughness

UI Layout

Three collapsible sections (Paint 0, 1, 2), each with four sliders (0–1 range). Changes are applied immediately via veh:setField('metallicPaintData', slotIndex, dataString).

Helpers

  • dataToString(data) - Converts {r, m, c, cr} → "r m c cr" string.
  • stringToData(str) - Parses space-separated string → number array.
  • sliderUI(id, array, index) - Renders a slider and sets needUpdate flag.
  • updateData(veh, index) - Applies data to vehicle if changed.

How It Works

  1. Call extensions.ui_vehiclePaint.show() to open the window.
  2. Each frame, onUpdate reads current metallicPaintData from the vehicle.
  3. Sliders modify the local data table; on change, needUpdate is set.
  4. updateData writes the modified string back to the vehicle field.

Lua Examples

-- Open the paint editor
extensions.ui_vehiclePaint.show()

-- Programmatically set metallic value on paint slot 0
extensions.ui_vehiclePaint.changeData(0.8, 2)  -- index 2 = metallic

Additional Exports

The following exports are available but not yet documented in detail:

  • M.changeData
  • M.onExtensionLoaded
  • M.onUpdate
  • M.show

UI Navigation / Map

Provides navigation map data, routing, POI, and real-time object tracking for the UI.

Vehicle Vicinity App

Sends nearby vehicle bounding box and coupler data to the UI each frame.

On this page

OverviewExports (M)Data FieldsInternalsPaint Data FormatUI LayoutHelpersHow It WorksLua ExamplesAdditional Exports