HubWheels

HubWheels

From BeamNG

Revision as of 00:34, 4 November 2019 by Toron Beldevar (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

HubWheels are a now deprecated wheel/tire model available in BeamNG. Consider using PressureWheels instead.


HubWheels simulate a rigid wheel rim as well as the soft, pressurized tire around it. The wheel rim can deform and break and the tires can deflate. The height of the tire sidewall is accurately depicted and has a realistic effect on handling.

Example hubWheels section with added note sections. (//)

	"hubWheels": [
            ["name","group","node1:","node2:","nodeS","nodeArm:","wheelDir"],
			{"enableTireSideSupportBeams":true},
			
			//general settings
			{"radius":0.375}, //Radius of the tire nodes
			{"hubRadius":0.22}, //Radius of the rim
			{"wheelOffset":0}, //Offset from the original position(Left/right)
			{"hubWidth":0.225}, //Width of the rim
			{"tireWidth":0.215}, //Width of the tire
			{"numRays":12}, //The amount of nodes to make the circle, more may result in smoother driving, but at the cost of performance, weight & stability(This value must contain an even number between 2-50 ideally between 16-28. numbers below 10 shouldn't be used)
			
			//hub options
			{"hubBeamSpring":1081000, "hubBeamDamp":16},
			{"beamSpring":1081000, "beamDamp":16},
			{"hubBeamDeform":36000, "hubBeamStrength":112000},
			{"beamDeform":240000,"beamStrength":380000},
			{"hubNodeWeight":0.60}, //Weight of the rim nodes, to get the total weight of the rim, calculate numRays X nodeWeight X 2
			{"hubNodeMaterial":"|NM_METAL"},
			{"hubFrictionCoef":0.7},
			
			//tire options
			{"wheelTreadBeamSpring":281000,"wheelTreadBeamDamp":90,"wheelTreadBeamDeform":25000,"wheelTreadBeamStrength":34000},
			{"wheelPeripheryBeamSpring":281000,"wheelPeripheryBeamDamp":90,"wheelPeripheryBeamDeform":25000,"wheelPeripheryBeamStrength":34000},
			{"springExpansion":1081000, "dampExpansion":18},
			{"nodeWeight":0.60}, //Weight of the tire nodes, to get the total weight of the tire, calculate numRays X nodeWeight X 2
			{"nodeMaterial":"|NM_RUBBER"},
			{"frictionCoef":1.1}, //Tire friction for each node, increasing will add more grip to your vehicle
			
			//pressure options
			{"pressurePSI":32}, //Tire pressure in PSI
			{"maxPressurePSI":1500},
			{"reinforcementPressurePSI":31},
			{"pressureSpring":2601000},
			{"reinforcementPressureSpring":144000},
			{"pressureDamp":90},
			{"reinforcementPressureDamp":90},
			
			//front
			{"selfCollision":false}
			{"collision":true}
			{"axleBeams":["axle_a_FL","axle_b_FL",]}
            ["FL", "wheel_FL", "hu2l", "hu3l", 9999,  "hu4l", 1],
			{"axleBeams":["axle_a_FR","axle_b_FR"]}
            ["FR", "wheel_FR", "hu2r", "hu3r", 9999,  "hu4r", -1],
			{"axleBeams":[]}
			{"propulsed":0}
			{"enableABS":false}
			{"selfCollision":true}
	],

TireSideSupportBeams exist to prevent the tire from inverting and collapsing on itself when it deflates. They should always be used (unless they're causing problems).

The basic beamStrength and beamDeform in this section are applying to any beams not having specific values used. In this case, they are applying to the tire's sidewall and diagonal reinforcement beams, which do not use conventional beamSpring, but rather simulate air pressure.

numRays is simply the number of nodes making up the circle. It's a balance between smoothness and physics overhead.

springExpansion applies to the tread beams (since they should compress more readily than they expand). This value should be as high as possible. pressureSpring is the expansion stiffness of the pressurized side beams - again, as high as possible. The more the tire can expand with speed, the more problems arise - high rolling resistance, inaccurate speedometers, and other issues.

reinforcementPressurePSI should start at the same value as pressurePSI, and then be tuned above or below depending on the desired sidewall stiffness. An old bias-ply tire from the 1950s would have a lot less lateral rigidity than a modern radial tire, for example.

Some example PSI values:

Car: 30

Light Truck: 40

Medium Truck: 60-80

Heavy Truck: 100


The name of the wheel is important for displaying in the debug, and also for integration with various functions in the game (such as the dynamic steering). The group is just what the flexbody will assign to.

nodeS is a stabilizing node - each node from the hub will attach to this node with a beam. It's mostly legacy and not generally used. Putting 9999 in will disable it.

nodeArm is where reaction torque is applied. This should be where the brake pad would be in reality - so a node on the wheel spindle located near the wheel. Do not assign any axis node as the nodeArm. This creates hugely unstable infinite forces. nodeArm should always have some distance away from the axis of the wheel.

axleBeams are the beams that, upon breaking, will stop giving power to the wheel (to simulate a broken axle).

It's good to "reset" various values after the wheels are declared, such as brake torque, propulsion, and ABS. This way, these behaviors can be delegated to the proper parts, such as differentials, transfer cases, and brakes, rather than being inside the wheel itself. The idea is that such parts would load before the wheels, and assign the propulsion and braking properties to the wheels.

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