Page 1 of 1

Dynamic Collision Mesh

Posted: Tue Jul 29, 2014 7:46 pm
by Alexlzzy
Hello everyone.
I am currently working on a mesh-deformation project, I wonder if it is possible to use bulletphysics for dynamic mesh collision.
I have 3D models with set amount of vertices, but these vertices constantly change their positions.
I already have used Bulletphysics , and implemented collision detection between terrain and other objects, but these objects are static.
What would be the ways of implementing this? Thanks.

Re: Dynamic Collision Mesh

Posted: Wed Jul 30, 2014 3:45 am
by Basroil
If you're good with math and know how your shape deforms, you could write your own narrow phase collision algorithm. If not, you could try either making a convex hull or convex decomposition (multiple convex hulls that represent a concave mesh) for the new shape each and every time the vertices deform. If computational efficiency is an issue, and collision accuracy not that important (lets say moving a box out of the way of a swarm of insects), you could approximate your collision shape as a collection of spheres with centers at each vertex. The approximation works best with a dense vertex cloud, but you could also get fancy and improve accuracy by using boxes oriented based on the data, but not sure how much more efficient that would be than convex hulls and decompositions.