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 Meshes

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

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


Overview

util_compileMeshes finds all .dae files in configured directories, compiles them to .cdae format using compileCollada(), and optionally caches results via SHA1 hashing. Supports command-line arguments for customization. Designed for automated builds.

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


Exports (M)

FunctionSignatureDescription
onExtensionLoaded()Starts the compilation job.
work(job)Main compilation coroutine.

Internals

Compile Paths

Default directories scanned for .dae files:

  • art/
  • vehicles/
  • levels/
  • content/
  • /core/art/

Paths containing /DevTools/ or /projects/ are ignored.

Caching System

  • Cache directory: collada_cache/
  • Each .dae file is SHA1-hashed. If a matching .cdae exists in cache, it's reused (hard-linked).
  • Cache hits/misses are tracked and reported.
  • Produces cdae_compilation_hardlink_todo.json for post-processing.

Command-Line Arguments

ArgumentEffect
-compileMeshesNoCacheDisables caching.
-compileMeshesCustomPathsOverrides compile paths (semicolon-separated).
-compileMeshesNoCompileOnlyCheckOnly checks for existing CDAEs, does not compile.
-compileMeshesNoCheckSkips post-compilation verification.
-compileMeshesScanPathBaseDirsAlso scans base dirs (not just subdirs).

Compilation Steps

  1. Finds all .dae files in compile paths.
  2. For each file, checks cache first.
  3. If not cached, loads materials for the directory and calls compileCollada(src, dst, dstData, validateData).
  4. Caches the result and logs progress.
  5. After completion, verifies all files were compiled.
  6. Shuts down with exit code 0 (success) or 1 (missed files).

How It Works

  1. Extension loads and starts a job with 1-second yield intervals.
  2. Materials are loaded per-directory to avoid name clashes.
  3. Each .dae is compiled to .cdae with optional caching.
  4. Progress is logged every 3 seconds.
  5. Game shuts down when complete.

Lua Examples

-- Typically loaded via command-line, not called directly
-- The extension auto-starts compilation on load

-- Manual start (rare):
extensions.util_compileMeshes.work(job)

Additional Exports

  • M.onExtensionLoaded - (undocumented)
  • M.work - (undocumented)

Compile Imposters

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

Config List Generator

Vehicle config list filtering and random selection system. Used for generating lists of vehicles that match specific criteria (e.g., for dealerships, traffic, career mode).

On this page

OverviewExports (M)InternalsCompile PathsCaching SystemCommand-Line ArgumentsCompilation StepsHow It WorksLua ExamplesAdditional Exports