Dynamic Collision Mesh

Post Reply
Alexlzzy
Posts: 1
Joined: Tue Jul 29, 2014 6:38 pm

Dynamic Collision Mesh

Post 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.
Basroil
Posts: 463
Joined: Fri Nov 30, 2012 4:50 am

Re: Dynamic Collision Mesh

Post 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.
Post Reply