So my application is an unusual little experiment, but essentially all you need to know is that I am generating geometry on the fly. Unfortunately the geometry might occasionally be concave, and because applying conventional convex decomposition to the vertices is a little too slow for my purposes I am instead generating approximations of the convex hulls using the same data I generate the vertices from. This causes the hulls to overlap slightly, but the overall shape is close enough.
What I want to know is, are there any problems on Bullet's side with having lots of overlap between the children of a compound shape? I know they don't collide with each other, but will there be some kind of performance hit or unexpected behaviour as a result?
Sorry if this is well known but I'm new to handling physics engines and this isn't exactly an easy thing to google.
Are there any issues caused by overlapping child shapes?
-
- Posts: 4
- Joined: Fri Mar 08, 2013 6:11 pm
-
- Posts: 456
- Joined: Tue Dec 25, 2007 1:06 pm
Re: Are there any issues caused by overlapping child shapes?
Not that I'm aware of.Lewis Wakeford wrote:are there any problems on Bullet's side with having lots of overlap between the children of a compound shape? I know they don't collide with each other, but will there be some kind of performance hit or unexpected behaviour as a result?
Instead, having some overlap sometimes can prevent small child shapes from getting stuck between other objects (like terrain).
I think performance can be affected by the number of child shapes and by their number of vertices (i.e. I think that a convex hull shape without redundant vertices or with a limited number of vertices behaves better).
The HACD library itself that is used in the Bullet Convex Decomposition Demo creates shapes that overlap (although there's a new v-HACD library for creating non-overlapping child shapes that works for manifold input meshes only): generally speaking, overlapping shapes are bad only if you need to "break" the compound shape at runtime, and not for performance reasons (assuming that both algorithms can create the same number of child shapes with the same number of vertices).
That's what I know about it.
-
- Posts: 4
- Joined: Fri Mar 08, 2013 6:11 pm
Re: Are there any issues caused by overlapping child shapes?
That's very helpful. Thanks.