Obb-Obb Contact Points

Started by
2 comments, last by Randy Gaul 7 years, 8 months ago

I'm trying to work on a simple rigid body physics engine, however i'm stuck when it comes to generating the contact points between two OBB's. I have implemented SAT for two OBB's but it's boolean. That is, if there is no seperating axis it returns true (there is an intersection), false otherwise.

How can i go from this binary SAT result to actually getting a list of contact points? I've found some books and a few books and articles on the topic, but they contained more greek letters and numbers, I'm by no means an expert on any physics or math topics. It seems i hit the learning curve face first on this one ;)

I digress. Back on topic, can anyone recomment books / tutorials / videos / anything on this topic?

The most easy to follow resource i've found so far is a 2015 GDC talk by Dirk Gregorius, this one: http://media.steampowered.com/apps/valve/2015/DirkGregorius_Contacts.pdf

But following it was a bit beyond me.

Advertisement

OBB contact point generation and a bit of general SAT were discussed on this thread recently:

http://www.gamedev.net/topic/676408-differentiating-between-an-edge-edge-and-something-face-collision/

After SAT has failed you have the axis of minimum penetration. If the axis comes from an edge combination then you use the closest points of the two lines made out of the two edges as the closest points. If it comes from a face then define this as the reference face on OBB A. You then define the incident face as the supporting face on OBB B in the negative direction of the reference face normal. After the incident face was found you find its polygon and clip this polygon against the reference face side planes. Then you keep the points that are below the reference face and create a face manifold using this.

If you could be more specific with what doesn't work with your implementation then we'd be glad to help.

Not specifically using Dirk's strategy, but this is about the derivation of an SAT implementation nonetheless: http://www.randygaul.net/2014/05/22/deriving-obb-to-obb-intersection-sat/

It should be a little faster than a general purpose hull vs hull SAT routine, but I haven't done any performance testing, and results would depend on the details of implementation.

This topic is closed to new replies.

Advertisement