Jump to content
  • Advertisement
Sign in to follow this  
Mercenarey

Ellipsoid Collision vs. any other bounding volume

This topic is 4953 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

I have been considering a strategy for Collision Detection. At the moment I just run simple sphere collisions, but they are not very tightly fitting. During my process of learning Collision Detection I came across Ellipsoids (Peroxide paper). I kept them in mind while implementing the simpler spheres. Now, however, I am back on ellipsoids. But a problem struck me as I read about it: The reason why ellipsoids are simple to use, is because they are unit spheres in their own personal space. What happens if I want to detect collision between two ellipsoids of different measures (radii)? Or a sphere and an ellipsoid? Is ellipsoid only supposed to be used with similarly dimensioned ellipsoids and ellipsoid vs. mesh?

Share this post


Link to post
Share on other sites
Advertisement
that's the problem with ellipsoids, they are not that friendly when you try them with other volumes, such as oriented boxes or other ellipsoids.

You can still use ellpsoids for triangle-character collisions, and box-box collisions (box = box around the ellipsoid) for character against characters.

Share this post


Link to post
Share on other sites
Ok, thanx for the help. Guess I wasn't totally off in my reconing.

I just wondered if there was a trick around it...

However, I don't think ellipsoids are really worth it if they necessitate another bounding volume to interact with other objects - then I might as well use Cylinders or AABB's for collision against other objects, and then my usual sphere against the terrain.

Or spheres all the way.
I thought of two levels of spheres: One for overall collision detection, enveloping the entire model, and a smaller one, for interacting with the world/other objects. A smaller one would maybe be half the model, and allow two objects to move closer to each other.
Ellipsoids seem extremely specialized IMO.

Ah, I don't know, back to testing :)

Share this post


Link to post
Share on other sites
It's uneasy to determine the contact points with ellipsoids. And you need em to feed a true physics engine. It's because point/ellipsoid nearest point is hard and this is the ellipsoid/ellipoid theoretical problem reduced. However :

- boolean (yes/no) intersection tests are easier.
- world axis aligned ellipsoids can be compared easilly.


Else the general issue has been recently discussed and toroughly here at Gamedev. We concluded that it may very well be implemented very efficiently. But then don't be afraid by some math. The crucial element was that plane/ellipoid is easy. Thus the separating axes theorem (SAT) can be of great help.

world of ellipsoids

Share this post


Link to post
Share on other sites
just to talk about why using ellipsoids, over boxes, or spheres.

Nice rounded objects offers you a free system for walking up stairs. That's trickier with boxes, since you'll "stumble" on every step.

Spheres are too rounded. when you hit a small slope, you are more likely to get a bigger bump than when using a stretched ellipsoid.

That's the only advantage I can see using ellipsoids. Check out the Fluid Studio papers for that matter (I think peroxide covers that as well).

you can have a sphere/ellipsoid for the feet (half a sphere, really), and a box for the rest of the body, ect...

For the case of using bounding boxes, or shapes with sharp edges, and how to avoid bumping on small things (like a step, or a pavement, or small rubbles), if you can find the Stan Melax Docs on his BSP tree (on gamasutra, I think), he talks briefly how to handle that case, but I can't remember the exact algo. It's very simple.

something like...

trace box. collision?, then trace box 20 cm higher. Another collisions? Then stop the box, else move box there.

so it's a two pass algo.

Share this post


Link to post
Share on other sites
to avoid that kind of stuff, you can mark polygons with a step flag, so most of the time, you won't have to test twice (since most vertical polys are big fat walls, and not flagged as steps).

Share this post


Link to post
Share on other sites
thanx for the answers guys.

I don't know what the end result will be, but for now I will ignore ellipsoids, at least until a problem arises, that only they can solve.

Ellipsoids look like a big hazzle.

Btw, Oliii, my plan was not to use an AABB or Cylinder alone, I would use it in conjunction with spheres - let spheres interact with the world and complex meshes (terrain, houses - and stairs), and then boxes/cylinders with other objects (like other persons, trees etc.)

I haven't fleshed out a strategy yet, I will probley do it over the next days, maybe it will even be something totally different :)

But you guys gave me good input about what direction I should head.

Thanx.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

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

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!