On collision shape size and margins

MaxDZ8
Posts: 149
Joined: Fri Jun 24, 2011 8:53 am

On collision shape size and margins

Post by MaxDZ8 »

Hello, this is my first post.
I have invested some time in looking at Bullet, so far it seems very nice both in terms of functionality and integration. Many thanks to all contributors it's going to save me quite some effort!

Anyway, the user manuals reads, on page 39
Avoid very small and very large collision shapes
The minimum object size for moving objects is about 0.1 units ... so don't create objects smaller than 10 centimeters. It is recommended to keep the maximim size of moving objects smaller than about 5 units/meters.
Ok, this is fairly reasonable but does this apply to non-moving objects as well?
From this thread, I get the idea that this is a common limitation. Is that correct? If yes, I think it would be the case to edit the manual.

Second main question. Is it the case to adjust the collision margin somehow? For example, to increase it with velocity, decrease it with size. It is my understanding this is not supposed to be needed... or perhaps not supposed to happen at all? It is my understanding it must be > 0. It is my understanding this will cause more deep penetration. I am not even sure what does that mean, I suppose it deals with estimating the amount of energy to be given back for rigid bodies and deformation for softs?
While the collision margin for spheres (and other quadratics?) is in the volume itself, thus making sense, I had the idea that the margin, being outside of the Box, was also used for some other processing, I suppose rejection tests. Is this correct?
Sqeaky
Posts: 2
Joined: Sun May 02, 2010 11:31 pm

Re: On collision shape size and margins

Post by Sqeaky »

I think some of the answers you need can be located here: http://bulletphysics.org/Bullet/phpBB3/ ... php?t=6575

But that does raise some more questions. No one seems to know when or if changing the margin is a good idea, does anyone know about this? Where can we find a canonical list of shapes that "embed" the margin?
MaxDZ8
Posts: 149
Joined: Fri Jun 24, 2011 8:53 am

Re: On collision shape size and margins

Post by MaxDZ8 »

Thank you very much for the link. I couldn't find it myself previously.
I want to quote:
Most implicit convex shapes, such as btSphereShape, btBoxShape embed this margin.
The convex hull shape extends the shape with the margin. To compensate for this you can scale the graphics object, or shrink the btConvexHull.
Two months later, I think messing up the collision margin is not necessary at all. Perhaps only for automatic convex hull simplification and I'm not quite sure this makes sense at all.