RLS Studios
ProjectsPatreonCommunityDocsAbout
Join Patreon
BeamNG Modding Docs

Guides

Reference

Server CommandsGE UtilitiesGame Engine MainNavigation GraphScreenshot CaptureServerServer ConnectionSpawnpoint ManagerSimulation TimeVehicle SpawningSuspension Frequency Tester
Auto AnnotationBoosterCalibrate ESCCompile ImpostersCompile MeshesConfig List GeneratorDecal Roads EditorDependency TreeDoc CreatorVehicle ExporterFollow The White RabbitForest GeneratorGround Model DebugInput System UtilsInstanced Line Render DemoJBeam StatsLog StreamsMap TilesNode Beam ExportNode StreamPhotomodePrecompile ShadersPrecompile VehiclesProcedural Track GeneratorRectangle GeneratorRender Components APIResave MaterialsRich PresenceSave Dynamic DataScreenshot CreatorShowroomSort LinesStep HandlerTerrain GeneratorTest Extension ProxiesTest JSON Files SyntaxVehicle Rope DebugBatch WorkerWebSocket Test

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)

See Also

  • Auto Annotation - Related reference
  • Booster - Related reference
  • Calibrate ESC - Related reference
  • Game Engine Overview - Guide

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 ExportsSee Also