SarahWeiii / CoACD

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

Feature request: internal overlap #44

Open yuvaltassa opened 7 months ago

yuvaltassa commented 7 months ago

Hi CoACD,

I'd like to describe two common issues that we encounter with collisions between adjacent sub-meshes, and propose two related feature that will address one or both of them. I don't think either of the issues is in any way MuJoCo-specific.

Issues:

  1. Penetration of thin objects between two adjacent sub-meshes: When a thin object penetrates between two adjacent meshes, the contact forces push sideways rather than out, leading to jamming of the thin object between the sub-meshes.
  2. Catching on corners: When a pointy (not necessarily thin) object slides along the side of a decomposed mesh, the corner can catch on the corner of one of the decomposed meshes.

Proposed solutions:

  1. "Inflate" all sub-meshes in the direction normal to internal mesh-adjacent surfaces by an overlap parameter $d$, with units of length.
  2. Make the added (inflated) part smooth, by adding several faces that attempt to approximate a smooth bevel at the corners. This requires specifying the smoothing radius $r$ and possibly also the number of added vertices/faces that participate in the smooth corner.

I'm attaching an image below with a sketch of what we are imagining. Note that for us issue 1 is much more significant than issue 2, and the proposed solution 3 is both easier to implement and does not introduce new faces/vertices. However note that solution 4 is more general, since it solves both issues 1 and 2 (but cannot be said to be strictly better, due to the increase in the number of faces).

We'd love to hear your opinion on these proposed features.

IMG_5527

cc @quagla, @btaba, @erez-tom.

SarahWeiii commented 4 months ago

Hi the overlap extrude is added. You can enable it by adding -ex flag, and designate the margin by -em. Now I haven't added the smoothing radius. Hope the current solution works.

yuvaltassa commented 4 months ago

AMAZING!

We will test and give feedback ASAP