Time of Impact calculation and contact points generation can either be done in one go, or completely seperate. I tried both succesfully, however I handle them seperate in my current approach. Also I don't distinguish between colliding or static contacts.Kenny Erleben wrote:
So, I guess the question here is how to combine a constraint-based simulation and a conservative advancement scheme based on TOIs. I assume that you would ignore TOIs from static constacts and only consider dynamic (colliding) contacts.
In the algebraic approach (implementation of Redon's paper) based on relative screwing motion the time of impact is calculated for all feature pairs. This automatically gives all contact point at once. However one must be careful, because the contact points have a timestamp. If this timestamp is much later then the actual time of impact, the contactpoint are not valid at all.
As said before, I handle TOI calculation and manifold generation seperately. For the contact point generation stage I use tradional discrete collision detector (GJK) and a persistent manifold.
Basically the discrete collision detector adds one (or more) clostest point (or deepest penetration) to a persistent contact manifold. It keeps the existing points.
Every frame the contact points in the manifold get updated, and points that exceed the maximum distance are removed. When the manifold is full, and another point is added, the following strategy is used:
- keep points with deepest penetration
- keep the triangle with largest area
This works quite well for implicit convex, polyhedra and convex on concave. See Bullet demos and source for details. I dont handle the concave-concave case.
How do others create their contact manifold ? During the TOI calculation, or seperate ?