Dynamic triangle mesh

lepalom
Posts: 6
Joined: Tue Jul 25, 2006 12:58 pm

Dynamic triangle mesh

Post by lepalom »

Hi,

playing more and more with bullet I have realized that the library doesn't support dynamic triangle mesh. So, I cannot define my shape to test for collision as triangular mesh, I can only define a static terrain as triangular mesh.

So, my question is if there's some plan to develop this in the way that you can have objects defined as triangular mesh? (ex. the famous UNC Rabbit)

Thank's in advance,

Leo
User avatar
Erwin Coumans
Site Admin
Posts: 4221
Joined: Sun Jun 26, 2005 6:43 pm
Location: California, USA

Post by Erwin Coumans »

Triangle meshes are required to be static indeed.
As an alternative, Bullet offers convex hull of meshes, and compound objects. So you can approximate the Bunny with a convex decomposition. This performs much better then a triangle mesh, and it is more robust/reliable.

Compounds are recently added. It will be optimized using the OptimizedBVH datastructures soon.
lepalom
Posts: 6
Joined: Tue Jul 25, 2006 12:58 pm

Post by lepalom »

Erwin Coumans wrote:Triangle meshes are required to be static indeed.
Ok.
Erwin Coumans wrote: As an alternative, Bullet offers convex hull of meshes, and compound objects. So you can approximate the Bunny with a convex decomposition. This performs much better then a triangle mesh, and it is more robust/reliable.
ok, you proposal is from a solid defined as a mesh then convert it to a compound of convex hull objects, no? But how can I do that? A lot of times you have a object defined as a nonconvex hull mesh, so decompose it as a convex objects is not an obvious task IMHO.

Regards,

Leo
User avatar
Erwin Coumans
Site Admin
Posts: 4221
Joined: Sun Jun 26, 2005 6:43 pm
Location: California, USA

Post by Erwin Coumans »

ok, you proposal is from a solid defined as a mesh then convert it to a compound of convex hull objects, no? But how can I do that? A lot of times you have a object defined as a nonconvex hull mesh, so decompose it as a convex objects is not an obvious task IMHO.
You can use the convex hull (this works automatically) or
look at the convex decomposition demo, in Bullet. This is work-in-progress, John Ratcliff has some updates in his sleeve...
Notice that Havok doesn't support moving triangle meshes either, but they teach game developers how to approximate using volumetric shapes. For example, a ragdoll typically is approximated by a collection of capsules, convex hulls (for each limb).

So instead of moving triangle meshes, convex hull and compounds of convex volumetric pieces is the way to go in my opinion. It moves the problem to the tools/artist. COLLADA physics import will help the connection to tools.

See http://continuousphysics.com/Bullet/php ... .php?t=351
and
http://codesuppository.blogspot.com/200 ... ition.html

Having said this, the Conservative Advancement method that Bullet uses for Continuous Collision Detection (CCD) on general convex objects, can be extended for hierarchies (non-convex meshes), as described in FAST paper by Kim Young:
http://www.continuousphysics.com/Bullet ... .php?t=440

Thanks,
Erwin