rec.autos.simulators

Car Physics: Rigid body

Alex Smit

Car Physics: Rigid body

by Alex Smit » Sun, 26 May 2002 08:21:42

Hi

Now that I'm happy with my sim on a flat surface, I am interested in
introducing rigid body dynamics

Firstly, what is better to implement first  a) a rigid body system to the
car can flip, roll and leave the gound and stuff (albeit still on a flat
surface), or b) some sort of non-flat world, which would involve wheel-road
polygon detection ?

Also, could anybody point me in the direction of some good sources of
information (preferably online) for the above topics??

Thanks in advance!

Alex Smith

Mike Stanle

Car Physics: Rigid body

by Mike Stanle » Mon, 27 May 2002 01:56:15

Hi Alex,

There's 2 issues here - a rigid body simulator and collision detections.
It's probably best to treat them seperately to simplify your development.
Probably the best approach would be to implement a general RB simulator
first, so that you can apply forces to a body and it will behave in the
correct way (with linear and angular velocities). This is quite easy to test
(you can just apply random forces at random points and see how it reacts)
and once implemented should be quite easy to integrate into your existing
stuff.

There's plenty of stuff online about RB dynamics, try a search with google.
You should also search for names such as David Baraff
http://www-2.cs.cmu.edu/~baraff/, Jeff lander and Chris Hecker, who have all
written numerous papers on the subject which are available online.

Once you've implemented this (say in a couple of weeks or so :O) you could
then look at collision detection to get proper reactions to your car from
the environment. Don't have any links to this, but again google will help.
Search for things like "colliision detection", "collision response",
"sphere-polygon intersection" etc. You should prbably begin with something
simple (eg a sphere around each wheel). You're collision response algorithm
will generate impulses which you can feed into your RB simulator, and your
car should bounce around quite nicely. You'll eventually want something more
complex, but your searching should lead you onto more advanced techniques.
(also I think Jeff Lander did some papers about collisions)

Happy searching,

Mike.

Ruud van Ga

Car Physics: Rigid body

by Ruud van Ga » Tue, 28 May 2002 04:12:46

On Sat, 25 May 2002 17:56:15 +0100, "Mike Stanley"

...

And if you do find a nice function that generates contact points for
an OBB vs. triangle, please let me know. ;-)

I currently use ODE which only does OBB-plane points. So once I detect
an OBB vs. triangle hit, I create a plane and let the function
generate contact points. Unfortunately, at some angles (too many) you
get contact points which are (quite a bit) outside the triangle
itself. The end effect is that too deep contact points are generated
and the car gets a serious slam.

I must still try a point-in-triangle test; which is some crossproducts
to see if the contact points are in the extruded triangle space. That
may relieve. But ofcourse, that also kills contact points, so
collision response may suffer.

Ruud van Gaal
Free car sim: http://www.racer.nl/
Pencil art  : http://www.marketgraph.nl/gallery/


rec.autos.simulators is a usenet newsgroup formed in December, 1993. As this group was always unmoderated there may be some spam or off topic articles included. Some links do point back to racesimcentral.net as we could not validate the original address. Please report any pages that you believe warrant deletion from this archive (include the link in your email). RaceSimCentral.net is in no way responsible and does not endorse any of the content herein.