btGImpactCollisionAlgorithm : Performance issue

winspear
Posts: 77
Joined: Thu Nov 26, 2009 6:32 pm

btGImpactCollisionAlgorithm : Performance issue

Post by winspear »

I am trying to use the btGImpactShape to do collisions between two highly concave meshes each of 5000 vertices and I am seeing significant performance hit when I try to slide one mesh over the other. I am just using regular CPU based timer and Bullet v. 2.76. Is there anyway to optimize this algorithm or any tricks to speed it up?

Also, Is there any improvements in this algorithm or related area in Bullet v. 2.77 ? I especially heard that there is an OpenCL and CUDA powered engine in Bullet v. 2.77. Will these hookups speed the GImpactCollision algorithm ?

Any help or ideas will be greatly appreciated.
Thanks,

V
User avatar
projectileman
Posts: 109
Joined: Thu Dec 14, 2006 4:27 pm
Location: Colombia

Re: btGImpactCollisionAlgorithm : Performance issue

Post by projectileman »

Use convex decomposition instead. See the class btCompoundShape and take a look to the ConvexDecompositionDemo:

http://code.google.com/p/bullet/source/ ... onDemo.cpp
winspear
Posts: 77
Joined: Thu Nov 26, 2009 6:32 pm

Re: btGImpactCollisionAlgorithm : Performance issue

Post by winspear »

I have used the convex decomposition technique before and it is not perform accurate collision detection because of the way the decomposition is done. The decomposition algorithm does not produce good results for highly concave objects.
Take the example of a "torus knot", I tried a bunch of parameters and none of them worked properly.

Take a look at the torus knot here..

https://docs.google.com/leaf?id=0B-kRiG ... y=CKj49NkG

In this case the btGImpactCollisionalgorithm for concave objects is better.
Any other ideas?? What about version 2.77 ?
User avatar
Erwin Coumans
Site Admin
Posts: 4221
Joined: Sun Jun 26, 2005 6:43 pm
Location: California, USA

Re: btGImpactCollisionAlgorithm : Performance issue

Post by Erwin Coumans »

Can you share the zipped torus knot .obj file (attach to this forum)?

There is an updated version of John Ratcliff's convex decomposition tools here:
http://code.google.com/p/convexdecomposition/
http://code.google.com/p/bullet/issues/detail?id=401

Can you try it out? Otherwise, you could search for a better alternative and let us know?
Thanks,
Erwin
winspear
Posts: 77
Joined: Thu Nov 26, 2009 6:32 pm

Re: btGImpactCollisionAlgorithm : Performance issue

Post by winspear »

Thanks. I will definitely try out the new decomposition algorithm.
Here is the torusknot model attached.
TorusKnot.zip
BTW, this model behaves really nice when defined as a btGImpactShape and the btImpactalgorithm is used but the simulation speed is greatly reduced.
You do not have the required permissions to view the files attached to this post.