[ODE] Huge world vs precision problems

Jon Watte (ODE) hplus-ode at mindcontrol.org
Fri Mar 10 15:05:49 MST 2006



Anders Olofsson wrote:

> one at the far edge wobbled, kind of obvious. Then I tried specify the 
> triangles using doubles, no difference, still wobbling!. Strange and 
> depressing. So the problem isn't just in ODE, duh.

Hardware OpenGL implementations on Windows are all 32 bit internal.
Doubles get down-converted.

The trick is to issue everything in camera relative space, rather than
world space. Thus, you will subtract position of object (2500 km) from
position of camera (2499 km) and end up with a value of only 1 km, which
will not cause jitter when you pass it to OpenGL (or DirectX).

You have to do the same thing for collision: Subtract the large values
from each other, and pass the small (mesh-relative) values in to collision.

> What about scaling everything down to the size wich can be "handled" by 
> floats?. Any other drawbacks than the agony? ;)

It doesn't have to do with absolute size, it has to do with relative
magnitude differences.

Cheers,

			/ h+



More information about the ODE mailing list