SarahWeiii / CoACD

[SIGGRAPH2022] Approximate Convex Decomposition for 3D Meshes with Collision-Aware Concavity and Tree Search
https://colin97.github.io/CoACD/
MIT License
405 stars 52 forks source link

Tetrahedral decomposition? #42

Open yuvaltassa opened 2 months ago

yuvaltassa commented 2 months ago

Have you considered a version of CoACD that uses pure tetrahedral decomposition? Tets are, after all, the quintessential convex mesh 🙂.

Tetrahedral meshes have a strong Finite Element theory supporting them, and are otherwise useful in many circumstances (e.g. very cheap, non-iterative colliders). TetWild and fTetWild are powerful, but they are not designed to give the user a precise, variable-resolution "coarsening" knob, that will dramatically reduce the number of tets at the cost of error w.r.t the surface mesh, which is what CoACD is so good at.

We'd love to hear your thoughts on this.

SarahWeiii commented 2 months ago

I think TetWild and fTetWild have some parameters to control the precision of the results, such as control_energy and the coarsen option. And in my understanding, tetrahedral meshes are typically used in soft body simulations, while ACD is usually for rigid body simulations. I am curious about which scenarios would require users to generate a group of tetrahedral parts for an object.

yuvaltassa commented 2 months ago

It is true that (general) convex meshes are good for rigid body simulation, but that's on CPU, where branchy-loopy algorithms are welcome. However, on accelerator architectures like GPUs, the tradeoffs are very different. A relatively large number of parallel, fixed-cost tet-tet collisions can be significantly faster, as this is exactly what those architectures are designed for.

Last we checked (f)tetWild was not good at low-resolution remeshing. We'll check again and report back, maybe something has changed.

yuvaltassa commented 2 months ago

Update: We checked. There is no way to convince (f)TetWild to generate coarse tetrahedral meshes. The only viable route is to decimate the surface mesh first, but of course in this case the remeshing algorithm doesn't really have all the information required to create the best possible coarse decomposition.