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
Auto AnnotationBoosterCalibrate ESCCompile ImpostersCompile MeshesConfig List GeneratorDecal Roads EditorDependency TreeDoc CreatorExport (glTF)Follow The White RabbitForest GeneratorGround Model DebugInput System UtilsInstanced Line Render DemoJBeam StatsLog StreamsMap TilesNode Beam ExportNode StreamPhotomodePrecompile ShadersPrecompile VehiclesProcedural Track (Gymkhana Generator)Rectangle GeneratorRender Components APIResave MaterialsRich PresenceSave Dynamic DataScreenshot Creator (Vehicle Thumbnails)ShowroomSort LinesStep HandlerTerrain GeneratorTest Extension ProxiesTest JSON Files Syntaxutil/vehicleRopeDebug - Rope Physics Debug UIutil/worker - Batch Job Workerutil/wsTest - WebSocket Test Server

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 Extensionsutil

Render Components API

Reads renderer component JSON files and provides an API to get/set rendering settings (shaders, post-effects, etc.).

Reads renderer component JSON files and provides an API to get/set rendering settings (shaders, post-effects, etc.).


Overview

util_renderComponentsAPI loads all .rendercomponent.json files from /renderer/components/ and provides functions to read, write, and batch-update rendering settings. Settings are keyed by TorqueScript variable names (e.g., $pref::Video::...).

Module path: lua/ge/extensions/util/renderComponentsAPI.lua Note: This is a require-style module, not a hook-based extension.


Exports (M)

FunctionSignatureDescription
getSettings(force?) → tableReturns all renderer component settings. Pass true to force reload.
setSetting(name, value)Sets a single rendering setting by TorqueScript variable name.
getCurrentSettings() → tableReturns a key-value map of all current setting values.
getColorCorrections() → tableLists available color correction PNG files from art/postfx/.
setMultiSettings(keyvars)Sets multiple settings at once from a key-value table. Updates DOF after.

Internals

Settings Loading

On first call to getSettings(), all .rendercomponent.json files are scanned. Each file has a name and nested settings array. Settings are indexed by tsVar (TorqueScript variable name) into settingByKey for fast lookup.

Setting Types

TypeBehavior
'bool'Sets TorqueScript var as 0/1. Optionally enables/disables a shaderObject via obj:enable()/obj:disable().
nil (numeric)Sets TorqueScript var as tonumber(value).
otherSets TorqueScript var as literal string value.

After Setting

setMultiSettings calls require("client/postFx/dof").updateDOFSettings() after applying all changes.


How It Works

  1. Call getSettings() to load and cache all renderer components.
  2. Use setSetting(name, value) to change individual settings.
  3. Use setMultiSettings(table) to batch-apply a settings preset.
  4. Use getCurrentSettings() to snapshot all current values.

Lua Examples

local api = require('util/renderComponentsAPI')

-- Get all available settings
local settings = api.getSettings()

-- Read current values
local current = api.getCurrentSettings()
print(current['$pref::Video::AA'])

-- Set a single setting
api.setSetting('$pref::Video::AA', 'FXAA')

-- Batch-set multiple settings
api.setMultiSettings({
  ['$pref::Video::AA'] = 'FXAA',
  ['$pref::PostFX::EnableDOF'] = true,
})

-- List color correction files
local cc = api.getColorCorrections()
for _, f in ipairs(cc) do print(f.filename) end

Additional Exports

  • M.getColorCorrections - (undocumented)
  • M.getCurrentSettings - (undocumented)
  • M.getSettings - (undocumented)
  • M.setMultiSettings - (undocumented)
  • M.setSetting - (undocumented)

Rectangle Generator

Generates a planar graph of nodes by recursively subdividing rectangles, used by `procTrack` for gymkhana track generation.

Resave Materials

Batch-converts legacy TorqueScript material files (`materials.cs`) to the new JSON format.

On this page

OverviewExports (M)InternalsSettings LoadingSetting TypesAfter SettingHow It WorksLua ExamplesAdditional Exports