Introduction to JBeam

Unlike most games, which use “RigidBody” physics simulation, BeamNG is a “SoftBody” physics simulator. In short, this means that physics objects (such as cars) are deformable. This is achieved through “Node and Beam” structures. You can think of these structures as being like skeletons, or those magnetic toys that were popular in the early 2000’s.

To use the above image as an example, these structures are made up of…

Nodes (The Chrome Balls)

Nodes can be thought of as particles, each node has mass, and can move freely in space.

Beams (The blue sticks)

Beams hold nodes together in a structure. Beams have no mass, and always have a node at each end. They behave as springs (more on that later). 
They are allowed to rotate freely around nodes, and only serve to keep two nodes at a set distance from each other.
 No other forces (such as twisting) are transmitted through them, and they cannot be bent.

When building a node-beam structure, it’s important to keep in mind that a box with no cross braces will fall over as the beams can pivot around the nodes. Adding diagonal braces between the edges will make the box into a rigid structure.

With enough nodes and beams, it is possible to build complex structures like cars, with node-beam structures simulating the chassis, suspension, wheels, and many other components.

Basic properties of node-beam structures

BeamSpring

The BeamSpring value defines how “stiff” a spring is, and represents the amount of force required to compress the spring by a set amount.

Higher values will be used to represent typically rigid structures like the chassis, while lower values will be used for less rigid structres and materials like springs or rubber.

Spring/stiffness should not be confused with deformation. While a beam with a low spring value will compress easily, it is elastic deformation, meaning it will spring back to it’s original length when

Left: Soft Spring | Right: Stiff Spring

BeamDamp

Damping is the resistance to movement.

In a frictionless vacuum, a spring with no damping will tend to oscillate indefinetely. To avoid this, we need to have some damping, which will resist movement with a force inversely proportional to speed.

The main effect of damping will be to prevent oscillations, although damping will also have an effect in absorbing some energy from deformation, reducing the strenght of the rebound.

In real life, most objects, including springs, will have at least a little bit of inherent damping.

Left: No Damping | Right: Some Damping

Typical values for Spring and Damp

{"beamSpring":40000,"beamDamp":0}, //Suspension springs
{"beamSpring":0,"beamDamp":4500}, //Suspension dampers
{"beamSpring":8000000,"beamDamp":125}, //Structural vehicle components, such as suspension arms
{"beamSpring":14001000,"beamDamp":250}, //Steering rack, it needs to be super stiff to keep wheels pointing in the right direction

Beam Deform

Beam deform sets the amount of force required before a beam permanently deforms. Once deformed, the beam will no longer return back to its original shape. This is central to creating vehicles that deform accurately.

Left: Low deformation value (5000) | Right: Practically infinite deformation value

Beam Strength

Beam strength sets the amount of force required to break a beam. A broken beam acts as if it has been snapped in half, this means it no longer connects two nodes together. This is useful for allowing components to fall off a vehicle. For example, a bumper can be made to fall off a car, by making the beams connecting it to the chassis break easily.

As shown in the following image, breaking beams will also result in the visible mesh being destroyed too.

Left: Low Strength | Right: High Strength

Node Weight

Node weight can be used to adjust how heavy each individual point of vehicle is.

However, if the overall stiffness of all connected beams are too high, it will begin to vibrate, and may even explode. To prevent this vibration, you either need to make the node heavier, or the beams less stiff. To make things even more complicated: Beams will also start to vibrate and explode if your beamDamp is too high.

Left: Low node weight (6kg) | Right: Correct node weight (7kg)

This image shows the effect of node weight on a vehicle, the weight values for 4 nodes connecting the red beams were changed.

As can be seen, the vehicle on the right is totally stable due to having the correct node weights, while the vehicle on the left is vibrating badly.

Page created: 20 March 2021, at 22:27
Last modified: 23 September 2021, at 16:08

Any further questions?

Join our discord