This topic is 4901 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

## Recommended Posts

i want to compute the exact contact point of two obb,which are penetrating each other. i don't know how,and i'm even not sure what the contact point mean when two obb penetrating each other,or how the contact point defined when in a penetratable rigid body dynamic simulation like ode.i guess it's not just the exact intersecting point .i found code for this problem in ode,it's too hard for me to read,and it's seem to have some thing with the axis with the smallest penetrate depth.could somebody tell me what is the contact point and how to compute it,or show me some link

##### Share on other sites
It sounds like you're refering to static collision detection, that is, the motion of the objects is not taken into account. In this case the intersection will usually be a volume rather than a point.

This volume isn't of particular interest; what is more likely to be important to a physics simulation is a unit-length direction vector and a distance along that vector. This is the 'smallest penetration depth' that you refered to. I haven't used Ode but I'm guessing it requires this information to resolve collisions.

With OBBs this information can be acquired fairly easily using the separating axis method. It's actually quite a bit easier than calculating the first point(s) of intersection for moving objects. All you have to do is keep track of the axis with the least overlap when performing the separating axis test.

Here is a document that provides an overview of the SAT. I'm not sure if it covers the smallest penetration depth specifically, but if not that part is pretty easy to derive.

##### Share on other sites
There isn't a single "contact point" when to obb intersect. However, you can easily get a list of points by intersecting the edges of one box with the faces of the other (and vice versa). Then eliminate duplicate/almost duplicate points. If you transform the second box into an axis-aligned box this test is easy/quick to do.

##### Share on other sites
Quote:
 Original post by jykHere is a document that provides an overview of the SAT. I'm not sure if it covers the smallest penetration depth specifically, but if not that part is pretty easy to derive.

The method in that document can just deal with boxes without rotation.While the boxes are rotating,the potential seperating directions are changing with the time.

##### Share on other sites
Quote:
 Original post by MrRowlThere isn't a single "contact point" when to obb intersect. However, you can easily get a list of points by intersecting the edges of one box with the faces of the other (and vice versa). Then eliminate duplicate/almost duplicate points. If you transform the second box into an axis-aligned box this test is easy/quick to do.

But I don't know whether can these point be used as contact point in regular collide response method.Most collide response method assume you have found the exatly contact point,or two points from each body,which are close enough. I'm looking for methods which are base on a penetration situation.

##### Share on other sites
Quote:
Original post by snooopy
Quote:
 Original post by MrRowlThere isn't a single "contact point" when to obb intersect. However, you can easily get a list of points by intersecting the edges of one box with the faces of the other (and vice versa). Then eliminate duplicate/almost duplicate points. If you transform the second box into an axis-aligned box this test is easy/quick to do.

But I don't know whether can these point be used as contact point in regular collide response method.

I don't know what you mean by a "regular collide response", but I certainly use this in my collision response code. For example, a box sitting on a bigger box has one object-object contact, but 4 contact points. An extruded hexagon (on its end) has one object-object contact, but 6 contact points, etc... If you try to represent the contact with just one point you'll either get:

1. "Jiggling" if you select a corner point, as the contact forces will be applied at corners of your box, and the contact point will change from one integration step to the next.

2. bad friction behaviour if you select an average point (e.g. you might choose the average of the 4 corner points).

Representing the object-object contact with multiple contact points will solve the first problem, and give a better friction behaviour (especially in the case where your box is rotating around a vertical axis as it sits there).

##### Share on other sites
This:
Quote:
 The method in that document can just deal with boxes without rotation. While the boxes are rotating,the potential seperating directions are changing with the time.
Seems to indicate that you are interested in a swept test, and that furthermore you want to incorporate angular velocity as well as linear.

But this:
Quote:
 I'm looking for methods which are base on a penetration situation.
Suggests that you want a static test.

If you want a static test and a penetration vector and depth, again, I recommend the SAT and the article I linked to initially. If you want a swept test with linear velocity, the SAT can be adapted to provide the first time and point(s) of contact. If you want to incorporate angular velocity as well you can take a look at this, but it's quite a bit more involved than the other two methods.

1. 1
Rutin
25
2. 2
3. 3
4. 4
5. 5

• 9
• 10
• 13
• 19
• 14
• ### Forum Statistics

• Total Topics
632943
• Total Posts
3009354
• ### Who's Online (See full list)

There are no registered users currently online

×