Hey guys!
Been trolling these forums for years now, finally decided to sign up and not lurk anymore. =)
I'm the physics programmer in my team and I am trying to implement OBBs in 3D. It's been a bit of a challenge, as there is a lot of good reference material (thanks Randy Gaul, Dirk Gregorious and Erin Catto, among others) but most of it pertains to 2D collision.
And I get it! You can extrapolate that to the third dimension, but it's hard sometimes you know?
Anyway, I'm working on generating contact points. Been following this tutorial:
dyn4j.org/2011/11/contact-points-using-clipping/
It's allowed me to understand the clipping process, at least in 2 dimensions. When I implemented it however (naively expecting the process to still apply for 3D) I obviously did not find the results to my satisfaction.
Later on when I saw Dirks 2013 GDC slides, I saw that an object in 3D must have at least 4 contact points in its manifold!
And it was only too obvious in hindsight.
Anyway, the problem itself.
1) There is a lot of mention made about edge - edge collisions being clipped differently from *something*-face collisions. Which makes absolute sense, it's just that I am drawing a blank as for HOW to know a collision is of a specific type.
2) When you know that a collision is *something*-face, the problem then becomes clipping an edge/face against the plane of a face for example.
David Eberlys paper "Clipping a Mesh Against a Plane", has some algorithms that allow you to deal with this.
I understand how vertex clipping and edge clipping work. Which are fine in 2D, but when you ascend to 3D, you need face clipping as well.
But I cannot for the life of me understand how face processing is supposed to happen.
An explanation with an example would be a tremendous help.
Thanks!