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

Compile Imposters

Batch imposter compilation tool that iterates through levels and triggers imposter texture updates.

Batch imposter compilation tool that iterates through levels and triggers imposter texture updates.


Overview

util_compileImposters loads levels one-by-one in freeroam mode and calls Engine.Render.updateImposters(true) to regenerate imposter textures. Uses the job system for async level loading and waiting. Designed for build pipelines.

Extension path: lua/ge/extensions/util/compileImposters.lua


Exports (M)

FunctionSignatureDescription
compileImposters(queue)Starts imposter compilation for a list of level names.
onInit()Sets unload mode to manual.
onPreRender(dt)Manages log cooldown timer and timeout shutdown.
onModManagerReady(mod)Signals that mods are activated.
onConsoleLog(timer, lvl, origin, line)Resets log cooldown on any console output.

Internals

Compilation Pipeline

  1. Waits for core_levels and freeroam_freeroam to initialize.
  2. Waits for mod manager activation.
  3. Sleeps 10 seconds for system stabilization.
  4. For each level in the queue:
    • Calls freeroam_freeroam.startFreeroamByName(levelName).
    • Waits for the level and player vehicle to be ready.
    • Sleeps 120 seconds for full level load.
    • Waits for console log activity to cease (cooldown).
    • Calls Engine.Render.updateImposters(true).
    • Sleeps 20 seconds, then waits for log activity to cease again.

Timeout Safety

  • onPreRender increments a frame counter. If it exceeds 6000 frames without reset, the game shuts down.
  • Frame counter resets when moving to a new level or after each wait cycle.

Log Cooldown

Console log activity resets logCooldown to 6000. The system waits until cooldown reaches 0 (no log output) before proceeding, ensuring rendering operations have completed.


How It Works

  1. Call compileImposters() with an array of level names.
  2. The system loads each level sequentially.
  3. After each level loads fully, imposters are updated.
  4. The process continues until all levels are done.

Lua Examples

-- Compile imposters for specific levels
extensions.util_compileImposters.compileImposters({
  "west_coast_usa",
  "east_coast_usa",
  "italy"
})

-- Only one job can run at a time; calling again while active returns false

Additional Exports

  • M.compileImposters - (undocumented)
  • M.onConsoleLog - (undocumented)
  • M.onInit - (undocumented)
  • M.onModManagerReady - (undocumented)
  • M.onPreRender - (undocumented)

Calibrate ESC

Automated ESC (Electronic Stability Control) calibration tool that iterates through vehicle configs and runs measurement tests.

Compile Meshes

Batch COLLADA (.dae) to compiled COLLADA (.cdae) converter for faster mesh loading. Used in build pipelines.

On this page

OverviewExports (M)InternalsCompilation PipelineTimeout SafetyLog CooldownHow It WorksLua ExamplesAdditional Exports