Common Jbeam Issues

Your first reflex with any jbeam issue is to check console (` by default) for error messages.

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/jbeamFile.jbeam”, telling you which file fails to load.

Missing quotation marks

A mistake that’s very easy to make is to accidentally forget a quotation mark at the start or end of a string, especially when it comes to node names.

The parser is usually able to pinpoint those issues with quite a lot of accuracy.

For example this jbeam :

    ["bd8l",0.31,1.68,0.52],
    ["bd8ll",0.64,1.68,0.52],

    //bed sides lower
    {"nodeWeight":0.4},
    ["bd9rr,-0.627,0.381,0.25], //Missing quotation mark in the node name.
    ["bd9",0.0,0.381,0.3],
    ["bd9ll",0.627,0.381,0.25],

    ["bd10rr",-0.627,0.706,0.25],
    ["bd10ll",0.627,0.706,0.25],

Will show up in console like this :

unable to decode JSON: /vehicles/pigeon/pigeon_bed.jbeam

JSON decoding error: [string “lua/common/json.lua”]: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.

unable to decode JSON: /vehicles/pigeon/pigeon_bed.jbeam

JSON decoding error: [string “lua/common/json.lua”]:55: Invalid input near line 95, ‘“beams”:[’"’

Duplicate component name

If you have 2 parts of your jbeam with the same name, you should see an error like this in the console :

Duplicate part found : pigeon_hood from file /vehicles/pigeon/pigeon_hood.jbeam

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.

Flexbody shows up offset

If the flexbody shows up in game, but in an incorrect position, even if it seems positioned correctly in your Blender, the origin of the part is probably offset.

To fix this, please check out the modeling guidelines

Missing flexbody error

If the game cannot find your flexbody, this will be shown in console as :

Failed to get render mesh MeshName

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 :

FLEXBODY ERROR on mesh MeshName: VY node not found

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 :

Mesh [MeshName] has no material assigned… cant be rendered

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.

Structure collapses on spawn

Structures collapsing on spawn are usually caused by a lack of bracing in your jbeam. Please read the introduction to jbeam page for more information.

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.

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.

Panels getting pushed out of the car on spawn or vibrating

A common issue when it comes to panels and suspension components is nodes that spawn within triangles, and get pushed out on spawn. These are usually visible as panel gaps widening on spawn or components vibrating in place. Those issues can also be found by looking in the stress debug for beam stress that rises after spawning the vehicle.

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.

Major deformation on spawn

Major deformation that happens just when the car spawns has a few possible causes.

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.

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:

//closing statement for beams
{"breakGroupType":0},
{"deformGroup":""},
{"optional":false},
{"breakGroup":""},
{"beamPrecompression":1, "beamType":"|NORMAL", "beamLongBound":1.0, "beamShortBound":1.0},

In some cases it’s also recommended to use table row modifiers , to completely eliminate the risk of leaking properties.

Other common console issues

A good practice before releasing a mod is to go through the console and look for any error, even if the mod seems to be loading properly.

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”

duplicated beam between nodes: node1 and node2

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 :

Failed to get render mesh MeshName

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

Any further questions?

Join our discord