A01011010 / vdrift-ogre

Automatically exported from code.google.com/p/vdrift-ogre
0 stars 0 forks source link

Improve car simulation #183

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
After visiting my friend I have crystallized what has to be done to make the 
simulation proper:

1. Center Of Mass problem - Make it realistic, so the car flips to roof above 
80 degrees. Currently com is very low (car lands back on wheels nearly always). 
Making it higher makes cars flip over very soon even at low velocity.

1a. Test at which car velocity when suddenly turning car will flip it over. 
Real is about 180 kmh on gravel, 80 kmh on dry asphalt.

1b. Also move com a bit to front wheels (or rear (360) - where car engine is) 
so its easy to oversteer.

1c. Test max terrain angle to which car can drive, currently (see S13-Hole) you 
can drive uphill even 70 deg slopes! Real is about 40 deg asphalt (30 deg 
gravel?). This is also an effect of 1. - too lower com.
But this isn't easy, it could make lots of tracks suddenly completely 
undrivable, or requiring use of boost to drive uphill.

Original issue reported on code.google.com by Cry...@gmail.com on 6 Nov 2012 at 7:27

GoogleCodeExporter commented 9 years ago
2. Fix the very high power/torque engines. Currently you can accelerate 
0-100kmh in like 3sec (ES,S1,3S,). XM,360 even less.

2a. Only note, luckily we dont have a driver in car, and we can't. Using Accel 
graph shows car acceleration going over 6G in looped pipes. Real men could 
stand 4 G.

Original comment by Cry...@gmail.com on 6 Nov 2012 at 7:28

GoogleCodeExporter commented 9 years ago
3. More Grip (tire friction) both on gravel and asphalt. Cars are sliding very 
easily. There should be some good grip at start, only low when wheel lost 
traction. Also make more contrast and make it more noticable when going between 
wheel grip and sliding. This is probably most difficult (like everything here), 
need to adjust tire params (those 30 values from Pacejka's Magic Formula. Tires 
edit is done in one graphs mode).

4. More Slide Control (of car angle with wheels steering). Conservation of 
Angular Momentum (rotating wheels affect car rotation) - check if it works, 
adjust. Also remove/lower angular velocity damping, adjust tires (difficult).

Best reference to this (3,4) is playing Richard Burns Rally (if you can :]).

Original comment by Cry...@gmail.com on 6 Nov 2012 at 7:41

GoogleCodeExporter commented 9 years ago
5. Wheel rolling resistance and air drag. Currently if you drive eg. 50 kmh and 
switch to N gear you dont slow down much (or at all). This is related with 2.

Original comment by Cry...@gmail.com on 7 Nov 2012 at 9:06

GoogleCodeExporter commented 9 years ago
6. Downforce. Its in [ wing-* ] lift-coefficient. This needs to be more so the 
car sticks on the road more with high velocity. Currently it's too easy to make 
it spin at high speed.

Original comment by Cry...@gmail.com on 8 Nov 2012 at 10:45

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
Still some tweaking to do but:
Done 1. 2. 5. 6.
Most cars have now fixed com, torque curves, gears, aerodynamics 
(downforce,drag), collision.
Done 3. 4.
Made new tires, but I want to also connect road materials/terrain layers with 
sim surface params. Also make some presets to facilitate updating all tracks 
surfaces and picking them for new ones. Will make different tire setups for 
sand, jungle, road mud, snow etc.

Original comment by Cry...@gmail.com on 23 Nov 2012 at 4:34

GoogleCodeExporter commented 9 years ago
7. Having car body friction eg. 0.1 on bottom, but 0.4 everywhere else (maybe 
0.7 on top?) would be best, since bottom would slide when landing after a jump 
(and not flip the car over), road wall collision on bridges should be probably 
slippy (to be tolerant), and when already flipping over or hiting a tree there 
should be much more friction (so it turns more, it's realistic).
Need to find where in bullet can one do such things, either some custom 
material friction callback, or just by making more collision shapes, each with 
different friction.

Original comment by Cry...@gmail.com on 25 Nov 2012 at 8:05

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
8. Wheel inertia was 10, while real values are less than 1. Engine inertia and 
friction, adjust.
With wheel inertia 1 more iterations will be used (eg. 100 not 30) but this 
makes whole simulation nicer, better quality.
Current gravel tires have too much grip in longit. dir.
Wheels on gravel should lock with regular braking like in RBR.

Original comment by Cry...@gmail.com on 17 Dec 2012 at 10:18

GoogleCodeExporter commented 9 years ago
9. Try to make a suspension that is soft at start and very stiff at end. Soft 
is good to drive on bumpy terrain, stiff is very needed in pipes and in landing 
from jumps (both have high axis z G's). Use spring-factor-1,.. and 
damper-factor-1,..

Original comment by Cry...@gmail.com on 19 Dec 2012 at 9:12

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
------ Summary ------
1. Done. (but com is only proper for normal sim mode, is easier when it's lower 
in easy mode)
1a. Didn't do it, car won't flip because of com and tires. Could be too 
difficult if it would.
1b. Done. Didn't do much though.
1c. Suprisingly didn't change after 1. But isn't needed, would be too difficult.
2. Done. Could be better. For torque curves are even real dyno graphs on web, 
but too time consuming. Only issue left is that torque (or the computed power) 
in simulation doesn't match real life data. Especially for bigger torques. Easy 
sim is quite good, but in normal sim car has eg. 400 bhp and gives a 0..200 kmh 
time like for a 800 bhp car. Will put some scaling factor so the car stats in 
gui won't look so bad.
3. Done. Easy mode has plenty of grip, normal mode maybe even still too much, 
but on wet and winter wheel slip is present.
4. Done. Could improve. This is controlled by the peak value and how it looks 
(range,decay,..) for longitunal tire force. Conservation is not the case here, 
it's all because of tires.
5. Done. This matters for max car vel and above say 160 kmh. Still, higher 
rolling resistance doesn't make car slow down below 50kmh, it is done by 
surface damping (linear with car vel). I'm not digging into it.
6. Done. Didn't check with real values though. Did improve jumping/flying. Also 
enabled speed sensitive steering on gravel, this was also crucial.
7. Didn't try yet. But with 9 jumping is very good now.
8. Done. Normal mode has values around 1. Easy mode still has 10, so its easier 
to drive, also with too high tire grip they won't slip.
9. Done. Is now much better. Car doesn't reach it's bottom that easily (when 
landing or driving in pipes). Made also separate files for those factors .susp 
so it isn't copied everywhere just in 1 file.

Original comment by Cry...@gmail.com on 10 Jan 2013 at 2:15

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
There was still one thing wrong.
10. Car inertial was too big. That's why it felt like moving a big rock, not a 
car.
Now steering feels quicker and crashes happen faster.

Original comment by Cry...@gmail.com on 1 Jun 2013 at 2:24