[ODE] Dem and Heightfield

Tristan McMillan tmcmillan at tmiconsult.co.za
Fri Aug 18 08:05:24 MST 2006

Hey Justin 

Thanks for the reply, I'm still a newbie at this whole graphics and
collision integration.

However, my plan is to use vtterrains to generate the dem code needed
just around my vehicle, which will be generated depending on the trucks

Then I'll pass that code from vtterrain to ode which will do the
collision management. 

I hoping, this will work as I'm still trying to implement it.

If you have any ideas about this, please let me know as I would hate to
be programming my self into a dead end.


Justin Wrote:
> Yes, and it takes quite a lot of work to do so. There's also a lot of
> other things to consider that are directly related to what you're
> with the application. For example, are you only rendering one DEM at a
> time, or are you doing some sort of dynamic terrain rendering
> (e.g. ROAM, CLOD) where you're paging in heights from a large
> of data.
> Firstly real earth data is in double precision and represents values
> the surface of the earth (ie non-local values). You need to end up
> generating a local origin and translate the earth-based values into a
> local reference frame. Effectively this reduces you from double to
> single precision values. It also brings numbers back into line with
> something that ODE can handle. The bigger numbers get away from 1.0,
> less accurate ODE becomes.
> The next problem is that, being real world elevation data, the origin
> based on the lower left corner. ODE doesn't use that, so you'll also
> need to apply an extra set of offsets to translate into ODE's way of
> thinking. If you're doing dynamic terrain rendering, that's going to
> a pretty major performance hit as you have to calculate these all
> frame. The collision libraries down the bottom of ODE don't deal well
> with dynamically changing data. If you can do the collision detection
> outside of ODE, you'll get some significant performance increases (in
> one case we got an order of magnitude faster speed on the basic
> collision detection).

> Tristan McMillan wrote:
>> I was wondering if anyone has ever integrated DEM data with the
>> dHeightfield class. As I'm trying to take .vrml data or .dem data
>> vtterrain and generate a heightfield of this?

More information about the ODE mailing list