[ODE] Re: Collision triangle culling

Ruud van Gaal ruud at marketgraph.nl
Thu Dec 6 04:16:01 2001


...
> From: "Jani Kajala" <jani@sumea.com>
...
> This is not really an aswer to your question but anyway... 
> Usually racing games
> don't go that far in simulating collisions. Usually the 
> tracks are designed so
> that 'invisible fence' starts at some distance, and other 
> objects which get
> collided against have some reasonable volume.

I'm trying to stay out of that, so you can drive a terrain if you want to
(like in Monster Truck Madness, well, the few times I've played it). Setting
such a radius of every object would be too limiting I think.
But thanks for the suggestion. I'll go for the continuous collision checks;
they're not really that expensive given the right data structures. Not even
1% running at 1000Hz it seems on my PII-400/GF3 (but ofcourse, the more
graphics, the less the physics take).

> From: "Erwin de Vries" <erwin@vo.com>
...
> What we did was quite easy. Check if the center of the box is at the
> positive side of the plane. Beware though. This does not give perfect
> results in all cases. This was also a problem i didnt quite 
> know how to solve.

Thanks for that suggestion, should indeed work in 99% of the cases I guess.
Ofcourse, the quantum effect of a speeding car jumping through a fence in
one timestep isn't catched, but well.
Given that aerodynamics will make sure a car doesn't move in any direction
faster than say, 400 km/h... This is 111 m/s. I step at about 250Hz, which
then amounts to 0.44 m per step. Quite a lot actually, but should work most
of the time. Little things like broken off wheels and such will probably
need a smaller timestep or double checking (if speed>highspeedThreshold then
check at both p and p+v/2; for example, hm).

In fact, previously I had a better but slower function. I used Dave Eberly's
OBB-triangle intersection function (I still do, but more as a
TestIntersection than a FindIntersection), which takes the OBB's linear
velocity and calculates the time at which the OBB touches the triangle (so
quantum effects can be overcome). However, this requires more triangles to
check, and was quite a bit slower.

Ruud