View unanswered posts | View active topics It is currently Wed Nov 21, 2018 9:40 am



Reply to topic  [ 5 posts ] 
 The Sweet and Sublime Game: Findings of a GR Car Master 
Author Message
User avatar

GeneRally Carmaster

Joined: Tue Dec 29, 2009 3:55 am
Posts: 1121
Post The Sweet and Sublime Game: Findings of a GR Car Master
This isn't quite a tutorial but is (at least my goal anyway) to show the Gene Rally community the various findings, thoughts, and results of experimenting with car physics for 9 years. You are now about to learn the secret sauce to what made me stay for so long - the sweet and sublime game of developing the perfect car.

Who the f*ck are you?
Spoiler: show
I first joined the original Gene Rally community at Race Sim Central in December 2004 as the widely infamous "343guiltyspark" user, who posted a ton of rage and vitriol and was somehow not (but nearly) banned. I then preceded to sockpuppet account to hell and back for a good portion of the 2005 summer season until RSC died for the first time, and a temporary forum was established. I got banned from that.

When RSC revived in late... uh, 2006? I returned. I went through a massive number of user name changes until the moderation team forced me to settle on being known as "Emi #2". It was an alias that eventually stuck to me, and for all of the wrong reasons: Prior to this, I was extremely well-known and hated by the moderation team for frequently stealing other members' models. I eventually found peace and solace as a car maker once I figured out how to properly make my own models, but it was too late: it would take until the era of the Gene Rally International Forum to receive the Car Master award, something which I today accept only with bitter disappointment and self-loathing. Combined with my toxic, explosively temperamental personality, complete lack of self-respect, and total acceptance of the idea that I'm a piece of s**t (because you know that's true), it still shocks me that people even want my cars.

I was also a developer for Speed Dreams as a 2D artist, creating a number of liveries for some of the cars that appear in the game. I also did a bit of setup work for the cars as well, but this is not seen in newer releases, as I became inactive as a developer in late 2013. I also like to dress up as a maid from time to time, but you don't need to know that.

That said, I developed this formulaic parameters system with the goal of proving Fechna wrong, that you can, in fact, provide believable performance parameters while still being reasonably balanced. Of course, I believe I am right, but my only proof is in the FIA GT3 car pack I posted last year. I would have posted more with the World of Racing project, but my own stupidity set me back a bit. Oops.

Can you stop crying about your past and talk about physics already? We already know you suck!
Yes.

Chapter 1: Piece de la Air Resistance
In the real-world, air resistance is defined by a number of factors for an automobile, such as the shape, frontal area, and the pressure of the atmosphere. Gene Rally's simulation of air resistance is greatly simplified; the atmosphere is constant, drag coefficient (Cx) and frontal area (typically meters-squared) are rolled into one parameter, and there is no drafting (an aerodynamic effect which causes two vehicles' air resistances to decrease when behind one another).

The misconception is that it is typically enough to just use the Cx when we can find them; this is not entirely true. Drag coefficient tells only half of the story. For instance, although the Nissan GT-R is famous for its 0.26 drag coefficient, it has a fairly large frontal area of approximately 1.9 meters-squared, attributed to by its tall stature relative to other sports cars. Air resistance force increases exponentially with the speed, so as you go faster, you need more power to overcome the drag force. The GT-R gets to its 190 MPH top speed thanks to its low drag despite its frontal area and its reasonably high horsepower output of 550 horsepower.

Yet, modern Formula One cars are also "only" that fast. That's because despite their comparatively tiny frontal area, a modern GP car generates a huge amount of drag even with minimal wing angles; they need that 800+ horsepower output to overcome anywhere from three-and-a-half (3.5) to five (5!) times as much drag coefficient.

Since many of the vehicles you'll find typically don't have publicly published figures for frontal area (and drag), we'll need to find a way to at least reasonably approximate the area. This formula is Frontal Area meters2 = (Height in meters * Width in meters) * 0.75. For a car with 1.1 m height and 2.0 width, the approximate frontal area is 1.65 meters squared.

Now that we have the frontal area, we can multiply this by the car's drag coefficient. Since again we might not have any data, this can be used to approximate the drag (very, very, roughly, and will almost certainly be wrong): Drag Coefficient = ( (Height in meters * Width in meters) / Length in meters ) + ( Absolute value of aerodynamic lift in pounds at 125 MPH * 0.0001). For a "Generic Closed Top LMP2" (citation: Mulsanne's Corner), we get the following: Cx = ( (1.1 m tall * 2.0 m wide) / 4.6 m length ) + ( 1650 lbs * 0.0001 ) = 0.64 (rounding a bit).

To get the final air resistance value, we now multiply the two values together; this final formula is Air Resistance = frontal area * drag coefficient, or CxA. For our example Generic LMP2 Car, we get a value of 1.0395 for air resistance.

Chapter 2: There is no Gravity, the Earth Just Sucks!
The wings we see on top-level race cars today are not there to look pretty, just look at the Ferrari F14T for an example of something not pretty. They are there to generate a little black magic known as lift. Race car wings develop lift force negatively, that is to say, the lift force is actually towards the ground, not away from it like a plane's wing would do. This has the effect of literally sucking the car towards the ground at higher speeds without actually weighing the car down, and thus allows the car to corner at much higher speeds than it would if the car were lift-neutral, or worse, its lift were positive.

In the Gene Rally Car Editor, the Down Force / Wings value is such that, when the value is positive, it generates lift negatively (down force), and the opposite is true when negative. Typical production cars generate very little down force if any, and most even actually generate lift! But to make these cars fun to play in the Gene Rally world, it is common to give these cars 0 or just a little down force. A car with negative Wings values is not very fun to drive, because if it is a very fast car, the risk of being lifted up into the air becomes higher, and you can't actually control your trajectory in the air (but you can control how you land).

/!\ A common misconception is that down force helps control the car's rotation in the air. This is not true. The car's rotational speed in the air is fixed. What down force will do, because it's in the name, is control the rate of falling. Higher down force values means the car will fall much, much faster, as if it had a higher weight.

Nobody ever publishes their down force numbers publicly, but we can make a reasonably close approximation according to what we know about the car, and using the car's dimensions to lay out some baseline values.

We start off with the underside, this is the easiest part since we can calculate the potential size of the under tray. For our sake, with our generic LMP2 car, we'll use a wheelbase of 2.8 meters. So our under body area is Under Body Area m2 = (Wheelbase in meters) * (Car width in meters). We can get the potential area for a diffuser by using Diffuser Area = ( (Length - Wheelbase) / 2) * 0.6 . For our generic LMP2 car, this means:
Underbody Area = 2.8 m x 2.0 m = 5.6 m^2
Diffuser Area = ( (4.6 m - 2.8 m)/2 ) * 0.6 = 0.56 m^2.
Total Under Area = 6.26 m^2.

As a general rule, race cars generally make most of their down force from the under body, about 40 to 50% of it. The rear wing is about 33% of it, and the front wing is usually half of the rear wing, though this obviously depends on car and driver tastes. We don't have a CFD machine on the ready 99% of the time, so here is a very, very, very iffy approximation but better than just eyeballing it: Under Body Downforce = (Total Under Area * 175) * Tech Multiplier.

Tech Multiplier, say what?
A GT car generates about 1/2 to 3/4 the amount of down force of a Prototype, depending on the category, though Super GT (both GT300s specially built for the category and GT500s) is an exception. I recommend the following table for Tech Multipliers:
Normal cars = 0.2
Tuned and sporty cars, and "small" prototypes (ie. Caterham SP300R) = 0.4
Mid-range GT and Touring cars (ie. GT3, GTE/GT2, etc.) = 0.6
"Big" LM Prototypes and GT and Touring and mid-level open-wheel cars (LMP2, JGTC/SuperGT GT500, DTM post-1993, FR3.5, etc.) = 0.8
F1, Pikes Peak, and very extreme Time Attack cars = 1.0

For our example LMP2 car, it will generate about 876.4 lbs of down force at 125 mph (200 km/h roughly).

You can do the same for the front and rear wings:
Front wing: = ( ( (Length - Wheelbase) / 2) * 0.6 ) * Tech Multiplier
Rear wing: = ( ( (Length - Wheelbase) / 2) * 0.8 * Height ) * Tech Multiplier


For our example LMP2 car, this means:
Front wing = ( ( (4.6 - 2.8) / 2) * 0.6 ) * 0.8 = 0.432 "front wing factor"
Rear wing = ( ( (4.6 - 2.8) / 2) * 0.8 * 1.1 ) * 0.8 = 0.6336 "rear wing factor"

We need to use slightly higher coefficients to get acceptable down force, so...
Front Wing Downforce = (Front Wing Factor * 750) = 324 lbs at 125 mph
Rear Wing Downforce = (Rear Wing Factor * 750) = 475.2 lbs at 125 mph

This gives us a total downforce figure of 1675.6 lbs, close enough. We now have a figure to work with that's not cast-off! Uh, don't Google that.

Generally, I then divide that final figure by 6. We get a down force/wings value of 279, which is sufficient for a car of this type. Yay!

Be warned that the effectiveness of downforce is reduced with more mass, so you'll need more downforce for more mass.

Chapter 3 - Knowledge is Power
/!\ A common misconception is that the Power value is horsepower. However, did you ever notice in Track Tool that the 0-60 times don't line up if you use one-to-one Power and Weight ratios, assuming that Power is horsepower? This is actually because the power value is in kilowatts. As a result, GR cars accelerate much faster than real ones do typically. This is fine, as too low power can make a car too slow for handling quirks to show up. I already chatted about the effects of power against drag in Chapter 1, but here it has additional effects on handling. More power increases the power to weight ratio, which increases the amount of force being exerted on the tires; too much will overpower the tires, making the car slide if the balance is set higher than 1, or if the Sliding value is a non-zero value.

Krisu worked out the theoretical maximum speed for a given car, use the attached formula below. P is for Power, AR is Air Resistance, SD is slow down. The value it outputs is in km/h, to convert that value to meters/second (which is what the Car Editor uses), multiply the value you find by 0.2777778.
Attachment:
GR_top_speed#2.PNG
GR_top_speed#2.PNG [ 7.92 KiB | Viewed 6129 times ]

Note that this only finds the theoretical maximum speed, assuming there is a straight infinitely long enough to allow the car to reach that speed. More practically, the practical top speeds of cars will differ due to power/weight ratio and handling characteristics; F1 cars can reach their maximum speeds much more easily in Gene Rally's short straights than a GT car ever will, for instance.

Chapter 4 - Sliding the Edge of Balance
A GR car's handling is dictated mainly by four factors, excluding vehicle dimensions in most cases; they are Balance, Sliding, Mass, and Grip. Balance is the multiplier for front end traction; higher values give the front wheels more grip, but too much and the rears won't be able to keep their grip up with the fronts. An easy way to find out the balance of the car is to find the ratio of width between the front and rear wheels. I recommend introducing an additional multiplier to account for taste, and potentially another more to account for front weight bias (rear-heavy = more balance) and for mass (more weight = less balance).

To find the balance under the assumption that you know the frontal weight, the formula is
Balance = 0.5 + ( ( (Front/Rear tire width Ratio) / Frontal Weight) / (2+ (Mass * 0.00045 ) ) )
For our LMP2 car, this means our Balance is
0.5 + ( ( ( 285/325 ) / 0.46 ) / ( 2 + ( 900 kg * 0.00045 ) ) ) = 1.29 (rounding to the nearest hundredth)

I generally leave the Sliding values at 0, but if you want to use them, Sliding basically works as a Balance multiplier under throttle only. Note that GR's physics engine uses the absolute value of the Sliding value, so if you put in -0.5, it's the same as 0.5 Sliding. Sliding also introduces an extra "forward inertia" when off the throttle. Notice that when the balance is at zero but the Sliding is at say, 1.0 or such, you can only steer using the throttle, and that the car will just slide off in whatever direction you were last traveling when off of it (unless you get smacked, of course).

Although I used to use Mass scaling factors, this made cars too fast without making them more fun. I now recommend using the car's weight (without driver) in kilograms for the Mass, without any modifications. Be warned that very high mass values (above 4000, I'd say) will make your car drive funny - try modifying the General to be 20 times more powerful and heavier, and you'll find that the steering "wanders" and delays. Note that more Mass also makes the down force less effective; the more Mass you have, the higher the down force values have to be to maintain the same effectiveness.

Chapter 5 - Get a Grip, Man!
The Grip values dictate the peak coefficient of friction, and therefore, roughly the peak lateral acceleration we can get out of the car before it begins to skid. As with Balance, we can get traction values by a combination of tire widths (since they're easy to find) and multipliers. For our generic LMP2, the formula goes a bit like this, assuming a Frontal Weight of 46%;
Front Grip = ( (front tire width in mm * frontal weight) * 0.002) = 0.2622 (with 285 tire width)
Rear Grip = ( (rear tire width in mm * (1 - frontal weight) ) * 0.002) = 0.3078 (with 325 tire width)
Add 1 and we get 1.57 grip, good for a GT3 car at the HP/KG scaling ratio, but a bit low for a LMP2 car, honestly.
Here's some good Tech Multipliers for tires - though you should use them before adding the 1 in the total:
0.8 for economy tires (ie. Michelin Energy Saver A/S)
0.9 for all-season tires (ie. Michelin Primacy MXM4)
1.0 for sporty tires (ie. Michelin Pilot Sport PS2)
1.1 for semi-slick tires (ie. Michelin Pilot Sport Cup)
1.2 for mid-range Touring and GT competition slicks
1.3 for high-end GT cars and "small" open-wheel and prototype cars (such as the JRC F1000, the aforementioned Caterham SP300R, etc...)
1.4 for "big" open-wheel and prototype cars (LMP2, IndyCar, etc... giving our example car 1.789 grip, not so bad...)
1.5 to 1.8 for post-1985 F1 cars

I use 1/2 of the tarmac grip for all off-road values, though for tires with treads it is closer to 75%.

Chapter 6 - The Value of Ai Tsuchigami
Commonly misinterpreted as a "look ahead value", AI Value determines how the AI will "balance" the car. At a value of 5, the car behaves with only a slight over-steer in slow corners. As this value approaches zero, the car becomes more erratic in its behavior, though it takes very low values to do so. As this value increases past 5, the car becomes driven with a more under-steering, ride-on-the-brakes approach. In addition, the AI car will also run corners significantly wider as the values increase, even with high grip or down force values. Note that as grip decreases, it is not always better to decrease the AI value, likewise, for a very grip-happy car, it is not always good to just slam the value to 9 or 10 or 11 (this isn't Spinal Tap).

You can observe the differences at the extremes by editing the default General car to use the 'extreme' values of 0 and 10. Observe how an AI skill level 100 driver drives around the track, you can see very marked differences between those extremes and the default values.

Be warned that the AI isn't as good at feeling out grip as the player is, especially in situations that require the car to be slowed down to a near stop from extremely high speeds. For this reason, it is better to have a little MORE down force than is realistic than to not have enough. Did you know that even a cardboard box generates some levels of down force?

Chapter 7 - An Alternate Dimension
Have you ever noticed how the Sidamob can turn so well in one direction but not the other? The wheels can contribute to this effect.
Or why Mech-Hisui can stand even on one wheel?

If you used "realistic" X/Y/Z values for the "hit box" in the Model window of the Car Editor, Mech-Hisui would tip over and fall on her side or back all the time. Likewise, the Extreme-G bike from Week 2 of Single Exhibition Events would tip on its side if its Y-value were made higher and more "real".

As the Y-value for the hit box increases, weight transfer effects become more exaggerated, worsening handling characteristics. You can use very high values to get high grip, high power cars to do wheelies, in fact.

The head placement has a minor but definitive effect on car handling, acting as a "weight distributor".

If you want to model your car using realistic sizes, it is easiest to just use the measurements of the car in meters.

Chapter 8 - Player vs Player
We often want to race cars against each other, different ones. Gene Rally is unique compared to other arcade style racers in that handling is a far more desirable trait than power is. Calibrate the AI value to run lap times as well as possible across a wide variety of track sizes and types first, then observe the best laps of each car. If you've come close on the first try (trust me, you won't unless the cars are identical), the difference between the best and worst cars in total times should be around 3%. If not, usually it's the best handling car that comes out on top. Note however that if you give a good handling car too little power, it might not reach the speeds needed to take advantage of the better handling.

Generally, the priorities go a bit like this:
1. Grip
2. Acceleration
3. Down force/Weight ratio
4. Balance/sliding
5. Drag-limited max speed (air resistance)
6. Hard-limited max speed (set in the car physics)

Ending Thoughts
Developing car physics parameters is not an easy task, especially when you want to develop it from a purely formulaic, mathematical angle. It has taken me years to get it down perfectly, and although the Performance Index system has been lost to stupidity and the ebb and flow of time, the beautiful and divine pleasure of creating that "perfect car" has been a long pursuit of mine. Car making is a deeply sweet and sublime game, especially in Gene Rally, where the limitations leave a lot of room for interpretation and imagination.

To end this little, err, dive into my thoughts, here's a little quote from Sid Meier's Alpha Centauri:
"The lesson is simple: you have received the information, now act on it. Take control of the input and you shall become master of the output."
-- Chairman Sheng-Ji Yang

Reference:
http://www.mulsannescorner.com/aerodata ... cLMP2.html
http://www.mulsannescorner.com/LolaB0540.html
http://books.google.com/books/about/Ins ... nXCAmIKwEC

_________________
"In my world, we don't have enemies. Only rivals.
In my world, our dreams become REALITY."

-- World Endurance Championship 2015 Promotion


Last edited by Haruna on Tue Jan 20, 2015 7:58 am, edited 2 times in total.



Mon Jan 19, 2015 8:54 am
Profile E-mail
User avatar


Joined: Fri Nov 05, 2010 9:33 am
Posts: 432
Location: United Kingdom
Post Re: The Sweet and Sublime Game: Findings of a GR Car Master
It was your contributions that helped give this community a point of reference to stardardise our cars off, and shaped the direction of my own cars from 2010 onward. These updated formulas might finally motivate me to finish that Ferrari Testarossa I was so stuck on... might.

Oh give up the self-depreciation act already. Your output is a valid contribution in the minds of players here; no one is as meticulous about car handling as you are, let alone do they go on to document their methods for everyone else to dissect. Seriously no one here remembers (or cares about) your tween escapades from ten years ago.


Tue Jan 20, 2015 2:49 am
Profile
User avatar

GeneRally Carmaster

Joined: Tue Dec 29, 2009 3:55 am
Posts: 1121
Post Re: The Sweet and Sublime Game: Findings of a GR Car Master
I've made a small update to Chapter 3 thanks to Krisu giving me the formula for a GR car's theoretical maximum speed. Practical top speeds, however, may be much lower than advertised, especially on low power/weight ratio vehicles (ie. GT3s, etc).

_________________
"In my world, we don't have enemies. Only rivals.
In my world, our dreams become REALITY."

-- World Endurance Championship 2015 Promotion


Tue Jan 20, 2015 8:02 am
Profile E-mail
User avatar


Joined: Fri Jan 01, 2010 4:02 pm
Posts: 501
Post Re: The Sweet and Sublime Game: Findings of a GR Car Master
Do you know anything about an explanation of this formula?

edit: to avoid misunderstanding, I mean mathematical explanation, I do know what it means already, but I'd like to know where did it come from ;).


Tue Jan 20, 2015 12:20 pm
Profile E-mail
User avatar

GeneRally Carmaster

Joined: Tue Dec 29, 2009 3:55 am
Posts: 1121
Post Re: The Sweet and Sublime Game: Findings of a GR Car Master
Lorenzo wrote:
Do you know anything about an explanation of this formula?

edit: to avoid misunderstanding, I mean mathematical explanation, I do know what it means already, but I'd like to know where did it come from ;).


Given an infinitely long straight, we should be able to eventually reach the target speed in the formula. Although Krisu and I have only really tested it on post-1985 F1, some Prototypes, and a few of the original GeneRally cars (particularly the Formula), we found this as a result of a lot of experimentation and "curve of best fit" (well, close enough). For my most common car type, however (GT and Touring cars), they usually fall quite a bit short of the absolute maximum even on the Daytona that Milton Du Pont released a long time ago. You would need some modifications to the formula to find practical maximum speeds, but that's only really needed if you're developing a Performance Index system like I am/was.

_________________
"In my world, we don't have enemies. Only rivals.
In my world, our dreams become REALITY."

-- World Endurance Championship 2015 Promotion


Thu Jan 29, 2015 4:26 am
Profile E-mail
Display posts from previous:  Sort by  
Reply to topic   [ 5 posts ] 

Who is online

Users browsing this forum: No registered users and 0 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by STSoftware for PTF.