JBeam Physics Theory

JBeam Physics Theory

From BeamNG

(Redirected from Yet Another Jbeam Guide)


Introduction

Hello, and welcome to Yet another JBeam guide!


This wiki-page is intended to cover the basics of the BeamNG.drive physics model, focusing mostly on the theory side of things. By the end of the guide, you won't be able to build a vehicle, but you will understand the theory needed to build one.


For more in depth content, head to the Vehicle Creation Megapage.






Node Beam structure

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.

Geomag.jpeg


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). 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.

Crossbraces.png

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.




CarIllustration.png

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.
A pigeon landing on both a soft and 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.
A pigeon landing on a spring 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.

A Vanster landing on a spring with and without deformation

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, 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!


A Sunburst landing on springs of both low and high strength

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 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.

Two vehicles, one vibrating due to low node weight

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.

Conclusion

So that concludes this introduction to JBeam Physics Theory... But, it doesn't have to be goodbye!


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, then go visit the Vehicle Creation Megapage. It contains many more articles, as well detailed documentation on all jbeam related topics.




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