🎉 Celebrating 25 Years of GameDev.net! 🎉

Not many can claim 25 years on the Internet! Join us in celebrating this milestone. Learn more about our history, and thank you for being a part of our community!

Bilateral Advancement Separation Functions

Started by
3 comments, last by Dirk Gregorius 5 years, 1 month ago

Hello,

I have recently implemented continuous collision detection using Conservative Advancement and I am currently trying to switch to Bilateral Advancement as described by Erin Catto in his GDC 2013 talk "Continuous Collision". However I am having trouble finding the right separation functions to use in 3D. I think I have the Vertex-Vertex, Vertex-Face, Edge-Face and Face-Face separation functions working correctly but I am unsure of the Vertex-Edge and Edge-Edge case.

I have found (from the bullet forums) how to get the separation axis for the Edge-Edge case using:


Vector3 EdgeA = closestFeatures.verticesA[1] - closestFeatures.verticesA[0];
EdgeA.Normalize();

Vector3 EdgeB = closestFeatures.verticesB[1] - closestFeatures.verticesB[0];
EdgeB.Normalize();

Vector3 Axis = Vector3::CrossProduct(EdgeA, EdgeB);

if (Vector3::DotProduct(closestFeatures.verticesB[0] - closestFeatures.verticesA[0], Axis) < 0.0f)
{
	Axis = -Axis;
	EdgeB = -EdgeB;
}
	

But I am unsure of where to go from here, I'm sure it is something simple that I am missing. 

If anyone who has implemented technique before could help me, it would be greatly appreciated.

Thanks 

Advertisement

What are you stuck on?

So on the Edge-Edge case I have the axis of separation but I can't figure out how to use that to get a separation value.

In the edge-edge case you would simply compute the closest points between the two edges. E.g. like so:

https://math.stackexchange.com/questions/846054/closest-points-on-two-line-segments

Edge vs Edge is tricky. First the separation function is not convex. Say the edges are nearly parallel. When you build the cross product while the edges move the resulting axis (e1 x e2) can flip. It can also be arbitrary if the edges are essentially parallel (e.g. zero vector). This is actually an open problem with this method and the solution for this is pretty involved. A simple work around is to fall back on a global axis like vertex vs vertex. It is not as optimal but will work well. That is what suggest first to get things working...

This topic is closed to new replies.

Advertisement