RLS Studios
ProjectsPatreonCommunityDocsAbout
Join Patreon
BeamNG Modding Docs

Guides

Reference

Server CommandsGE UtilitiesGame Engine MainNavigation GraphScreenshot CaptureServerServer ConnectionSpawnpoint ManagerSimulation TimeVehicle SpawningSuspension Frequency Tester
Editor AI TestsEditor AI VisualizationEditor – Assembly Spline ToolAsset BrowserAsset DeduplicatorAsset Management ToolSFX Previewer (Audio Events List)Audio Ribbon EditorAutoSaveBarriers EditorBiome ToolBuilding EditorBulk RenameCamera BookmarksCamera TransformCamera Path EditorCEF HelperCo-Simulation Signal EditorCrawl Data EditorCreate Object ToolDataBlock EditorDecal EditorDecal Spline EditorDocumentation HelperDrag Race EditorDrift Data EditorDrive Path EditorDynamic Decals Tool (Vehicle Livery Creator)Engine Audio DebugExtensions DebugExtensions EditorFFI Pointer Leak TestFile DialogFlowgraph EditorForest EditorForest ViewEditor Gizmo HelperEditor Ground Model Debug HelperEditor Headless Editor TestEditor Icon OverviewEditor ImGui C DemoEditor InspectorEditor Layout ManagerEditor Level SettingsEditor Level ValidatorEditor LoggerEditor Log HelperEditor MainEditor Main MenuEditor Main ToolbarEditor Main UpdateMap Sensor EditorMaster Spline EditorMaterial EditorMeasures Inspector HeaderMesh Editor (Base)Mesh Road EditorMesh Spline EditorMission EditorMission PlaybookMission Start Position EditorMulti Spawn Manager (Vehicle Groups)Navigation Mesh EditorEditor News MessageObject Tool (Object Select Edit Mode)Object To Spline EditorParticle EditorPerformance Profiler / Camera RecorderPhysics ReloaderPrefab Instance EditorEditor PreferencesRace / Path EditorRally EditorRaycast Test Editor ToolRenderer Components Editor ToolRender Test Editor ToolResource Checker Editor ToolRiver EditorRoad Architect EditorRoad DecorationsRoad Editor (Decal Road)Road Network ExporterRoad River Cache HandlerRoad River GUIRoad Spline EditorRoad Template EditorRoad UtilitiesScene TreeScene ViewScreenshot Creator BootstrapScript AI EditorScript AI ManagerSensor Configuration EditorSensor DebuggerShape EditorShortcut LegendSidewalk Spline EditorSites EditorSlot Traffic EditorSuspension Audio DebugTech Server ManagerTerraform ToolTerrain And Road ImporterTerrain EditorTerrain Materials EditorText EditorTool ManagerTool ShortcutsTraffic DebugTraffic ManagerTraffic Signals EditorUndo History ViewerVehicle Bridge TestVehicle Detail ViewerVehicle Editor MainEditor - VisualizationEditor Viz HelperEditor Water Object HelperEditor Windows Manager
Gen Decal EditorGen Experimental Frame EditorGen Mesh ExplorerGen Experimental SolidFlexGen Mesh ModuleGen Network ModuleGen Region ModuleGen Render ModuleGen Terrain ModuleEditor Gen TestEditor Gen Top (Roof Geometry)Editor Gen UI (Building Architect UI)Editor Gen UtilsEditor Gen World

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 Extensionseditorgen

Gen Experimental SolidFlex

Experimental solid/flex body simulation editor for exploring deformation and physics properties.

Experimental solid/flex body simulation editor for exploring deformation and physics properties.


Overview

The exp_solidflex module provides an experimental environment for simulating solid and flexible body dynamics. It supports viscosity and plasticity parameters, vertex selection and neighbor detection, history tracking, and edge-based body definitions with gradient descent optimization.


Module Table: W

FieldTypeDescription
W.outtableOutput data
W.ui.visc_innumberViscosity input value
W.ui.plast_innumberPlasticity input value
W.isactivebooleanWhether the editor is active

Key Functions

FunctionDescription
W.up(k, lbl)Initializes the editor, creates materials and edit group
W.init()Sets up body definition and initial state
W.test()Runs test scenarios in development mode

Simulation State

VariableDescription
segpickPicked segment indices
cvoverHovered vertex
cpickPicked vertex
cvneighNeighbor vertices of current selection
vpinPinned vertex position
ahistHistory of simulation states
nviscViscosity step count
cplastCurrent plasticity level
alossLoss history for optimization

Body Definition

The body is defined by arrays:

  • aind - Index multipliers
  • aa - Angle array
  • ae - Edge angles
  • dedge - Edge dictionary

Dependencies

ModulePath
Utils/lua/ge/extensions/editor/gen/utils
AI Lib/lua/ge/extensions/editor/gen/lib/ai
Mesh/lua/ge/extensions/editor/gen/mesh
UI Lib/lua/ge/extensions/editor/gen/lib/ui

Usage Example

-- The solidflex editor is activated through the gen editor:
W.up('exp_solidflex', 'SolidFlex Simulation')

-- Adjusting simulation parameters via UI:
-- W.ui.visc_in  → viscosity slider
-- W.ui.plast_in → plasticity slider

All Exported Functions

FunctionSignatureDescription
W.up(k, lbl)(string, string)Initializes editor: hides player, registers window, creates materials and edit group
W.init()()Builds initial mesh from angle arrays, creates body object, computes edge dictionary
W.build(ac)(table) → tableBuilds mesh from angle coefficients. Returns mesh table {verts, normals, uvs, faces, material}
W.onVal(k, val, mute)(string, any?, boolean?)Event handler for: reset, visc_in, plast_in, crumple, edge_pick
W.gui()()Renders ImGui window with crumple button, reset, viscosity/plasticity sliders, and hint overlay
W.update()()Per-frame update: mouse vertex picking/dragging with IK solving, camera orbit on Alt+click, animations
W.test()()Runs test scenarios with multi-segment body and gradient descent optimization

See Also

  • Gen AI Library - Gradient descent optimization
  • Gen Frame Editor - Skeletal body simulation
  • Gen Mesh - Mesh utilities

Gen Mesh Explorer

Experimental 3D mesh and JBeam explorer for inspecting vehicle geometry, beams, and materials.

Gen Mesh Module

Core 3D mesh creation, manipulation, and DAE export module for the gen editor.

On this page

OverviewModule Table: WKey FunctionsSimulation StateBody DefinitionDependenciesUsage ExampleAll Exported FunctionsSee Also