Game

Soft-body Physics

Introduction


This page is intended to cover the fundamentals of the BeamNG.drive physics model, from a theoretical standpoint. You won’t be able to build a car at the conclusion of this short presentation, but you will be able to understand the foundations behind it.

Node-Beam Structure


Unlike most games, which use “Rigid Body” physics simulation, BeamNG is a “Soft Body” 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 but always have a node at each end. They behave as springs (more on that later). In BeamNG, there is no angular friction holding any of these Beams at a certain angle.

In BeamNG, these beams exist purely to hold two nodes at set distances from each other. No other forces (such as twisting) are transmitted through them, and they cannot be bent.

A box with no cross braces will fall over, since the beams will pivot around the nodes. By adding diagonal cross braces into the design, it becomes a solid square. A box with no cross braces will fall over, since the beams will pivot around the nodes. By adding diagonal cross braces into the design, it becomes a solid square.


By utilising these simple Node and Beam structures, it becomes possible to model complex objects such as cars. By utilising these simple Node and Beam structures, it becomes possible to model complex objects such as cars.

Beam Spring and Damp Values


In BeamNG, all beams have both a “spring” and “damp” value.

BeamSpring

The BeamSpring value defines how “stiff” a spring is.

For example, if you were to create a spring with no damping, it would be a frictionless spring. This means that in a frictionless vacuum, if you stretch one, and then let go, it will continue osculating infinitely. In this situation, the springs stiffness would be represented by how difficult it is to initially compress.

To further explain, a car spring would be very difficult to compress fully by hand, the spring out of a clicking pen would be far easier to compress. This is because the car spring is much stiffer than the spring found in the pen.

Left: Soft Spring | Right: Stiff Spring(A Pigeon landing on both a soft and a stiff spring) Left: Soft Spring | Right: Stiff Spring
(A Pigeon landing on both a soft and a stiff spring)

BeamDamp

Damping is the resistance to movement.

So a spring with a damping value above 0, when in a frictionless vacuum, will always trend towards to a stationary position. This allows the motion of a spring to be controlled.

Left: No Damping | Right: Some Damping(A Pigeon landing on a springs of equal stiffness with and without damping) Left: No Damping | Right: Some Damping
(A Pigeon landing on a springs of equal stiffness with and without 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 & Strength values


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(A Vanster landing on equal springs with high and low deformation values) Left: Low deformation value (5000) | Right: Practically infinite deformation value
(A Vanster landing on equal springs with high and low deformation values)

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, meaning 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(A Sunburst landing on equal springs with high and low strength values) Left: Low Strength | Right: High Strength
(A Sunburst landing on equal springs with high and low strength values)

Node Weight


Node weight can be used to adjust how heavy each individual point of a 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) 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.

If you would like to learn more in-depth information, about the topics covered here, or about the many other parts of BeamNG vehicle construction, visit our Documentation.