Game Development Stack Exchange is a question and answer site for professional and independent game developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I lately integrated Bullet Physics into my little game engine, but for now I only use basic shapes as spheres or boxes for collision checks. For more realistic physics I need collision meshes for all models in the scene. They should be much simpler and in lower detail than the actual model for drawing to speed up computations.

Since I want adding new asserts to the engine as easy as possible, I am looking for a way to automatically generate collision meshes. I could just use the actual mesh loaded from file and that would result in very realistic physics calculations but that won't be fast enough. Therefore, how can I generate low detail collision meshes from a given set of vertices?

This task doesn't seem trivial since there many different cases to handle. For example a model of a house with furniture must retain details of floor and door frames while ornaments should be removed. I believe there already was research on this topic, but I couldn't find anything useful yet.

share|improve this question
Convex hulls are a nice medium between boxes/spheres and the full mesh. – ccxvii Apr 15 '13 at 11:07
I cannot walk into a convex room. – danijar Apr 15 '13 at 12:17
@danijar but you can create it from convex hulls. Each wall would be a convex hull for example. – Dudeson Apr 15 at 22:17
up vote 6 down vote accepted

You can first decimate the mesh. Then use the decimated mesh to create a triangle mesh shape to create a collision mesh for that model.

You will probably run into issues with automatically generating meshes in this way. Since your physics object will not exactly match your world object. The decimating can have unexpected results for changing the shapes of meshes, particularly cutting off corners.

In my game, I define simple shapes in my modeling software (Blender), I name them something special like "PHYSICS_SHAPE_1", then my model importer looks for meshes with the name "PHYSICS_SHAPE*" and reads those to create physics objects. This is a little more work, but it ensures that my collision meshes are accurate and fits well with a data driven approach.

share|improve this answer
Thanks, especially your other answer you linked is very helpful. These algorithms are exactly what I was looking for. If someone minds, I will use the HACD algorithm that fits good into Bullet Physics. – danijar Apr 15 '13 at 15:35

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.