Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

tri-thanatos

Reducing plane checks

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

If you intended to correct an error in the post then please contact us.

Recommended Posts

Iam working on some collision detection algorithms, and my current state is working on optimizing polygon collision. I have it that currently it takes 1 + N planes to solve, where 1 is the face plane, and N are the planes which are orthogonal to the edges of the polygon, in other words, N is the number of edges of the polygon. What I am doing, is checking to see if the object has intersected or is behind the face plane, then checking to see if it is in front of all of the orthogonal planes,if they are, the object has collided with the polygon. Is there anyway to optimize this while not getting any false positives, or atleast only a small chance of false positives( <5%)?

Share this post


Link to post
Share on other sites
Advertisement
if the object is totally outside an edge plane, then there is no need to test with the other edge planes. that should happen in most cases, except for triangles close to the object, so it cuts down nicely on the number of checks. furthermore, with the triangle plane, you should check the edge planes only if the object crosses the main traingle plane. Else, it''s either totally below or above the triangle, so no need for further tests.

additionaly, if you can compute and store the interval of the triangle along each edge planes (take the opposite vertex to the edge, and one vertex on the edge), and if the box/object''s interval does not cross that interval, then no need to test other edges.

as Fantasio says, a separation algorithm-based box/tri test does just that. Depending what kind of objects you use, you might want to look into it.

Share this post


Link to post
Share on other sites
when you calculate the time it intersects the face plane only check the polygon if the fraction it intersects the face plane is less than the closest valid fraction you''ve already found.

Share this post


Link to post
Share on other sites
which brings up a new question, I am currently having it that if they point is close enough to the plane or is behind it , it is a collision; however, I know this will give alot of false positives and was wondering what threads/articles you know of that ACCURATELY describe how to deal with objects that are moving so fast that they might jump entirely over a bounding box during the time between two frames.

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!