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

Auto Annotation

Automatically annotates scene objects with semantic labels for AI/segmentation.

Automatically annotates scene objects with semantic labels for AI/segmentation.


Overview

util_autoAnnotation walks the scene tree and assigns annotation labels (e.g., BUILDINGS, NATURE, STREET) to objects that lack them. Uses fuzzy matching on shape names and object names to guess appropriate categories. Useful for generating training data for computer vision / semantic segmentation.

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


Exports (M)

FunctionSignatureDescription
autoAnnotateLevel()Annotates both scenetree and forest groups.
autoAnnotateScenetree()Walks MissionGroup and annotates all children.
autoAnnotateGroups()Annotates ForestItemDataSet items.
onInit()No-op initialization hook.

Internals

Shape Name Matching

Objects are matched by their shapeName field against known patterns:

PatternAnnotation
buildingBUILDINGS
treeNATURE
sidewalkSIDEWALK
signTRAFFIC_SIGNS
tunnelSTREET
fence, fencingBUILDINGS
roadASPHALT
busstopBUILDINGS
excavatorCAR

Unmatched shapes default to OBSTACLES.

Name Matching (GroundCover)

GroundCover objects use their name instead of shape:

PatternAnnotation
grassNATURE
shrubsNATURE

Unmatched names default to NATURE.

Visitor Pattern

visitNode(parent, node) dispatches to class-specific visitors:

ClassHandler
TSStaticFuzzy-match shapeName
ForestItemDataSame as TSStatic
ForestIterate items, visit each ForestItemData
GroundCoverFuzzy-match name
SFXSpace, SFXEmitter, PointLight, SpotLightNo-op (skipped)

The walker recurses into children via getCount() / getObject().

Annotation Application

setAnnotation(node, annotation) sets:

  • node.annotation = label string
  • node.mode = "Override"
  • Calls node:postApply() to commit changes

Only objects with empty annotation fields are modified.


How It Works

  1. Call autoAnnotateLevel() to process the entire level.
  2. The scenetree is walked starting from MissionGroup.
  3. Each node is dispatched to its class visitor.
  4. Visitors check the object's annotation field; if empty, guess from shape/name.
  5. Forest items are handled separately via ForestItemDataSet.

Lua Examples

-- Annotate the entire current level
extensions.util_autoAnnotation.autoAnnotateLevel()

-- Annotate only the scenetree (no forests)
extensions.util_autoAnnotation.autoAnnotateScenetree()

-- Annotate only forest items
extensions.util_autoAnnotation.autoAnnotateGroups()

Additional Exports

  • M.autoAnnotateGroups - (undocumented)
  • M.autoAnnotateLevel - (undocumented)
  • M.autoAnnotateScenetree - (undocumented)
  • M.onInit - (undocumented)

Vehicle Selector – Vehicle Specifications

Builds the detailed specifications panel for a selected vehicle config.

Booster

Simple trigger-based booster that applies an upward impulse to vehicles entering a trigger zone.

On this page

OverviewExports (M)InternalsShape Name MatchingName Matching (GroundCover)Visitor PatternAnnotation ApplicationHow It WorksLua ExamplesAdditional Exports