Flexbody wheels¶
What is this?¶
By default, Rigs of Rods's meshwheels sections generate a tire using a texture. In order to use a 3D tire mesh, you have to place the tire meshes using flexbodies or props. This tool simplifies that process by generating the flexbody code for you.
Some addon parts require you to generate flexbody wheels as the tire mesh is separate.
Not to be confused with flexbodywheels, which provides this feature.
Instructions¶
First, make sure the tire material in the meshwheels section is set to tracks/trans
, for example:
meshwheels
;tire_radius, rim_radius, width, numrays, node1, node2, snode, braked, propulsed, arm, mass, spring, damping, side, meshname material
0.35, 0.21, 0.5, 14, 32, 33, 34, 1, 1, 18, 200.0, 300000.0, 2000.0, l, dodgechargerwheel.mesh tracks/trans
0.35, 0.21, 0.5, 14, 34, 35, 33, 1, 1, 26, 200.0, 300000.0, 2000.0, r, dodgechargerwheel.mesh tracks/trans
0.35, 0.21, 0.5, 14, 44, 45, 9999, 1, 0, 53, 200.0, 350000.0, 2000.0, l, dodgechargerwheel.mesh tracks/trans
0.35, 0.21, 0.5, 14, 46, 47, 9999, 1, 0, 50, 200.0, 350000.0, 2000.0, r, dodgechargerwheel.mesh tracks/trans
Notice the tracks/trans
at the end of the line. This makes the default tire invisible.
Explanation of each option:
Number of wheels
- Amount of wheels the vehicle has.
Wheel rays
- The number of ‘pie pieces’, or corners, that make up the wheel. In the above example, numrays
is set to 14
.
Chassis nodes
- Amount of nodes the vehicle has. Just set the last node ID at the bottom of the nodes section.
Cameras before wheel section
- Amount of cameras the vehicle has. Most only have 1, while others (such as the Gavrils) have 3.
Inside axle node
- The inner axle node. In the above example, the first wheel's node1
is 32
.
Outside axle node
- The outer axle node. In the above example, the first wheel's node2
is 33
.
Mesh name
- The mesh name of the tire, with .mesh
file extension.
Once you fill in all options, click Generate code
to generate the flexbodies.
All that's left to do is just paste the generated flexbody lines below the meshwheels
section.
Complete example for the Burnside Race:
meshwheels2
;tire_radius, rim_radius,width,numrays,node1,node2,snode,braked,propulsed, arm, mass, spring, damping, side, meshname material
0.35, 0.233, 0.265, 14, 44, 46, 9999, 4, 1, 131, 46.0, 100000.0, 900.0, r, ICD_AEZ_Forged_16.mesh tracks/trans
0.35, 0.233, 0.265, 14, 45, 47, 9999, 4, 1, 134, 46.0, 100000.0, 900.0, l, ICD_AEZ_Forged_16.mesh tracks/trans
set_beam_defaults 3300000, 90, 2000000, 2500000
set_node_defaults -1, 1.14, -1, -1
0.35, 0.233, 0.265, 14, 66, 67, 69, 1, 1, 62, 46.0, 125000.0, 900.0, r, ICD_AEZ_Forged_16.mesh tracks/trans
0.35, 0.233, 0.265, 14, 69, 70, 67, 1, 1, 63, 46.0, 125000.0, 900.0, l, ICD_AEZ_Forged_16.mesh tracks/trans
flexbodies
; wheel 1
44, 46, 249, 0.5, 0, 0, 0, 0, 0, ICD_Kumho_ECSTA_SPT_16.mesh
forset 46, 44, 249-276
; wheel 2
45, 47, 277, 0.5, 0, 0, 0, 0, 0, ICD_Kumho_ECSTA_SPT_16.mesh
forset 47, 45, 277-304
; wheel 3
66, 67, 305, 0.5, 0, 0, 0, 0, 0, ICD_Kumho_ECSTA_SPT_16.mesh
forset 67, 66, 305-332
; wheel 4
69, 70, 333, 0.5, 0, 0, 0, 0, 0, ICD_Kumho_ECSTA_SPT_16.mesh
forset 70, 69, 333-360
When you click Generate code
, the current settings attempt to be stored in the browser, so that when revisiting the page, they are retrieved.
This only allows storage of one truck's settings at a time - hopefully that's enough for development purposes.
Troubleshooting¶
-
If the tire sticks too far out/in, adjust the X offset. In the above Burnside Race example, the offset is set to
0.5
. -
If the tire glitches/isn't attached to the wheel, you have set the wrong node/camera count and/or wheel nodes.
Credits¶
This was originally a spreadsheet by Fat-Alfie on the Rigs of Rods forum. Translated into html/javascript form by nmurdoch.ca to make it more convenient.