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

Node Beam Export

Minimal exporter that dumps the current vehicle's node positions and beam connections to a JSON file.

Minimal exporter that dumps the current vehicle's node positions and beam connections to a JSON file.


Overview

util_nodeBeamExport exports the player vehicle's node/beam graph as a simple JSON file. Nodes include positions (converted to Z-up coordinate system) and optional names. Beams include their connected node IDs. Useful for external analysis or visualization tools.

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


Exports (M)

FunctionSignatureDescription
exportFile(filename)Exports nodes/beams to JSON. Auto-suggests filename if nil.
suggestFilename()Returns next available export_N.nbexport.json path.

Internals

Output Format

{
  "vehicle": {
    "id": 12345,
    "jbeam": "pickup",
    "name": "pickup"
  },
  "nodes": [
    { "id": 0, "name": "ref", "pos": [1.0, 0.5, -0.3] },
    { "id": 1, "pos": [1.2, 0.6, -0.2] }
  ],
  "beams": [
    { "id": 0, "n1": 0, "n2": 1 },
    { "id": 1, "n1": 1, "n2": 2 }
  ]
}

Coordinate Conversion

Node positions are converted from BeamNG's Y-up to Z-up:

  • X = X
  • Y = Z (game Z → export Y)
  • Z = -Y (game Y negated → export Z)

Filename Suggestion

suggestFilename() scans the vehicle directory for existing export_*.nbexport.json files and returns the next sequential number. Files are placed in the vehicle's base directory.

Data Sources

  • Vehicle object: getPlayerVehicle(0) - provides node positions via getNodePosition(id).
  • Vehicle data: core_vehicle_manager.getVehicleData(id) - provides node metadata (names) and beam connections.

How It Works

  1. Call exportFile() with an optional filename.
  2. The current vehicle's nodes and beams are read.
  3. Positions are coordinate-converted.
  4. JSON is written with pretty-printing.

Lua Examples

-- Export to auto-suggested filename
extensions.util_nodeBeamExport.exportFile()

-- Export to specific file
extensions.util_nodeBeamExport.exportFile('vehicles/pickup/my_export.nbexport.json')

-- Get suggested filename
local fn = extensions.util_nodeBeamExport.suggestFilename()
print(fn) -- "vehicles/pickup/export_1.nbexport.json"

Additional Exports

  • M.exportFile - (undocumented)
  • M.suggestFilename - (undocumented)

Map Tiles

Generates orthographic map tile images at multiple zoom levels for use with web map viewers (e.g., Leaflet). Includes an ImGui control panel with progress tracking.

Node Stream

WebSocket server that streams real-time vehicle node positions to connected clients. Also serves initial node positions and flexbody mapping data on request.

On this page

OverviewExports (M)InternalsOutput FormatCoordinate ConversionFilename SuggestionData SourcesHow It WorksLua ExamplesAdditional Exports