Creating 3D Collision Point

Started by
21 comments, last by Randy Gaul 5 years, 11 months ago

Hi,

In my Physics Engine I use Polyhedra for my objects & I get the Intersection Polyhedra & take the Centre of Mass as the Collision Points.

Sometimes creating the Intersection Polyhedra fails due to floating-point rounding errors

Are there more reliable ways of creating Collision Points?

cheers

 

Reject the basic asumption of civialisation especially the importance of material possessions
Advertisement

I gave two talks on this topic:

"Robust Contact Creation for Physics Simulations." 

http://media.steampowered.com/apps/valve/2015/DirkGregorius_Contacts.pdf

"The Separating Axis Test Between Convex Polyhedra." 

http://media.steampowered.com/apps/valve/2013/DGregorius_GDC2013.zip

Thanks Dirk, creating manifolds seems to be an entire subject on it's own

Reject the basic asumption of civialisation especially the importance of material possessions
1 hour ago, Cacks said:

Thanks Dirk, creating manifolds seems to be an entire subject on it's own

Yep. 90% of groundwork to get a physics engine running is dealing with collision detection.

@Dirk Gregorius,

I had a quick read of your presentations.

You use the polyhedra overlap vertices to create manifolds

How would you deal with 2 long perpendicular polyhedra cylinders which collide?

No vertices would overlap...

Reject the basic asumption of civialisation especially the importance of material possessions

Exactly the same. The algorithm will handle this. Just think of two 2D boxes which build a cross. I recommend going through this example and draw each step on paper. It is a very simple case. Nothing special about it.

@Dirk Gregorius,

yes I see now, even though the vertices are not inside SAT will show an overlap!

Thanks :)

Reject the basic asumption of civialisation especially the importance of material possessions

@Dirk Gregorius,

I am having trouble with the 'QueryEdgeDirection' algorithm in your 'Robust Contact Creation for Physics Simulation' presentation

I understand I want to find the 2 edges with least penetration, but I don't understand how this algorithm can find them?

I have gotten 'QueryFaceDirection' to work well, thanks

 

Reject the basic asumption of civialisation especially the importance of material possessions

Did you see the sample code? In a nutshell, just test each edge combination. The Gauss-Map is just an optimization to prune edge pairs quickly. If you have a more specific question what you don't understand I might be able to help!

I can see the edge algorithm is very much like the face algorithm.

The Face algorithm finds the largest separation and the edge algorithm seems to do the same.

I have a few problems with the example I have attached.

Polyhedron P1 is rotated 45 degrees around the Y axis. I get the cross product between edges E1 & E2: this gives either the +X or -X axis.

Problem 1: I can't determine the direction of the axis because the dot product will always give zero

Problem 2: If I can determine the direction of the X-axis there is a separation between E1 & E2 & the algorithm will fail

Maybe I have misunderstood?

Thanks

EdgeSeparation.jpg

Reject the basic asumption of civialisation especially the importance of material possessions

This topic is closed to new replies.

Advertisement