[ODE] Heightfield / Collision.

Gary Haussmann g.haussmann at worldnet.att.net
Thu Feb 20 11:14:01 2003


Alan Gordie wrote:
> Hi, in case you guys haven't seen Thatcher Ulrich's heightfield work, you
> can find it here...
> 
> http://tulrich.com/geekstuff/chunklod.html
[...]
> 1)  It's a cool demo and who doesn't like a daily dose of eye-candy!  ;)
> 2)  Pre-processing the heightfield data to create data structures which are
> optimized for collision detection should be just as attainable as the
> ability to render a 16k x 16k heightfield in real-time on today's hardware.
>
 >Am I way off base?

I don't think you're way off.  I did manage to get basic collisions 
working with this, using a version of Thatcher's hieghtfield work.  (a 
variant that runs in The Nebula Device).

What is nice about this terrain implementation is that the chunked 
terrain has multiple polygon meshes of various sizes.  The largest mesh 
has large errors, but covers the whole terrain in a single mesh, while 
smaller chunks use roughly the same # of triangles but provide more 
accuracy.  So you can use whatever chunks you want, depending on your 
accuracy requirements.

The major problem is the dynamic loading/unloading of terrain data. 
Dynamic loading/unloading is pretty much required for those huge 
map-of-a-country sized terrains.  Dynamically building OPCODE data 
structures as you load/unload the terrain data is too slow to be done on 
the fly.  I'm hoping that pre-generating the OPCODE data and 
loading/unloading collision trees, done in a fashion similar to the 
vertex data used for rendering, will be fast enough to be useful.

Gary