|Hosting by Solid Eight Studios,PhotoTangler Collage Maker|
Putting A Car On The Ground
Question submitted by (08 February 2000)
|Return to The Archives|
Ok, so we've seen it countless times; flashy racing games with cars that
have full suspension. Check out "Re-Volt" for the Dreamcast for example. If
you put one wheel off a ledge, the car tilts over until the underside
grounds on the floor. If you go too far then the whole car rolls over. At
all times during this, the suspension of the car appears to react perfectly
with the underlying geometry. "Grand Prix Legends" and "Driver" are other
examples of excellent suspension dynamics.
So the BIG question is: Is it just faked? Or are they really doing accurately modelled physics?
Either way, how do you solve the problem of having four (springy)contact points with the ground? Three contact points will always lie on a plane, but four is arbitrary. What methods are used to solve this?
I've got some good news and some bad news. The good news is, I work at a
company (Terminal Reality) that specializes in simulation-based
entertainment and has produced a number of games of this nature. The bad
news is that I'm a 3D guy, not a physics guy. I might still be able to
First and foremost, these physics are not faked. In most cases, they use high-end physics modeling code. I know that our flight models were written by an aeronautical engineer that we have on staff.
For collisions with the ground, many simulations use something called "scrape points". Scrape points are points that are hand-chosen (usually in the game's editor) to define the surface of the vehicle in as few points as possible. We use these instead of the vertices to save processing time. This reduces the process of object/ground collisions to a series of point/plane collisions.
Most games allow the developers to define each characteristic of each vehicle. You'll find that they can describe stuff like the suspension, vehicle weight, tire pressure, distance between (and the length of) each axle, the power of the motor (including horsepower and torque), gear ratios, etc.
Here's a simple example of the extents that these simulations tend to go:
Have you ever noticed when a rear-wheel-drive car take off fast from a dead stop, the rear end dips down? This is the effect that torque has on the rear suspension during a high-torque takeoff. The softer the suspension, or the more torque produced by the engine (noting that torque is a function of horsepower and RPM) the greater the effect. If the car is front-wheel drive, the front-end will raise up (this is the same effect, only in reverse.) Any racing game with a decent simulation will model this. You can problaby see it in any of the examples you gave.
I know I'm not giving you much help here, but I can say that if you want to get into the physics of simulation seriously, it'll take a lot more than just checking out the latest algorithms and coding it. There's a lot of theory and math in this topic. But if you're seriously interested in this topic, have Psykic relay your email to me and I'll track down our resident sim guy for some advice on getting started.
Response provided by Paul Nettle
This article was originally an entry in flipCode's Fountain of Knowledge, an open Question and Answer column that no longer exists.