Jump to content

Singularities, Divergence and Lagrange multipliers (or Maths in Simulations)


Recommended Posts

Posted

 

While very out of date and not specific to Flight sims at all, this old Microsoft Channel 9 interview may be of interest to some

 

Cheers Dakpilot

  • Upvote 2
Posted (edited)

Fascinating stuff Dakpilot. Thanks for posting. I used to drive Grand Prix Legends a lot and these days I drive iRacing. It was interesting to hear about all the problems involved in making those sims believable.

Edited by JimTM
Posted

Nice video, thanks. Back in the previous century, when I was still a student, I worked on a go-kart simulator as a hobby project. It started off as a simple spring simulator. Inspired by this article, I added a simple engine and tyre model, built a body with masses connected by springs, a crude 3d engine, and before long I had this: front1.jpg

 

Going from flat shading to textures:

 

side2.jpg

 

Someone with better modelling skills took an interest in my project, and it became this:

snap3.jpg

 

I even added weather:

 

wet.jpg

 

The game had its track editor:

 

snap-tracked1.jpg

 

It also had a replay system:

 

 

Those were good times. As a side project, I also reverse-engineered the communication protocol between my force-feedback wheel and the Windows driver to develop a Linux driver.

 

On the physics note, the early version with springs and masses had the best behavior. It was simple to implement, and to my surprise it simulated rotational aspects even though I had not implemented moments (except for the tyres). By that I mean you could send the kart tumbling if you turned hard with the tyres set with a high stickiness factor. It was ver stable, the kart did not fall through the ground, and it very seldom went flying into orbit when colliding hard. The problem is that I had to run the physics at 1000 FPS, which on my pentium III meant I could only simulate about 5 vehicles in real time.

 

I tried to develop an articulated rigid body physics system, and although I had some success (it was stable at 200FPS), I was never really happy with it. Seeing how CPUs evolved, the initial physics engine would probably be working well today. Which seems to be the conclusion the guy being interviewed reached: prefer simple power-hungry physics to more complex power-saving systems. The complex power-saving systems still can't handle contact and collisions very well anyway.

 

A note on the Pacejka formula: it was (and apparently still is) the favorite subject of discussion of racing engine programmers. I never cared much for it. For a game, using a piece-wise linear function works just as well as Pacejka's model which is rather complex, and picking the values of all the coefficients it involves is very much a black art.

  • Upvote 3

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
×
×
  • Create New...