HACD : Hierarchical Approximate Convex Decomposition by Khaled Mamou
Many people come to this weblog because they are searching on terms for 'Convex Decomposition'. This blog post is to announce that there is a much, much, better open source implementation than the one I did. I suppose I can take some tiny credit as my work appears to have inspired the authors of the new algorithm but that's not really saying much. All credit where credit is due and the open source implementation released by Khaled Mamou is vastly superior to the brute force approach that mine took. His is much more elegant and also solves a lot of extremely hard problems; such as objects with holes in them (something my algorithm could not deal with). His also does not suffer with the problem mine had with excessive recursion depths producing hollow interiors.
You can find the paper for this algorithm at this location:
ftp://ftp.elet.polimi.it/users/Stefano.Tubaro/ICIP_USB_Proceedings_v2/pdfs/0003501.pdf
You can download the source to HACD from this location on SourceForge
http://sourceforge.net/projects/hacd/
With this announcement I will no longer be supporting my legacy ConvexDecomposition code in any way. I am switching to using HADC in all of my projects. I recommend you do the same.
Congratulations to Khaled and Faouzi who have done a fantastic job on an important problem.
One thing I will volunteer to the community is that sometime soon, I will create an open source tool using HACD that will auto-generate skeletal deformed meshes.
If you simply look at these various screenshots you will notice that the convex decomposition naturally produces a logical skeleton for an arbitrary piece of geometry. Obviously, that skeleton isn't perfect compared to what an artist would create but it is certainly a useful approximate skeleton.
From previous work I have done on the 'create dynamics' project, I know that you can not only synthesize a skeleton but you can also auto-generate skinned bone weightings. If you then create physical collision shapes which are constrained at these joint locations you can get an extremely convincing looking softbody object; with accurate collisions, in a very CPU cheap fashion.























6 Comments:
At 1:53 PM,
Bryce said…
Thanks for posting this. I took a crack at this problem myself when I was making my modeling and skinning tools and didn't get too far because of the many obvious difficulties. Hopefully this will be in a form that's not too hard to integrate.
At 3:15 PM,
John said…
The API is very easy to use. The implementation uses the STL. I'm going to have to refactor the code so it doesn't use STL on my end.
I've been experimenting with it and I'm getting great results.
John
At 8:06 PM,
Erwin Coumans said…
I've been mailing with Khaled Mamou for a little while asking him to make his work available, and I'm very happy with the results.
I'm also removing the STL for the project when integrating it in the open source Bullet physics engine.
John, while you are at it, you might also want to try to replace StanHull with the new convex hull generation in Bullet (both 3D and 2D), see http://code.google.com/p/bullet/source/browse/trunk/src/LinearMath/btConvexHullComputer.cpp
At 4:29 AM,
Khaled said…
Thanks John for this positive feedback and for making your ACD code open source. In fact, it helped me a lot understanding the problem and developing the first version of the HACD algorithm (which relied heavily on your code :) ). It was also very helpful to have an approach to compare against. Thanks again and I hope you and other people would be interested in improving the HACD library.
--Khaled
At 1:56 PM,
WolfpupL said…
This will help those that are also working on another open source project along with what Khaled has done.
At 8:05 AM,
home security systems said…
I like your blog,and also like the article,and thank you for provide me so much information :))
Post a Comment
<< Home