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
Livery Editor - CameraLivery Editor - ControlsLivery Editor - Edit ModeLivery Editor – Editor (Core)Livery Editor – HistoryLivery Editor – Layer ActionLivery Editor – Layer EditLivery Editor – LayersLivery Editor – ResourcesLivery Editor – SelectionLivery Editor – ToolsLivery Editor – User DataLivery Editor – Utils
Livery Editor – Tools / GroupLivery Editor – Tools / MaterialLivery Editor – Tools / MiscLivery Editor – Tools / SettingsLivery Editor – Tools / Transform

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 ExtensionsuiliveryEditortools

Livery Editor – Tools / Material

Material property tool - sets colour, metallic, roughness, normal intensity, and decal texture on cursor or selected layers.

Material property tool - sets colour, metallic, roughness, normal intensity, and decal texture on cursor or selected layers.


Overview

ui_liveryEditor_tools_material provides the material editing operations (colour, PBR properties, texture swap). It uses doOperation from the tools manager to dispatch to either the cursor, a decal layer, or a group layer depending on context.

Extension path: lua/ge/extensions/ui/liveryEditor/tools/material.lua


Exports (M)

FunctionSignatureDescription
setColor(rgbaArray)Sets colour on cursor, decal, or group layer.
setMetallicIntensity(value)Sets metallic intensity (0–1). Validates range.
setRoughnessIntensity(value)Sets roughness intensity (0–1). Validates range.
setNormalIntensity(value)Sets normal intensity (0–1). Groups use roughness setter (bug?).
setDecal(decalTexture)Changes the decal texture on cursor or decal layer.

Internals

Type-Based Dispatch

Each function uses doOperation to route by layer type:

M.setColor = function(rgbaArray)
  uiTools.doOperation(function(layer, color)
    if not layer then
      uiCursorApi.setColor(color)           -- cursor
    elseif layer.type == api.layerTypes.decal then
      uiDecals.setColor(layer, color)       -- decal layer
    elseif layer.type == api.layerTypes.linkedSet then
      uiLayerGroup.setColor(layer, color)   -- group layer
    end
  end, rgbaArray)
end

Target Modules

Layer TypeDelegated To
nil (cursor)ui_liveryEditor_layers_cursor
decalui_liveryEditor_layers_decals
linkedSet / groupui_liveryEditor_layers_group

Validation

Metallic and roughness values are checked for >= 0 or <= 1 (note: the or logic means any non-nil value passes).


How It Works

  1. The UI calls setColor({r, g, b, a}) from the colour picker
  2. doOperation determines whether to target the cursor or selected layers
  3. The appropriate layer-type module handles the actual property change
  4. Each sub-module calls api.setLayer() and notifies the UI

Example Usage

local material = extensions.ui_liveryEditor_tools_material

-- Set colour on whatever is active (cursor or layer)
material.setColor({0.8, 0.2, 0.1, 1})

-- Set PBR properties
material.setMetallicIntensity(0.7)
material.setRoughnessIntensity(0.3)

-- Change texture
material.setDecal("/art/dynamicDecals/racing/number5.png")

Additional Exports

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

  • M.setDecal
  • M.setMetallicIntensity
  • M.setNormalIntensity
  • M.setRoughnessIntensity

Livery Editor – Tools / Group

Layer ordering and grouping/ungrouping operations for the livery editor.

Livery Editor – Tools / Misc

Minimal layer utility - currently only provides layer duplication.

On this page

OverviewExports (M)InternalsType-Based DispatchTarget ModulesValidationHow It WorksExample UsageAdditional Exports