RLS Studios
ProjectsPatreonCommunityDocsAbout
Join Patreon
BeamNG Modding Docs

Guides

Reference

Server CommandsGE UtilitiesGame Engine MainNavigation GraphScreenshot CaptureServerServer ConnectionSpawnpoint ManagerSimulation TimeVehicle SpawningSuspension Frequency Tester
Ambient SoundUI Apps ManagerUI AudioBindings LegendCamera Distance AppDeveloper ConsoleCredits MusicExternal WebSocket ServerFade ScreenGame BlurGameplay App ContainersGrid SelectorLivery EditorMessages DebuggerMessages/Tasks App ContainersMission InfoPolice InfoTop BarUI ModsNavigation Map DataVehicle Paint EditorVehicle Vicinity AppUI Visibility
Camera ManagementAction Map ManagementEdit Mode State MachineLivery EditorUndo/Redo WrapperLayer ActionsLayer Edit LifecycleLayer DataDecal Texture LoaderLayer SelectionToolsLivery FilesMath Utilities
Decal CursorDecal OperationsDecal LayersFill LayersGroup Layers

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 ExtensionsuiliveryEditorlayers

Group Layers

Provides operations on linked-set (group) layers - material propagation to child layers.

Provides operations on linked-set (group) layers - material propagation to child layers.


Overview

ui_liveryEditor_layers_group manages group (linkedSet) layers in the livery editor. It propagates material properties (colour, metallic, roughness, normal intensity) to all child layers in the group.

Extension path: lua/ge/extensions/ui/liveryEditor/layers/group.lua


Exports (M)

FunctionSignatureDescription
setColor(layer, rgbaArray)Sets the group's colour property and marks it dirty for re-rendering.
setMetallicIntensity(layer, metallicIntensity)Sets metallic intensity on all child layers.
setRoughnessIntensity(layer, roughnessIntensity)Sets roughness intensity on all child layers.
setNormalIntensity(layer, normalIntensity)Sets normal intensity on all child layers.
getLayerActions() → string[]Returns available actions: material, ungroup, lock, delete.

Internals

Group Actions

Groups support a limited action set compared to decals:

  • material - colour/metallic/roughness editing
  • ungroup - dissolves the group, moves children to the parent
  • lock - toggles layer lock
  • delete - removes the group and its children

Color via Properties System

Unlike decals which have a direct color field, groups use a properties table with a dirty flag:

M.setColor = function(layer, rgbaArray)
  if not layer.properties.color then
    layer.properties["color"] = { id = "color", value = rgbaArray }
  else
    layer.properties["color"].value = rgbaArray
  end
  layer.propertiesDirty = true
  api.setLayer(layer, false)   -- commit dirty properties
  layer.propertiesDirty = false
  api.setLayer(layer, true)    -- re-render
end

Child Propagation

Metallic, roughness, and normal intensity are set by iterating all layer.children and calling api.setLayer on each:

M.setMetallicIntensity = function(layer, metallicIntensity)
  for k, childLayer in ipairs(layer.children) do
    childLayer.metallicIntensity = metallicIntensity
    api.setLayer(childLayer, true)
  end
end

How It Works

  1. Groups are linkedSet type layers containing child decal layers
  2. Colour is set via the properties system with a dirty flag cycle
  3. Material intensities are propagated to each child individually
  4. The action set is more limited than decals (no transform/mirror/duplicate)

Example Usage

local group = extensions.ui_liveryEditor_layers_group
local api = extensions.editor_api_dynamicDecals

local layer = api.getLayerByUid(groupUid)
group.setColor(layer, {1, 0, 0, 1})
group.setMetallicIntensity(layer, 0.8)

Additional Exports

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

  • M.getLayerActions
  • M.setNormalIntensity
  • M.setRoughnessIntensity

See Also

  • Livery Editor – Layers / Cursor - Related reference
  • Livery Editor – Layers / Decal - Related reference
  • Livery Editor – Layers / Decals - Related reference
  • UI System Guide - Guide

Fill Layers

Manages fill layers - solid colour backgrounds that serve as the base coat in a livery.

Layer Grouping

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

On this page

OverviewExports (M)InternalsGroup ActionsColor via Properties SystemChild PropagationHow It WorksExample UsageAdditional ExportsSee Also