[ODE] Collisions time steps & tunneling effect

gl gl at ntlworld.com
Wed Jul 23 11:19:01 2003


> This sounds interesting, but could your idea be extended to triangle
> meshes ?

Not as easily I don't think - it works with heightmaps because each triangle
effectively defines a column, ie. it can be logically extruded downwards.
With general meshes, one thing you could do is test all potentially
intersecting triangles, and check if the primitive is 'behind' all of them.
If so, you could assume a deep penetration (ie. one beyond the surface) has
ocurred.  There are probably some gotchas I'm not thinking of right now.  Of
course that would only detect objects that were deep inside the mesh, not
objects which had passed right through.

> I'm needing that functionnality not only for the heightfield,
> but also for a set of other objects. How is it limited to heigthfields
> and spheres only, from your code's point of view ?

My code's limited to heightfield unfortunately.

> Do you only have
> a heightmap / sphere intersection test ?

For the momement, yes, though Fabian just said he has box support mostly
working.  However, he's used his own sphere collision, and I don't know if
it supports deep penetration detection?

> I tried reducing the time steps to 1/200th a second, but i can still
> (once every 10 mins in average) fall below the ground, which proves
> it's not a good solution, at least not in my situation.

I think my hf approache is a decent 'catch-all' fallback.  Another approach
for objects may be to give them two bounding volumes - one would be a much
larger, scaled version of the actual one.  That way you could detect that a
collision may have been missed, and do more calculations to deal with it.
Another option is to implement swept volumes, ie. extrude fast moving
objects' bounding volumes between the last and current timestep, and detect
if an intersection with another object ocurred.  I personally haven't done
any of this, but it's a common approach to the problem.  Of course it would
be nice of ODE actually supported swept volumes.
--
gl