Most accurate mesh <-> mesh collision

Post Reply
pwiecz
Posts: 8
Joined: Mon Aug 15, 2016 7:11 pm

Most accurate mesh <-> mesh collision

Post by pwiecz » Fri Feb 10, 2017 5:08 pm

Hi,
I want to find out if two arbitrary triangle meshes collide.
I don't need it to be fast, as I'm not going to run it in real-time, but as a batch simulation, but I want it to be accurate.
I was using btGImpactMeshShape, which works correctly for most meshes, but for some of them it does not detect collisions (although debug drawing them I can see they are clearly colliding).

Are there any knobs in gImpact to make it accurate at the cost of the speed?
Alternatively, can I make btBvhTriangleMeshShape detect collisions with other btBvhTriangleMeshShapes?

Thanks in advance,
Piotr

User avatar
drleviathan
Posts: 372
Joined: Tue Sep 30, 2014 6:03 pm
Location: San Francisco

Re: Most accurate mesh <-> mesh collision

Post by drleviathan » Fri Feb 10, 2017 6:14 pm

I don't know much about btGImpactMeshShapes but do I know btBvhTriangleMeshShapes cannot collide against each other.

If you aren't running real-time why don't you spend pre-processing time to generate convex decompositions of your mesh shapes and use that data to create accurate collection of btConvexHullShapes that are stored in a btCompoundShape?

pwiecz
Posts: 8
Joined: Mon Aug 15, 2016 7:11 pm

Re: Most accurate mesh <-> mesh collision

Post by pwiecz » Mon Feb 13, 2017 8:50 am

Thanks for the suggestion.
I hope it won't lead to explosion in number of convex hull shapes, especially for shapes with many smooth convex surfaces (e.g. toroidal ones).
But there's only way too find out. :)

Post Reply