Beams

Where BeamNG gets its name - beams.

These are the spring/damper connections between nodes, and serve to build the main structure of any vehicle in the game, allowing for deformation and breakages as required.

There are multiple types of beams for all sorts of purposes, which you can see in more detail in the various examples. Standard beams act as simple springs with damping, with the ability to deform and break if needed, and are used for most applications.

All arguments that apply to standard beams can be used with each of the specialised beam types.

Required arguments

id1
name
string
type
Name of the first node
id2
name
string
type
Name of the second node

Optional arguments

beamType
name
string
type
NORMAL
default
Sets the type of the beam.
Possible values: NORMAL, HYDRO, ANISOTROPIC, BOUNDED, PRESSURED, SUPPORT, BROKEN, LBEAM
beamSpring
name
number
type
4300000
default
Rigidity of the beam (N/m).
Force required to change the length of the beam by a set amount. Excessively high stiffness compared to node weight can cause the beam to vibrate and cause instability issues.
beamDamp
name
number
type
580
default
Damping of the beam (N/m/s).
Damping causes oscillations to reduce over time. Excessively high damping compared to the node weight might cause pulsing stresses and instability.
number
type
FLT_MAX
default
Strength of the beam. (N).

How much force the beam can resist before breaking.

A value of “FLT_MAX” will result in an unbreakable beam.

beamDeform
name
number
type
220000
default
How much force (N) is required to deform the beam permanently.
A value of “FLT_MAX” will result in a beam that can’t be broken.
number
type
1.0
default
Precompression of the beam. The length it will become as soon as it spawns
2.0 would be twice the length, 0.5 would be half the length.
number
type
Precompression length change in meters
A value of 0.2 would cause the beam to lengten by 0.2 meters on spawn, while a value of -0.2 would cause the beam to shorten by 0.2 meters on spawn.
number
type
Time in seconds for precompressed beams to reach their requested length
Helps avoid deformation on spawn from precompressed beams violently going to their desired length
breakGroup
name
string
type
The breakGroup of this beam
number
type
Sets breakgroup behavior
If set to 0, this beam will break others in the breakGroup. if set to 1, this beam will NOT break others in the breakGroup, but will be broken by the group.
name
name
string
type
Name of the beam
Used by some systems to identify the specific beam to use.
number
type
Limits the vibration frequency above which damping applies

Only applies to normal, bounded, and l-beams.

Used mostly with suspension components and other critical parts of the jbeam to help run higher damping before instability kicks in.

Expensive to run, should only be used where needed.

number
type
Limits how much the beam can deform in compression
number
type
Limits how much the beam can deform in expansion
Used to avoid excessive stretching.
optional
name
boolean
type
Deactivates errors when one of the beam’s node is missing
This is used for cases where one of the nodes that make up the beam is located in an optional component.
string
type
Identifies which deform group this beam is part of.
Used to trigger flexbody deform groups. Is also used for damage simulation on some powertrain components.
number
type
Level of deformation above which the deformGroup is triggered.
Typical values are very small numbers under 0.1. If the beam is shortened or lengthened by more than that amount, the deformGroup will be triggered.
soundFile
name
text
type
TODO: document this feature
number
type
TODO: document this feature
number
type
TODO: document this feature
number
type
TODO: document this feature
number
type
TODO: document this feature
number
type
TODO: document this feature
maxStress
name
number
type
TODO: document this feature

Simple Example

A beam between nodes a and b

"beams": [
        ["id1:", "id2:"],
        ["a","b"],
]

Advanced Example

Example of a typical beam section, which begins by initializing all the properties that will be used for the following beams.

{
    "beams": [
          ["id1:", "id2:"],
          //--BODYWORK--
          //roof main shape lengthwise
          {"beamPrecompression":1, "beamType":"|NORMAL", "beamLongBound":1, "beamShortBound":1},
          {"beamSpring":1401000,"beamDamp":140},
          {"beamDeform":32700,"beamStrength":"FLT_MAX"},
          {"deformLimitExpansion":1.1},
          ["rf1r","rf2r"],
          ["rf1","rf2"],
          ["rf1l","rf2l"],
          ["rf2r","rf3r"],
          ["rf2","rf3"],
          ["rf2l","rf3l"],
          ["rf3r","rf4r"],
          ["rf3","rf4"],
          ["rf3l","rf4l"],
    ]
}

0.23.5.0 contains 292591 entries in 5030 sections distributed over 9148 parts in 2189 jbeam files.

Last modified: 28 November 2021, at 22:06

Any further questions?

Join our discord