How to do HACD

Post Reply
Alireza
Posts: 2
Joined: Thu Jan 30, 2020 2:33 pm

How to do HACD

Post by Alireza »

I would like to perform a convex decomposition of some mesh files that are in STL format and came across a number of methods online to do this such as https://github.com/kmammou/v-hacd.


In this github issue I also read that it is possible to do this without using Blender: https://github.com/bulletphysics/bullet3/issues/1507

However I was not sure how I can use Bullet to do so, what I need to install and what command I should use. I appreciate your suggestions for how I can do this in a not very complected way.

Thanks.
User avatar
drleviathan
Posts: 849
Joined: Tue Sep 30, 2014 6:03 pm
Location: San Francisco

Re: How to do HACD

Post by drleviathan »

Do you want to compute convex decompositions at runtime? Or do you just need to be able to convert a 3D model once before loading some game/application? (e.g. as part of some offline content pipeline)

If you want to compute convex decomposition at runtime you should know the V-HACD algorithm can take anywhere from 10's of msec to 10's of seconds to process a convex model, depending on the complexity of the input and the resolution configuration for your output. Supposedly it is possible to perform the algorithm on the GPU for something like 200x speedup, but of course you would need a GPU and would have to hop the extra hurdles to set it up.

You should know: the V-HACD algorithm can fail for some models and some configuration inputs, and understanding the dials of the algorithm's configuration is not trivial.

If you just need a standalone util that can take a 3D model and output its convex decomposition as another 3D model file... I know of an open-source example implementation in the "High Fidelity" codebase. You can find it at its most current home here: https://github.com/yozlet/interface/tre ... vhacd-util . Perhaps you can figure out how to build that, else examine the code as a guide to how to implement your own tool.
Post Reply