JBeam Debug Tools Overview
JBeam Debug Tools Overview
Getting Started
Official Content
Tutorials
Modding
User Interface
Modeling
Game Modes
Vehicles
Introduction to JBeam
JBeam Syntax
The part/slot system
Debug Tools
Common Jbeam Issues
JBeam file sections
Vehicle Systems
Tutorials
Levels
Materials
Flowgraph
Input
Translation Program
Mod Support
Programming
Protocols
World Editor
Support
[Link]
Debug Tools
To help with Jbeam design, the game has multiple debug views that allow you to get more information about your Jbeam.
Console
The console can be accessed using ` . It shows information and errors that happen while loading a car, and can be helpful to investigate why a
vehicle isn’t loading, has missing textures, etc.
The information is color coded, with errors in red, warnings in yellow, info in green and debug information in blue. You can hide the various types
of messages by clicking on the buttons in the upper left corner.
Slow-Motion
The Slow-Motion tool, while not expressly defined as a debug tool, can be very useful to troubleshoot jbeam issues. It can be accessed in the
“Environment” menu, or by pressing Alt + Up
[Link] 1/19
7/15/24, 12:05 AM Debug Tools
Node visualization
The node debug views can be accessed by default with Ctrl + M . In the debug UI, you can edit the width and transparency of the highlight.
Simple - Shows the nodes with a color code based on collisions. Yellow nodes have both internal and external collision, light blue nodes have
external collision but no internal collision, purple nodes have no collision at all.
Weights - Shows the nodes as dots whose size varies based on the weight of the node, color coded the same way as in the Simple mode.
Displacement- Highlights the nodes that have displaced from their initial position on spawn via elastic deformation. The bigger
displacement, the more opacity the highlight color has.
Velocities - Shows node velocity compared to the reference nodes.
Forces - Shows a vector of the total forces applied on a node. Can be very useful to find instabilities or nodes which are being pushed by
unwanted triangles collisions.
Density - Shows if the node is currently in the air (green) or in water (red).
Node text
The node text views can be accessed by default with Ctrl + N . In the debug UI, you can toggle whether these text are also shown for wheel
nodes. This is turned off by default due to them obstructing view and generally not being useful in most cases. The following views are available:
Name - Shows the name of each node as defined in the jbeam. If it has no name, which is true for wheel nodes, it shows the id number
instead.
Numbers - Shows each node’s id number. Mostly used by lua and the physics engine.
Name+Numbers - Combination of the two previous modes.
Weights - Shows each node’s name and weight in kg. Also shows the total weight of all nodes around the top right corner of the screen.
Materials - Shows each node’s name and assigned material.
Groups - For each node, shows its name and the group it belongs to. Requires turning on the “Spawn in Debug Mode” checkbox in the
debug UI to work.
Forces - Shows each node’s name and the value of the vector of total forces applied on it. Also shows average force around the top right
corner of the screen. Couplers are shown with red font instead of black, and are not counted in the average calculation.
Relative positions - Shows each node’s name and its position relative to the vehicle’s local coordinates.
World positions - Shows each node’s name and its position relative to the world.
Latches - Shows sound events related to vehicle latches, such as the open event, close event and break event, along with the name of the
latch.
[Link] 2/19
7/15/24, 12:05 AM Debug Tools
PropAnimation - Shows sound events related to prop animation controllers, along with the name of the controller.
Soundscape - Shows sound events related to various vehicle sounds.
CombustionEngine - Shows sound events related to the engine and exhaust, if they exist on the vehicle. Shows the name of the engine in the
label, and additionally in the name of this section, for example “CombustionEngine mainEngine”.
Powertrain - Shows sound events related to various powertrain devices of the vehicle.
Beam visualization
The beams debug views offer multiple views to help show the various states of beams. They are useful to help building your jbeam, and
investigate issues caused by instability or leaking properties. The beam debug views can be accessed by default with Ctrl + B . Some beam
debug views have a value range parameter to limit the values that are visualized. This can be set through Vehicle Config > Debug > “Range Min”
and “Range Max” sliders and the “Show Infinity Values (FLT_MAX)” checkbox.
This section contains beam visualization modes based on the current status of the beam in game. Available modes are:
There also beam visualization modes which vizualize beams based on their properties set in Jbeam. These debug modes visualize lower end range
values in white, upper end range values in red, and infinity (FLT_MAX) values in purple. The modes for these are:
Beam Damp
Beam Damp Fast
Beam Damp Rebound
Beam Damp Rebound Fast
Beam Damp Velocity Split
Beam Deform
Beam Limit Damp
Beam Limit Damp Rebound
Beam Long Bound
Beam Precompression
Beam Precompression Range
Beam Precompression Time
Beam Short Bound
Beam Spring
Beam Strength
Bound Zone
Damp Cutoff Hz
[Link] 3/19
7/15/24, 12:05 AM Debug Tools
Damp Expansion
Deform Limit
Deform Limit Expansion
Deformation Trigger Ratio
Long Bound Range
Precompression Range
Short Bound Range
Spring Expansion
Beam text
Contains extra information for each beam:
Available modes:
Simple - For each torsion bar, it shows its nodes color coded from one end to the other in red, orange, yellow and green colors respectively.
Also highlights the connections between these nodes in a different color for each torsion bar.
Without Broken - The same as above, except broken torsion bars will no longer be highlighted.
With Broken - The same as above, except broken torsion bars will be highlighted in more visible colors than intact ones.
Broken Only - The same as above, except it will only highlight the broken torsion bars.
Angle - The opacity of the torsion bar will visualize the angle between its arms. You can set the minimum and maximum displayed range in
settings.
Stress - The opacity of the torsion bar will visualize the stress between its arms. You can set the minimum and maximum displayed range in
settings.
Deformation - The opacity of the torsion bar will visualize the deformation between its arms. You can set the minimum and maximum
displayed range in settings.
Damp - The color of the connections between the torsionbar’s nodes will visualize its damping the same way beam damp debug is
visualized. You can set the minimum and maximum displayed range in settings.
Deform - The color of the connections between the torsionbar’s nodes will visualize its deformation resistence the same way beam deform
debug is visualized. You can set the minimum and maximum displayed range in settings.
Spring - The color of the connections between the torsionbar’s nodes will visualize its stiffness the same way beam spring debug is
visualized. You can set the minimum and maximum displayed range in settings.
Strength - The color of the connections between the torsionbar’s nodes will visualize its breaking resistence the same way beam strength
debug is visualized. You can set the minimum and maximum displayed range in settings.
[Link] 4/19
7/15/24, 12:05 AM Debug Tools
Only available from the debug UI. Shows rails and slidenodes of the vehicle. Useful to debug issues with beam breaking and deformation on
spawn due to misaligned slidenodes.
Available modes:
Simple - Shows each rail and its slidenodes in their own color. Slidenodes will be thicker than rail nodes.
Without Broken - The same as above, except broken rails and detached slidenodes will no longer be highlighted.
With Broken - The same as above, except broken rails and detached slidenodes will be highlighted in more visible colors than intact ones.
Broken Only - The same as above, except only highlights broken rails and detached slidenodes.
Others
Collision triangle debug: The triangle debug view can be accessed by default with Ctrl + T . It shows the front of standard triangles in
green, and the rear in purple. No-collision triangles show in yellow, and pressured triangles in blue.
Aerodynamics debug: The aerodynamics debug is only available through the debug menu, which can be accessed after enabling advanced
functions in the UI options. It is used to debug the aerodynamics of the car, and investigating issues like imbalances in lift and drag. Keep in
mind that while the aerodynamic properties are defined with triangles , forces are calculated at each node, using the properties, size and
1. Drag + Lift - shows 3 vectors for each node. In yellow is the normal vector of the node’s aero surface, based on the size and orientation of
the adjacent triangles. In red is the drag applied to that node. This force vector will always be pointing straight back compared to the airflow.
In blue is the lift/downforce applied to that node. This force vector will always be perpendicular to the drag.
2. Angle of Attack - shows the angle between the node’s normal vector and the airflow. If the normal vector is perfectly aligned with the
airflow, the angle of attack will be 90 degrees and the force will be entirely drag. If the normal vector is perpendicular to the airflow, the
angle of attack will be 0 degrees and there will be no aero forces on the node.
3. Combined - This view combines the information from the previous 2 views.
[Link] 5/19
7/15/24, 12:05 AM Debug Tools
Center of Gravity: The CoG debug view can be accessed by default with Ctrl + G .
The red dot shows the position of the car’s center of gravity. The
blue dot shows the position of the car’s center of pressure, which is where all the drag and lift forces average out. The two different modes
show the center of gravity with and without wheels, respectively.
Tire contact point debug: Shows ground contact point for each tire of the vehicle.
Mesh visibility: While not a debug tool by itself, the mesh visibility scale is very useful to help you see the various debug views better by
making the mesh partly or full transparent. The default keys are Ctrl + NumpadPlus and Ctrl + NumpadMinus to raise and lower mesh
visibility, respectively.
UI Apps
[Link] includes a number of useful debug UI apps that can be added to the interface.
[Link] 6/19
7/15/24, 12:05 AM Debug Tools
Engine Debug
Displays some information about the engine which can be useful to debug energy losses caused by friction or temperature.
tuning.
Node/Beam Info
This app reliably displays Jbeam related statistics of the vehicle, such as a number and percentage of deformed or broken beams and torsionbars,
precise total weight, number of triangles, etc. Can be used to judge a vehicle’s Jbeam related performance impact compared to other vehicles.
Also very useful for finding issues that are otherwise hard to notice and result in a wrong weight or deformed beams.
Powertrain Visualization
Visualizes the powertrain tree of the vehicle with all of its components and the torque going through it. This can be changed to power by clicking
on the ’torque’ text. Highlighting a component with the mouse will display its name and RPM. Some components such as locking wheel axles,
disconnectable shafts, locking differentials and rangeboxes can be interacted with by clicking on them in the app. This app is very useful for
[Link] 7/19
7/15/24, 12:05 AM Debug Tools
Torque Curve
Practically a must have for tuning engines, this app shows the torque to RPM curve in Nm and power to RPM curve in Ps, displaying the current
and peak power and torque values together with the current point on the curve. Individual forced induction devices can be toggled on and offon
Weight Distribution
Shows the load on each wheel of the vehicle in different ways at once: as a background visual highlighting wheels with over 25% load, as weight
load in kg, force load in N, and percentage of total weight on each wheel.
World Editor
The World Editor, accessed with the F11 key by default, contains a few useful tools for Jbeam debugging. They can be added via the Window tab.
[Link] 8/19
7/15/24, 12:05 AM Debug Tools
Found in Audio tab. Allows debugging suspension sound parameters defined in Jbeam.
[Link] 9/19
7/15/24, 12:05 AM Debug Tools
Vehicle Manager
Found in Experimental tab. Upon clicking ‘Reload’, it creates the following files in the userfolder:
vehicleDebug_activeParts.json: Raw Jbeam data from all active parts on the vehiclein the Json format.
vehicleDebug_chosenParts.json: List of all the parts currently equipped on the vehicle and their slots, formated similar to the .pc
configuration files.
vehicleDebug_config.json: Configuration file of the current vehicle, similar to a .pc file but with more data.
vehicleDebug_data.json: All of the data of the vehicle as seen by the game engine.
vehicleDebug_preTable.json: All of the Jbeam sections from all of the parts of the vehicle merged into one Json file.
The Vehicle Manager allows for debugging issues with calculations and string concatenation in Jbeam,
Vehicle Editor
The Vehicle Editor is a group of useful Jbeam tools which can be accessed via Shift + F11 or from the World Editor tabs: Window >
Experimental> Vehicle Editor. It has two tabs: Static Editor, focused on editing Jbeam files, and Live Editor, focused on debugging Jbeam behavior
in real time. Both have customizable layouts that can be saved, allowing the user to have their favorite tools always on display.
[Link] 10/19
7/15/24, 12:05 AM Debug Tools
Jbeam Modifier Leaking Visualizer: Shows which Jbeam values used in parts leak to parts loaded after them.
Jbeam Spellchecker: Searches all Jbeam files for section name typos and then prints them in console.
Jbeam Table Visualizer: Shows tables of the chosen Jbeam files on the UI.
Jbeam Variables Checker: Searches all .pc fies for variables that are out of range according to the Jbeam files they are defined in and then
prints them in console. (May produce false positives in case the same variable is defined in multiple files with different ranges)
General Data: Shows some basic useful data all in one place.
[Link] 11/19
7/15/24, 12:05 AM Debug Tools
Jbeam Picker: Allows for picking individual nodes and beams of the vehicle with the mouse cursor, and displaying some static and live data
of them.
Lights Debug: Shows the directions in which all of the lights on the vehicle are being cast.
Mirrors Debug: Allows testing mirror Jbeam parameters in real time using sliders.
Powertrain Inspector: Shows static and live Jbeam about a selected powertrain device.
Prop Transformer: A very useful utility which makes positioning props on the vehicle much easier. To select a prop, click the ‘Pick Prop’
button. Some points will appear on the vehicle, they are origin nodes of the props, you can cycle between different props in each origin with
the scroll wheel. You can then use the buttons at the bottom to enable a 3D gizmo which will allow you to set the position and rotation of
[Link] 12/19
7/15/24, 12:05 AM Debug Tools
the props. Finally, you can copy the values from text fields to your Jbeam. You can do it manually or automatically with a button if you are
using baseTranslationGlobal.
Raw Vehicle Data: Shows all of the vehicle data from game engine.
Error messages will show up in red in the console, while warning messages show up in yellow.
Syntax issues
The first type of issues are jbeam syntax issues, which will cause the parser to fail and the effected part to not load. For more information about
syntax, see the introduction to jbeam syntax page.
You should find an error message in red similar to “unable to decode JSON: /vehicles/vehicleName/[Link]”, telling you which file fails to
load.
The parser is usually able to pinpoint those issues with quite a lot of accuracy.
["bd8l",0.31,1.68,0.52],
["bd8ll",0.64,1.68,0.52],
["bd10rr",-0.627,0.706,0.25],
["bd10ll",0.627,0.706,0.25],
JSON decoding error: [string “lua/common/[Link]”]:55: Invalid input near line 68, ‘[“bd9”,0.0,0.381,0.3],’
An enhanced text editor that can also be helpful by highlighting strings, making it very obvious if something is amiss. Here’s an example in Visual
Studio Code with the language set to “JSON with comments”
Missing brackets
Everything in jbeam is defined as sections delimited by brackets. It is very important that each bracket has an identical closing bracket, otherwise
the parser will fail.
In the console, the error message won’t usually pinpoint the error as accurately as string issues, but it should tell you the file and rough location of
the issue, usually either the section which contains the error, or the section located right after.
JSON decoding error: [string “lua/common/[Link]”]:55: Invalid input near line 95, ‘“beams”:[’"’
In a case like this, the last part will overwrite the first part with the same name. To avoid this, you will need to either delete or rename one of the
parts in your jbeam.
Keep in mind that the part listed in the error message is the second part found, with the first instance of that component being possibly located in
an other file.
Flexbody issues
Flexbody related issues will cause the part to still load correctly with it’s jbeam structure, but the flexbody itself won’t appear.
[Link] 14/19
7/15/24, 12:05 AM Debug Tools
This either means that the mesh isn’t inside a dae file within your mod’s folder, or that you made a typo when naming your model in the flexbody
section
Missing nodegroup
If the model doesn’t show up and there are no console errors, this usually means that there are no nodes in the nodegroup referenced in the
flexbody section.
Usually this is due to a typo in the group definition, either in the flexbody section, or the node section.
VY node error
A VY node error can be seen in console as the following error :
This means that the physics engine is unable to properly map the flexbody to the defined set of nodes; This has a few possible causes.
The first one is not enough nodes. The physics engine needs at the very least 3 nodes, preferably more, assigned to each flexbody to calculate
deformation properly.
An other possible issue is the position of the nodes relative to each other. If the nodes are all in line or on a flat plane, the game might be unable
to map the flexbody to the nodes, and give out a VY error.
And the last possible issue is if the nodes don’t properly cover the flexbody. If parts of the flexbody are located far away from any of the assigned
node, the game will be unable to properly interpolate their position based on node coordinates.
In all cases, the best solution is to include more nodes into the flexbodies nodegroups, or assign additional nodegroups.
No material assigned
If you have no material assigned to your model in blender, the model won’t appear and the following error will show in console :
Structural issues
Structural issues won’t usually cause errors in the console, but they’ll cause visible issues in your jbeam, either in the form of vibration, excessive
floppiness, etc.
In most cases, don’t forget to double check your beam parameters. Parts that deform easily, or weird suspension behavior can be caused by
deform settings being lower than they should, stiffness/damping not being adapted to the application, or incorrectly set bounds.
[Link] 15/19
7/15/24, 12:05 AM Debug Tools
When it comes to flat components, you might also need to use what is called a rigidifier node, a node with no collisions that is offset from the
surface, and connected to every node on the panel. If you already had a rigidifier node, you might need to move it further away from the surface.
Instability
One of the biggest limits when it comes to tuning beam structures in beamNG is the structure going unstable.
There are a few levels of instability that you might encounter. The worst one, which happens when the problem beams cannot break, is the car
disappearing on spawn along with an “instability detected message”
However instability can also cause breakable components to break off on spawn, or just vibrate and pulsate in place, which is very easy to notice in
the “Stress” beam debug view, as the beams flash from bright blue to bright red very fast.
0:00
This is the result of having a beamSpring and/or beamDamp values that are too high for the nodeWeight, and is fixed by either lowering
beamSpring/Damp or raising nodeWeight. Instability might also be caused or worsened by nodes being pushed on spawn, which adds a load on
the structure.
[Link] 16/19
7/15/24, 12:05 AM Debug Tools
There are 2 possible fixes for this type of issue. The first one, that is usually recommended for body panels, is to move nodes around to make sure
that there is no clipping happening on spawn.
In some cases like suspension, where node positioning is important to insure good suspension geometry, you can also set “selfCollision” to false.
Keep in mind though that this will allow the component to clip freely through the vehicle, which might not always be desired behavior.
The first possible cause is a misalignment of slidenodes with their rail, causing them to violently return to position on spawn. This can easily be
seen by spawning the car with paused physics and using the stress debug, as the connected beams will appear stressed, even with no
precompression.
An other possibility is instability that stops after some level of deformation has happened. To confirm this, you can look at the stress debug just as
the car spawn, using 100x slow motion. You should see vibration happening just as the car spawn. To fix that issue, refer to the section about fixing
instability.
It might also be caused by excessive or excessively quick beam precompression. Make sure that you didn’t make an error and are precompressing
the beam too much. If the beam is simply precompressing too fast, you can slow down the change using beamPrecompression time in line with
your beam like this :
["fx5l","st1l", {"beamPrecompression":"$=$toe_FR-$steer_center_F","beamPrecompressionTime":0.5}],
Leaking properties
Leaking properties appear when a component that shouldn’t be affected by something like a breakgroup, deformgroup, collision properties, etc, is
affected by it.
[Link] 17/19
7/15/24, 12:05 AM Debug Tools
An example of a leaking breakGroup could cause the rear bumper to disintegrate when you rip off the front bumper.
For breakgroups and deformgroups, this can easily be seen on their respective debug views.
In all cases, the easiest way to avoid those issues is to have a closing statement like this at the end of your parts to reset properties to standard
values:
In some cases it’s also recommended to use table row modifiers , to completely eliminate the risk of leaking properties.
Those errors reduce performance, and also make it harder for you to pinpoint actual issues.
Here are a few of the more common errors you might see that won’t visibly affect the mod.
Duplicate beams
Duplicate beams can happen with typos and errors while copy pasting. They show up as yellow messages saying “duplicated beam between
nodes”
Fixing those simply requires removing one of the superfluous references to said beam.
Missing node
An other error you might see which won’t necessarily affect the functionality of your mod is a missing node error, which will show in console as
something like this :
link target not found : beams/1787 > nodes/nodeName id1:nil, id2:nil, partOrigin: PartName - DATA DISCARDED
This can either be the result of a typo, or a beam/triangle that you forgot to remove after removing a node.
If the missing node is caused by the node not being there with the current selection of parts, using the “optional” property is recommended.
Missing flexbody
If you based your jbeam on pre-existing jbeam, or did some changes in your flexbodies. You might be seeing this issue :
If there are no visibly missing meshes on your vehicle, simply remove the reference to that flexbody in your jbeam.
Last modified: 17/8/2023 18:50
[Link] 18/19
7/15/24, 12:05 AM Debug Tools
Our documentation is currently incomplete and undergoing active development. If you have any questions or feedback, please visit this
forum thread.
[Link] 19/19