Debug Tools

To help with jbeaming, 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.

The text box at the bottom is used to enter commands.

Vehicle Config > Debug UI

The Debug UI contains many ways to debug the vehicles’ JBeam physics properties. This UI includes the debug modes listed below and also includes vehicle spawning functions.

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

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.

Nodes

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

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 in the top left 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 in the top left corner of the screen. Couplers are shown with red font instead of black, and are not counted in the average calculation.

Relative position

Shows each node’s name and its position relative to the vehicle’s local coordinates.

World position

Shows each node’s name and its position relative to the world.

Node debug text

Shows extra debug text which contains info about some additional properties defined for some nodes. Can be accessed by default with Ctrl + K

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.

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.

Beams

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.

Simple

Shows the beams in green.

Type

Draws the beams different colors depending on their type. Regular beams are green, support beams are purple, bounded beams are yellow, hydro beams are dark blue, pressured beams are cyan, l-beams are grey, and anisotropic beams are orange. This color legend can be found in the game as well.

With broken

Same as the “Type” view, but shows broken beams in red.

Broken only

Only draws broken beams. Useful to investigate issues like beams breaking on spawn.

Stress

Shows how much stress is on the beams, coloring them red in compression, and blue in tension. Useful to see instability issues and vibration. There are two stress modes, one with and one without constraining range values in the debug UI, the latter named “Stress (Old)”.

Displacement

Shows how much the beams are displaced from their initial lengths. Blue means the beam has been stretched and red means that it has been shortened. Debug UI lets you constraint range values.

Deformation

Shows how much the beams are deformed. Blue means the beam has been stretched past its initial length, red that it has been shortened. Debug UI lets you constraint range values.

Deformgroups

Highlights the beams by deformgroups with different colors.

Breakgroups

Highlights the beams by breakgroups with different colors. Useful to investigate issues of breakgroups that aren’t working as they should, or leaking.

Note:

The below beam debug modes visualize lower end range values in white, upper end range values in red, and infinity (FLT_MAX) values in purple.

Beam Damp

Visualizes the beamDamp value of the beams (damping behavior of beam).

Beam Damp Fast

Visualizes the beamDampFast value of the beams (fast damping behavior of beam).

Beam Damp Rebound

Visualizes the beamDampRebound value of the beams (damping behavior on rebound of beam).

Beam Damp Rebound Fast

Visualizes the beamDampReboundFast value of the beams (fast damping behavior on rebound of beam).

Beam Damp Velocity Split

Visualizes the beamDampVelocitySplit value of the beams (velocity when beamDampFast/beamDampReboundFast take effect).

Beam Deform

Visualizes the beamDeform value of the beams (force required to deform beam).

Beam Limit Damp

Visualizes the beamLimitDamp value of the beams (damping applied when length reaches longBound or shortBound).

Beam Limit Damp Rebound

Visualizes the beamLimitDampRebound value of the beams (damping applied when length reaches longBound or shortBound on rebound).

Beam Long Bound

Visualizes the beamLongBound value of the beams (how far beam can expand before limit properties are applied).

Beam Precompression

Visualizes the beamPrecompression value of the beams (how much the beam will shorten or expand upon spawning).

Beam Precompression Range

Visualizes the beamPrecompressionRange value of the beams (Beam Precompression but in meters).

Beam Precompression Time

Visualizes the beamPrecompressionTime value of the beams (time it takes to reach requested precompressed length).

Beam Short Bound

Visualizes the beamShortBound value of the beams (how short the beam can go before limit properties are applied).

Beam Spring

Visualizes the beamSpring value of the beams (stiffness of beam).

Beam Strength

Visualizes the beamStrength value of the beams (force the beam can withstand).

Bound Zone

Visualizes the boundZone value of the beams (transition area between standard and bounded values).

Damp Cutoff Hz

Visualizes the dampCutoffHz value of the beams (limits beamDamp below beam vibration frequency).

Damp Expansion

Visualizes the dampExpansion value of the beams (damp of beam when beam has expanded beyond spawned length).

Deform Limit

Visualizes the deformLimit value of the beams (limits deformation of beam in compression).

Deform Limit Expansion

Visualizes the deformLimitExpansion value of the beams (limits deformation of beam in expansion).

Deformation Trigger Ratio

Visualizes the deformationTriggerRatio value of the beams (level of deformation it takes to trigger deformGroup).

Long Bound Range

Visualizes the longBoundRange value of the beams (how much beam needs to expand before bound properties apply in meters).

Precompression Range

Visualizes the precompressionRange value of the beams (how much the beam will shorten or expand upon spawning in meters).

Short Bound Range

Visualizes the shortBoundRange value of the beams (how much beam needs to compress before bound properties apply in meters).

Spring Expansion

Visualizes the springExpansion value of the beams (spring of beam when beam has expanded beyond spawned length).

Beam text

Contains extra information for each beam.

IDs

Shows the internal id of the beam.

Torsion bar visualization

Only available from the debug UI. Shows torsion bars of the vehicle. Useful to debug stiff structures such as subframes and suspension.

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.

Rails and Slidenodes visualization

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.

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.

Collision triangle visualization

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

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 orientation of the adjacent triangles.

Drag + Lift

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

Angle of Attack

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

Combined

This view combines the information from the previous 2 views.

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.

Last modified: 22/1/2024 10:34

Any further questions?

Join our discord