Help with polygon separation

Please don't post Bullet support questions here, use the above forums instead.
goruka
Posts: 27
Joined: Wed Nov 07, 2007 12:49 am

Help with polygon separation

Post by goruka »

Hi! First of all, sorry fro bringing this issue here, as i can see from the other posts that you guys are dealing with a lot more advanced problems..
I haven't seen (or probably understood) in the FAQ about this, and I thought i'd venture to ask in here.. Basically, i'm writing a simple 3D Physics engine for learning, and i'm running into some problems I can't quite figure out.

I read about Minkowski difference and how it works for determining the minimum penetration and separation between two convex objects, and that seems to work fine.. However, there are issues i'm running into that I don't know how to solve.
The main one is when I have an object A, falling straight down, and intersecting objects D and C, which are static and can't move. The minimum separation of A and C send it straight to D, and with D it sends it straight to C.

Image

Ideally, I want to separate A to move up, but i can't find any algorithm i can use for this, and binary searching throught the motion/rotation to find the closest "hit" moment to then apply the best correction seems like total overkill to me. Help is greatly appreciated!
sbroumley
Posts: 15
Joined: Sun Aug 07, 2005 6:31 am
Location: Austin

Re: Help with polygon separation

Post by sbroumley »

Since C & D are static you can pre-process the data so that the shared faces between them are ignored during the "choose the direction of minimum penetration" part of your collision detection.

There is a good article on this in Game Programming Gems4 called Fast Contact Reduction for Dynamics Simulation.

I've implemented this into a simple SAT test for static triangle-soup worlds with success - I use the normals of all triangle faces/edges for the intersecting test, but I skip such flagged faces/edges when considering them for the direction of minimum penetration.

I'm sure you could implement a similar thing into GJK or whatever algo you are using. It maybe a bit tricker though because I haven't written them yet (it's on my to do list :| )

-Steve
goruka
Posts: 27
Joined: Wed Nov 07, 2007 12:49 am

Re: Help with polygon separation

Post by goruka »

sbroumley wrote:Since C & D are static you can pre-process the data so that the shared faces between them are ignored during the "choose the direction of minimum penetration" part of your collision detection.
The fact that they are static doesn't change that they can't move. It's only that they are not affected by the collissions, so I can't do much about this :( , but thanks for your reply !
sbroumley
Posts: 15
Joined: Sun Aug 07, 2005 6:31 am
Location: Austin

Re: Help with polygon separation

Post by sbroumley »

MMmm I don't quite understand what you mean - can you can shine some more light on what you mean by "The fact that they are static doesn't change that they can't move".