Page 1 of 1
Posted: 03 Nov 2010, 13:28
Citywalker
Jigebren, Huki, guys, you have the source code – can you look up and explain the way the car inertia in the parameters.txt works? It seems to be tied to the weight of the car... The less the weight, the less the inertia has to be to get normal handling, and vice versa. But I can’t pinpoint the exact formula to get a car to handle identically with weights e.g. 0.5 kg, 1 kg, 2 kg and 5 kg. And it’s not a simple linear function of weight either, that much I have determined...
Posted: 03 Nov 2010, 22:51
Huki
Well, for a start i can say this: they are using
this method to calculate the elements of an "inertia matrix" based on the mass and a vector (passing through center of mass?).
Then they add the intertia matrix in the parameter.txt and the newly calculated inertia matrix together., which is probably a very generalized form of
Parallel Axis Theorem
Posted: 04 Nov 2010, 08:35
Citywalker
Oh harsh! High mathematics. I suspected as much when I saw an actual quaternion used in the oxygendoc source, but this... I didn’t pay _that_ much attention in university
I guess I’ll keep my empirical formula then.
On another note: what about the long-unknown car AI values in parameters.txt? What is what and how to change? (the parameters 6.0 doc needs to be updated, I think...)
Posted: 06 Nov 2010, 23:40
Huki
cw wrote:On another note: what about the long-unknown car AI values in parameters.txt? What is what and how to change? (the parameters 6.0 doc needs to be updated, I think...)
I haven't really looked into it yet (gari biasillo's code is too cryptical with no helpful comments
)
But GB had written 3 chapters in a AI related book, one of them explaining understeer and oversteer (somewhat shortly). You can easily find the book online in pdf - AI Game Programming Wisdom (2002). It shuld be section 9 in the book..
Posted: 07 Nov 2010, 08:41
Citywalker
Okay, thanks, I will look into it.
Posted: 26 Nov 2010, 18:36
Citywalker
Yup, that was helpful
(and provided an unexpected revelation :/ ) But it really was only a short explanation. Could you also give me the cryptical code? Maybe I can understand more then.
Posted: 26 Nov 2010, 21:43
Huki
Well, I quickly looked into those parts, and they don't seem so cryptical now. But I can't clearly explain everything right now. After the next official release we should find some time to finish the parameters doc.
I can quickly say that all the understeer/oversteer values in parameters.txt are just what they mean in english.
For example, UnderThresh is "Understeer Threshold" - how much "out of control" the AI car should go before re-volt tries to correct the steering.
UnderRange is how much the steering is reduced or corrected at once (the steering is divided by this value each time). A bigger rangle value probably corrects the car faster.
UnderMax is the maximum "out of control" the car can get. If the car gets more out of control than Max value, it is corrected and brought back to "Max" steering at one go (not gradually using Range value).
That's all I can say for now, GB's chapters explains most of other things. Just play around the values and hope I'm right.
PS: I think this topic should be moved to "TTT Master Class" section. EDIT: That was fast.. thanks.
Posted: 27 Nov 2010, 11:51
Citywalker
Okay, thanks for the Max parameter explanation. So the only ones that are unexplained now are UnderFront/Rear and OverAccThresh/Range. Anyway, I would still like to see the source part for this. PM me with it?
[Edit] Thanks for the PM.