V-HACD
More info
- Creator
- Khaled Mamou
- Type
- Library
- License
- BSD 3-Clause
- Source
- github.com/kmammou/v-hacd
The open-source library most game engines call when a concave 3D mesh has to become a handful of convex collision shapes.
The name stands for Volumetric Hierarchical Approximate Convex Decomposition. Khaled Mamou first wrote HACD, which worked directly on the surface mesh, and replaced it with a volumetric version: the mesh is voxelised, split recursively along planes where concavity is worst, and each piece is wrapped in a convex hull. The result is approximate on purpose — exact convex decomposition produces absurd numbers of pieces.
It ships built in or as a plugin in Bullet, Godot and plenty of other tools, and has been rewritten as a single header file. The settings trade piece count against voxel resolution and how much air you will tolerate around the model. A teapot that becomes eight convex lumps is normal; one that becomes two hundred is a mesh collider with extra steps.