Pressure Simulation

Pressure Simulation

From BeamNG

Revision as of 00:34, 4 November 2019 by Toron Beldevar (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Triangles in the BeamNG physics engine have pressure and bouyancy effects in addition to collision and lift/drag. The tire model makes use of these effects, as do props such as the Inflated Mat.


Pressure/Bouyancy Behavior

When triangles are connected together to form a closed surface and placed in a pressureGroup, they can approximate a volume with pressure and bouyancy. Pressure can be specified in psi or Pa. It is very important to have a closed and fairly uniform shape when using pressure simulation, or "phantom" forces may cause the vehicle to accelerate. The mass of air added to a volume when pressure is not calculated in the engine, so, to make an object with pressure neutrally bouyant, the mass of the added air should be added to the nodes of the object.


Adding Pressure Simulation

This starts it: {"pressureGroup":"test"},

This tells the game how buoyant your object is: {"pressurePSI":"0"},

This finishes it: {"pressureGroup":""},

These go in your triangles section. Examples below:

           
            {"pressureGroup":"test"},
            {"pressurePSI":"0"},
            ["d7r", "fe3r", "fe7r"],
            ["d7r", "d4r", "fe3r"],
            ["d4r", "d1r", "fe3r"],
            ["fe3r", "d1r", "fe1r"],
            {"pressureGroup":""},

These also go in your quads section. Examples below:

           
            {"pressureGroup":"test"},
            {"pressurePSI":"0"},
            ["d7r", "fe3r", "fe22r", "fe7r"],
            ["d7r", "d4r", "fe16r", "fe3r"],
            ["d4r", "d1r", "fe10r", "fe3r"],
            ["fe3r", "d1r", "fe1r", "fe1r"],
            {"pressureGroup":""},

Vehicle Creation
Get started: Introduction to Vehicle Creation
JBeam
Overview
Physics
Dynamics
Visuals
Extras
Upkeep
Deprecated
See also: JBeam ExamplesJBeam Physics Theory