We have recently added 3D vehicle physics to our DigitalRune Physics library. In this post we will explain how the car physics works, so that you can either create your own car physics, or you can understand and tune the car physics that comes with our libraries.
Let’s have a look at what we want to achieve. Following Vehicle Sample is an XNA example project that is included in the DigitalRune Physics Bundle:
In the last post we computed convex hulls for the XNA dude. Convex hulls are useful approximations for collision detection because many algorithms like GJK, EPA (Expanding Polytope Algorithm) or MPR (Minkowski Portal Refinement) can handle arbitrary convex objects. We also used simplified convex hulls. In this post we describe how we have implemented convex hull generation, convex hull simplification and skin width.
Actually, there are many convex hull algorithms. Here is a java applet showing different algorithms: http://www.cse.unsw.edu.au/~lambert/java/3d/hull.html
We started with incremental construction as described in this book:
DigitalRune Geometry supports automatic generation of bounding shapes and convex hulls. Using simple bounding shapes or convex hulls is more efficient than using arbitrary triangle meshes in game physics. In this post we will investigate different kinds of bounding shapes.
Let's look at a practical example. Here is the Dude from the XNA Skinned Model Example:
The model has 13132 vertices and the skeleton has 60 bones.
Here is the same model where a bounding sphere is computed for the vertices of each bone.
A collection of the most useful blog articles can be found here:
(on Documentation page)
DigitalRune is a trademark of Garstenauer Information Technology OG.
Garstenauer Information Technology OG
Weingartenstrasse 35, 4452 Ternberg