Bullet has support for quite a lot of types of triangle meshes:
Convex:
btConvexTriangleMeshShape
btConvexHullShape
Concave:
btTriangleMeshShape
btBvhTriangleMeshShape
The simple convex shapes seem to use brute force testing for all vertices and there seems to be no optimization like e.g. hill-climbing. What are typical use cases for the above shapes? So for simple (convex) primitives with a moderate number of vertices I would use either btConvexHullShape or btConvexTriangleMeshShape depending on whether the mesh data can be shared. For huge triangle meshes (e.g. 50000 vertices) I use then some BVH mesh?
What is the typical limit for a convex hull mesh with/without using some hill-climbing method? Does those hill-climbing methods actually make sense when using BVH?
And how are the found triangles from the BVH handled? Are all possible triangles from the tree tested against whatever primitive using GJK then? How many maifolds will be created in this case?
Cheers,
-Dirk
Triangle meshes
-
- Posts: 861
- Joined: Sun Jul 03, 2005 4:06 pm
- Location: Kirkland, WA
-
- Site Admin
- Posts: 4221
- Joined: Sun Jun 26, 2005 6:43 pm
- Location: California, USA
There are several concepts for collision meshes:
- dynamics (moving) versus static (= not rotating and not translating) shapes.
- re-use graphics (triangle) data versus duplicating.
- concave versus convex
- vertex deformation (full or partial refitting the graphics mesh into the collision shape)
- concave compounds of convex parts (from convex decomposition), concave btCompoundShape
As a rule-of-thumb:
Use a btConvexHullShape for moving convex meshes, duplicating the vertices (point cloud). In my experience brute force is faster and recommended over anything more 'clever' (like hill climbing, Dopkin Kirkpatrick hierarchies etc) when using less then 100 vertices. If you need more details (not recommended) use compounds of simpler convex parts.
For static meshes, use compressed/quantized btBvhTriangleMeshShape. This supports real-time local vertex deformation through partialRefit.
Hope this helps,
Erwin
- dynamics (moving) versus static (= not rotating and not translating) shapes.
- re-use graphics (triangle) data versus duplicating.
- concave versus convex
- vertex deformation (full or partial refitting the graphics mesh into the collision shape)
- concave compounds of convex parts (from convex decomposition), concave btCompoundShape
As a rule-of-thumb:
Use a btConvexHullShape for moving convex meshes, duplicating the vertices (point cloud). In my experience brute force is faster and recommended over anything more 'clever' (like hill climbing, Dopkin Kirkpatrick hierarchies etc) when using less then 100 vertices. If you need more details (not recommended) use compounds of simpler convex parts.
For static meshes, use compressed/quantized btBvhTriangleMeshShape. This supports real-time local vertex deformation through partialRefit.
1 manifold. I tried multiple manifolds in the past, but didn't notice much difference, so unless users start complaining, we can stick with contact manifold per collision pair. So simplicity over complexity.And how are the found triangles from the BVH handled? Are all possible triangles from the tree tested against whatever primitive using GJK then? How many maifolds will be created in this case?
Hope this helps,
Erwin
-
- Posts: 861
- Joined: Sun Jul 03, 2005 4:06 pm
- Location: Kirkland, WA
-
- Site Admin
- Posts: 4221
- Joined: Sun Jun 26, 2005 6:43 pm
- Location: California, USA