miércoles, 19 de agosto de 2009

Convex decomposition

I have recently wrap the extraordinary convex decomposition library of John Ratcliff. I did it with the 2007 version. I have added some functions (from John's as well) to find the best fitting capsules, spheres and oriented boxes of convex hulls.

The 2007 version has some bugs that I am currently fixing but it works fine. If you want a more robust version you can get that one of 2004 which is the one that the guys from Bullet have wrapped. I wrapped it as well and it works just perfect. The disadvantage is that it does not include best fitting features and that the splitting plane of concave objects is not always the best. Besides, it is implemented using floats instead of doubles.

John did a great job. At the beginning I tried to implement the convex decomposition myself, but I had some troubles trying to find the best fitting plane. It worked in some cases but in others it failed terrible. So, I decided to wrap John's convex library. It is a bit slower (since it computes the decomposition in a "brute force manner" but it is worthy to wait 30 seconds for decomposing a concave object of 700 triangles into a set of convex hulls.

I will use this together with my GJK implementation :)

Click here for the link of John's convex decomposition library. If you use it, feel free to donate something to John's son association.

4 comentarios:

  1. Are you going to open source your wrapper for John's library?

  2. Hey Adrian,

    How is it in Australia ? Well, I will ask my boss if I can open source the wrapper.

    In the meantime, you can take the one from Bullet. Although it has the version 2004 it works pretty fine and is totally robust. The only disadvantage is that it does not use Obb's to compute splitting planes which gives as a result not the best convex hulls.

    Version 2007 is buggy. I am just finishing debuging it. I will send an email to John so he can integrate my fixes to the library and make profit everybody of his work.

  3. Thanks, I was planning on revising the library relatively soon. What bugs did you find?

  4. Hey, I just recently revised the library. You might want to take a look.



Put a message :)