Generating multiple contact manifolds between two bodies

Post Reply
dunedainrngr
Posts: 3
Joined: Thu Jul 02, 2015 9:17 pm

Generating multiple contact manifolds between two bodies

Post by dunedainrngr »

I am currently playing around with bullet as a collision detector to be implemented into a different code. Particularly I am interested in collisions between triangle meshes built from imported STL files. Using the "ImportSTL" demo from the examplebrowser as a starting point, I was able to move the imported mesh into a btGImpactMeshShape and then collide it with either another btGImpactMeshShape or a primitive shape. This import was done by slightly modifying the reading in of the STL file to a format that could be read in by btTriangleIndexVertexArray and then inserted into btGImpactMeshShape.

However, I was expecting that when I collided the "l_finger_tip.stl" shape provided in the demo with a box in two locations (see http://imgur.com/mG3rWAG) I would get two manifolds. However, I instead only get a single manifold, with one of the points in the "higher" contact and the other 3 in the "lower contact".

There is a good chance this is expected behavior, but I'm just having trouble seeing when multiple contact manifolds would be generated, as it seems such a case is possible based on comments made in the code. Perhaps I should be using a different shape?

The "possible" problem I will run into is that since there are two contact regions, I need to apply two separate forces on each of the objects and those might be difficult to separate if they both exist within the same manifold. I want to eventually determine how to reduce each of these regions to a single "penetration depth" and " contact normal".

Thanks very much.
dunedainrngr
Posts: 3
Joined: Thu Jul 02, 2015 9:17 pm

Re: Generating multiple contact manifolds between two bodies

Post by dunedainrngr »

As far as I can tell, the number of manifolds/points generated depends on the type of objects used:

1. For gimpact-gimpact collision (and other triangle mesh shapes?), there is always a single manifold generated with multiple manifold points.
2. For convex hulls and most primitive shapes, a single manifold with a single manifold point is generated (box-box collision is one exception to this rule, not sure if there are any others).
3. For the case of a compound shape (like a convex hull decomposition), multiple manifolds will be created: one for each child shape, each with one manifold point (assuming it is not a triangle mesh such as gimpact).
Post Reply