Hi to all beloved co-posters !
Bmarci, thanks a lot for saying what i was going to say ^^
More precisely, i would say, yes, this is going to fail, as almost any other car topic on the forum. Of course there are a lot of errors in my (very) simple explanation. The whole purpose was to get people to say "hey this is not the way you should do that !", or even more valuable "hey there is a faster/easier way to do that !". So if i had all knowledge already, i would finish my game and make a real tutorial instead of a "general car ways of doing things" topic
My goal is ultimately to explain everything we learned on the first topic, and maybe if i estime myself enough give some advices (like do not believe marcos tutorial will give you a nice car ^^). I have a LOT of litterature on the subject i will post, etc. But right now, i feel like trying to make a "reference" first post is kind of a waste of time as there is too much things to discuss, and making it look "good" won't make it good for real. The idea is to get people to understand this is an open debate and ideas/tips sharing topics, which i hope will let us gather enough intel to be able to provide a few good advices on the first post.
As i see it, all kinds of handy formulas, links, tips, and even different "ways" of doing things will be explained in the first post. Bu right now, this thread is highly unrecommandable, especially for newcomers, there are better places to start, like marcos monster, phors or the tutorial on gamedev, which are all good reads.
And, finally yes, i think all noobies car devs are going the same way those times, and maybe a fresher starting point would be necessary.
Beside the fact that marco monster is 10 years old, it cover everything so well, its just the best way to start in my opinion.
Oh yeah, +1k to that. And maybe even before that getting familiar with driver knowledge before going into physics. The value of the first post when completed would not be to do what marcos did, but instead, starting where it stopped. So let's say you have implemented everything he said, and even a few more things, but you are very disappointed because your car is not feeling right. I already learned very valuable things (like role of differentials and so), that i think are worth explaining in the first post, in time, when i'll have implemented and understood them myself. And finally having a few videos demos, data sets and reference values would be a great contributions for people coming from marcos tutorial or trying to implement it.
Of course, its always interesting to see some reading on car physics, a subject that passionate all of us, but the fact of melting all kind of question and answer together make it really confusing and not that enjoyable to read IMO.
The fact is, we (i) have so many questions, i feel like creating topics for all of them would result in terrible forum flooding. So the idea is to ask things as they are coming, and when i figure out enough of them i'll summarize the first post well
And then it would be a great time for constructive feedback, as we are thinking towards future readers and explaining things correctly.
That being said, let's go back to main topic : car
EDIT : Wow i just realized there are very interesting things being said in the previous car topics ! Maybe some of my questions have been answered there. If that is don't bother linking the other topics, i'm reading them right now
A few words on the differential topic i started : i was just talking of a flat multiplier in my sim actually : engineTorque * gearRatio * diff * throttleInput. Very dumb thing, compared to how advanced a real differential is. I personnaly do not use an axle, instead i add torque to the drive wheels directly, and so, they get individually slowed/accelerated in a corner. If cornering without throttle, the inner wheels is going slower than outer wheel (normal), but if cornering with throttle, that's the opposite. Actually wihtout differential, the inner wheel has to slide on itself, which works but is far from good. And must have an influence on cornering.
Anyway i just deactivated slip ratios, engine torque and all things related to concentrate on drifting and cornering behaviour. No traction circle either for now. So i'm not on power drifting, but more on braking->more weight to front->oversteer drifts.
I think i'll code real suspesions/springs and enhance my mastery of steering_input_control / general lateral forces manipulations before i get more into combined lateral and longitudinal grips. Step by step !
the easiest and more common way of getting load is to treat the tyre as a spring and get the load from that spring compression... no calculation needed.
That's right, you don't need to calculate this. In my case (Unity 3D) I have rigid body physics that just work. So my vehicle is constructed simply as a rigid body with 4 contact points and a simple suspension on each one (spring + damper). If I put this "vehicle" over a terrain it will behave as if it is sliding on ice (no friction) but suspension, weight transfer and weight load at each contact point will just work.
No calculations... does not work for me, sorry ^^ You mean the physical engine does it for you ? You mean, the spring/wheel will compress because of car accel, and the final force on each tyre will be way more reasonnable than in a vehicle without suspension ? I still have a doubt if you're suggesting NOT even consider car acceleration, or just don't use it AS IS because it is very stupid (which is obvious ! As you pointed it, even a tire is a kind of suspension on itself).
If that is what you mean, then we agree ! Either way, please explain further, the "no calculation" thing.
As all front/lateral forces get eventually multiplied by the wheel load, we can say getting the wheel load right is maybe as much or even more important than getting the initial values right. I had much trouble with that, and honestly for this particular subject i kind of miss examples. When i look at a big pickup truck i can see the springs getting highly compressed. Marcos state something like "xxx acceleration > formula > xxx Fz on back wheels, so you accelerate faster". The fact he didn't talked about car suspesions made me think :
- It is not a very important part of the simulation (VERY wrong i think, now)
- Suspension or no, i CAN get the force he is talking about, eventually, and maybe suspensions will just make the weight shift process a little slower (i guess it is really wrong too).
Here is a problem i still have : if weight transfer is more than a FEW percents, car can spin very easily or behave odd. When i see the raw acceleration weight transfer outputs, i find it hard to beleive spring/dampers can convert a totally incontrolable car in something smooth. So i looked elsewhere.... For a too long time. I mean, will i go from 15% weight transfer to 1% ? Or more from 15% to 12% ?
What is a typical cornering car weight transfer values ? On something like a lambo, and a drift car (to have extremes), if i decelerate from 200Km/H to 150Km/H, what can be the front/rear weight repartition at corner entry ? middle ? end ? Is it ok to have almost all cars to spin if the transfered weight ratio from back to front is more than 10% during serious cornering ? (i know you miss the steering and lateral tyres forces intel, but i'm just asking to have an idea of the effect of suspensions).
Actually i get pretty good results with 1% ~ 5% maximum weight transfer amount. It all depends of steering and lateral forces, wich varies from one car to an other.
3. Around 80/100 km/h, understeer with throttle, and oversteer without it.
Could be CG too high, too much "coast" torque.. wrong or missing implementation of a proper differential
I generally have this behaviour too. Slip angle is initially higher at front, it makes the car oversteer (with or without weight transfer). If accelerating, the cornering radius is getting higher very fast (understeering). Even more noticeable if you have an arcade front velocity directly coming from throttle instead of SR/torque. I think (hope) Kunos is right and a differential would help to create a front acceleration vector which has a small angle instead of 0. Thus helping in cornering. I was not confident trying to implement this for now, but i'm looking toward formulas and tips helping to create a diff. Unless the formulas are pure magic, i guess it is very hard to do this quickly.
Also it would be nice to see some real values, not curves, just sample values eg: (SR=0.01, Fz=3500N, Fx=???) and the same for Fy, just to see if we even have reasonable results.
Is there any "healthy" ratio between Fx and Fy (at peak). I just checked, and my FxMax is greater than FyMax.
Are these values reasonable for a 255/50ZR16 tyre:
Fx: Load=3KN, PeakSR=0.11, MaxFx=3240N, InputSR=0.03, Fx=2211N
Fy: Load=3KN, PeakSA=8.6°, MaxFy=2834N, InputSA=4°. Fy=2519N
+1. We need some real life values with a known-setup car to help us. Do you have the name of a book wich specifically has real examples ? Physics of racing maybe ?
A few questions :
- What is a reasonably good lateral deceleration a tire can produce ? I mean, if i am at 50 meters/second front and want to turn right at 90° without making a huge drift, how much lateral G are realistic ? Or in other words what can be the cornering radius ? Reason i am asking this : my game is currently top down, and to see curves, they have to fit on the screen. So, i know my driving environment is far from realistic, and thus i need VERY good tires to turn. So let's say you kick a car lateraly so the Fy speed get instantaneously to 50 meters/s. What would be a reasonable stopping time ? 1s ? 5s ? I have done some research and it seems, F1 car do something like 5G of lateral acceleration, while a regular car is closer to 1G. But no one is trying to take a 90° corner with a regular car at 150 Km/H. I guess if it a crossover it is not even doable even if drifting ?
If i have a 1500Kg car, with inertia of 3000 and a pacejka curve like this : peak@4° = 1.2, value@90°=1.0 my car handling is credible, but totally catastrophic, i cannot take any decent corner above 50KmH. I have to go to 20 or more in the 90° to make the car turn ok.
- Do you see the peak of the long/lat curves as the maximum radius of the traction ellipse in that direction ?
- Is there a formula to create an ellipse knowing the X/Y radiuses ?
- If a front pacejka curve is not matching the lateral one : let's say i draw curves by hand and i am modifying them separatly as i try things. Is there a point at wich it is stupid to hope anything because those are so closely related (with SR/SA, traction circles) that everything has to be in perfect harmony (ie: lateral forces physically accurate regarding to front ones). That means i cannot let the player upgrade its front grip without having lateral grip to increase as well ?
In most car simulations, when the car starts to slide, it acts as it keeps sliding, like if a slide situation was more able to create a slide situation in the next tick. Or like if when sliding has started, the friction forces are modified. That make sense if you consider static/dynamic friction, but afaik, a tire cannot bo seen from this simple perspective. If i am cornering at 150Km/H, i guess everything is sliding here and there a little, and there no such thing as : "static friction, everything is alright"--> "sliding, so i have lost traction and cannot do much about it". But i don't know, we always read the patch is kind of "not moving" at a given time, so maybe even when cornering at high speed, i should consider the patch as static ? And then i would need to find out if it is in static or dynamic friction mode ? No idea if it is a legitimate question, and even less idea on how to determine that. Funny that jujunosuke had the same hope than me on this ^^ Anyway the response of Kunos is absolutly no static friction.
And finally, last but not least, something very important to me i am still not sure :
- It is said the more acceleration, the more weight on the tire, and the more weight on the tire, the more grip. So why during intensive cornering, the outer wheels (which are the most loaded) are always the first to slide ? My guess ares :
a) It only happens when the lateral speed gets too high. So something related to static/dynamic friction like i am asking above. And lateral speed would be higher on outside side of the car ? Or even more crazy : in fact all wheels are sliding at the same time, the outside wheels are not always the first to slide in those situations.
b) Somehow the slip angles of the outside wheels are getting too high, the curve is getting down and slipping occurs ?
c) At some point, more weight means less force ??? I know the weight has diminushing returns on generated forces, it is not entirely linear. But when i looked at the values, even if not neglectible, it does not makes sense that the outer wheels slide first.
d) Only happens because of differentials + driver pushing throttle. So outside wheels are slipping, traction circle is outranged and increased weight is not important enough to counter the loss of magnitude of the "raw" lateral friction.
e) It is something else, maybe related to camber, or the fact that the car is simply not well balanced with too much weight on one side which means... too strong lateral forces ?
Edited by PochyPoch, 03 October 2012 - 08:28 PM.