Modding NHeat - Physics/Mass distribution | |||||||||||||||||||||
Up to now everything we have edited in physics has been pretty much straight forward. A lot of real life data has found it's way to the simulated car's physics and it was rather simple to put in. Now we'll focus on those parts that define the car's handling and "feel". And to get this right, we'll have to check the outcome of each change on the physics in the game - which means: testlaps, testlaps, testlaps ! This makes it important to take a good decision about what track to use for testing. At best it should offer all kind of challenges to the car. For testing road racing cars, some midsize track like Nurburgring is a good choice. Hairpins, fast and slow S-bends, fast turns, up- and downhill sections... everything is in. One of the most important parts in car physics is mass distribution, and it's effects on the car. This is first order made up from these parameters:
We have precise info about the car's mass, length, width and height - and inertia (= mx,my,mz) is made from these values. For a brick with homogenously distributed mass inertia would have to be calculated like this in real life physics:
But WHAT is mx, my, mz actually ? How does it affect the car's handling ?
my and mz work in exactly the same way, just for different rotation axis.
Some algorithm to get a first draft is helpful nonetheless:
Up to now we only have told Heat how MUCH weight is has to shift on rotational movement. But since mass isn't homogenously distributed on the car's body, we'll want to set WHERE the mass is placed. And which way it rolls. In real life physics (and in Heat too) the movement of any object can be calculated from assuming it's mass being located in a single point: it's center of mass. Any object will act like it's mass actually IS located ONLY in this center of mass. Now Heat only has a parameter to set
Now cm_height has a close relationship to front/rear rc_height and it is important to take care of these at the same time. If the car turns, it's center of mass rolls around the axis that is made up from front and rear roll centers. So defining this axis' angle and height has big impact on the car's handling. Even more important is how much above that roll center axis cm_height is located
|
|||||||||||||||||||||
Modding NHeat - Physics/Tires | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Even more important as mass distribution to get the car feel right is tire physics. If you mess up tires physics, perfect car body physics won't compensate - though it's quite popular to simply add a lot of downforce to car body to compensate crap tire physics There's 20 (!) parameters that define tire physics in Heat, and each of these can be set for front and rear tires seperatly.
Since we already have set tire_diameter before, we have all the info we can get to "guesstimate" tire mass and moment. By the way: moment is nothing else but the tires' inertia regarding x-axis = mx
Now for the more interesting parameters.
long_stiff sets the tires' stiffness for longitudinal movement. It is defined as multiple of lateral stiffness. So if for example you set long_stiff 2.0, you'll get tires that have twice as much longitudinal as lateral stiffness Setting low stiffness values will make for a better "feeling" of the car's weight in turns - and less skidding. But the borderline's steepness from grip to skidding will increase, and thereby make skidding less controllable. High stiffness values will make for faster loosing grip in turns, but more control - and thus faster steering. The tires' stiffness is very important to set right, as it has major impact on the overall "feeling" of the cars and how much FF effect there will be on each situation of driving
The parameter friction doesn't affect grip, but how fast the tires will heat up. So much for the straight forward part of NHeat's tire attribute :)
But there's even more to it, as Nheat allows for defining tire compound attributes as well.
Basically Pacejka's formula is
By playing around with compund definitions, you should always only adjust one magic number at the same time, unless you have a very good understanding of what you're doing - and you should change the numbers only in very small steps (+/- 0.1 or 0.01) In NHeat the magic numbers of Pacejka's Formula are
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||