[sldev] Physics precision,
and negative values? Translation of center of precision?
Dale Mahalko
dmahalko at gmail.com
Sat Apr 19 03:53:49 PDT 2008
This is probably a really obscure question, so it's not something I'm
going to ask Andrew during office hours.. :-)
We have long been told that the physics calculations become more and
more inaccurate as height increases. It would be nice to have a more
in-depth discussion of why this is the case, for the SL Wiki.
How exactly is physics positional data stored, server side, and how
can it become more inaccurate in relation to height? I assume this has
something to do with floating point values.
But if 768.00 meters is where the problems begin then it sounds like
the floating point values are accurate for only 5 decimal places,
which seems unusually and almost ridiculously small. Even the lowly
Apple II floating point BASIC was accurate to 9 places. What exactly
is going on with this precision limit?
Also, I note that negative positional values are not actually out of
the question, since I have in the past been able to move objects to
negative Z axis positions without crashing the simulator..
At what point on the negative-Z axis does the coordinate system start
to get imprecise again? Does an object have to get below -768 for
positional errors to appear, or does the imprecision begin immediately
below 0 meters Z?
What I'm trying to determine here is if the physics engine absolute
center of precision is also aligned at 0,0,0 with the sim, or if the
location is translated to up in the sky somewhere, to improve world
physics calculation.
If for example the center of accurate positioning is from +384.00 m Z
to -384.00m Z to the physics engine, then by translating the sim to
have the actual world center at +384.0 Z relative to the simulator,
then the entire range of precision of +/- 384m becomes available as 0
to +768m for users of the sim.
But if the high-precision range is from -768m to +768m Z and the
physics engine origin is the same as the simulator origin, that would
mean the precision below 0m Z is unusuable and wasted.
>From the client side, there's no way to know if prim positions aligned
to the sim-origin are being translated by the simulator to conform to
some other world-origin being used by the physics engine.
I suppose if the simulator ever does go open-source, such details will
become known as a matter of course, but for now this is hidden away
and there's no way to know how the coordinate system is directly
calculated and used by the physics engine.
- Scalar Tardis / Dale Mahalko
More information about the SLDev
mailing list