Solving the coordinate precision problems in WorldWind
This posting is meant to store away relevant material for solving the coordinate system precision problems in WorldWind. It's written for me as notes for me, but maybe it will help you!
#1 -- Statement of problem:
- http://issues.worldwind.arc.nasa.gov/browse/WW-76
- http://issues.worldwind.arc.nasa.gov/browse/WW-477
- http://www.terrainmap.com/rm45.html
#2 -- Problem manifestations
- "Jitter" at high resolution
- Poor Picking Rays -- difficulty with moving the camera in high res
- tiling naming output :
#3 -- Google search terms:
- worldwind jitter
- gamasutra jitter
- global coordinate scenery jitter
- Heizenberg range
- http://www.surak.com.au/~chris/PrecisionInVRML/PrecisionInVRML.htm for the same issue in GeoVRML
- nhv suggestion: FlightGear, http://www.flightgear.org
- http://www.blitzcoder.com/cgi-bin/ubb-cgi/postdisplay.cgi?forum=Forum4&topic=000352
- http://planet-earth.org/cw05/FloatingOrigin.pdf
- http://www.gamasutra.com/features/20020712/oneil_01.htm##
- http://www.ai.sri.com/~reddy/geovrml/double/
- http://pastebin.com/527915 -- ddh's recent work (splitting lat SP into two separate values -- haven't evaluated yet)
- http://www.gameprogrammer.com/4-fixed.html
- http://java.sun.com/products/java-media/3D/forDevelopers/J3D_1_2_API/j3dguide/VirtualUniverse.doc.html#49034
- http://www.surak.com.au/~chris/PrecisionInVRML/SinglePrecisionGeoVRML.html
- http://sourceforge.net/projects/retinax/ and http://sourceforge.net/forum/forum.php?forum_id=523573 for scene graphs
- If someone is interested, Celestia has already solved this problem. I don't know specifically how they do it, but apparently, they are able to render a "BigInt" or something that is the equivalent of a 128 or 256-bit number. I'm going to assume it's the manipulation of the Matrix stack from global to local coordinate systems.
- Look at Worldwind logs for 5-26-2005, 5-27-2005, 5-28-2005
#5 -- Methods:
- Force Camera at 0,0,0 -- get the most precision possible.
- Localized camera coordinate space - e.g. shift the mantissa at established camera positions
- Doublize by methods in above locations (although, alledgedly, this is quickly runs out too).
- Doublize by software-based vp (ugh)
- Add a decimal camera position, at least compute picking rays on decimal. Solve the jitter by forcing consistent roundoff error, or weighting based on altitude
- Perhaps force a localized zclipping that is more impervious (search on imposters)
- Finish reading items in #4 for more alternatives.
#6 -- My solution:
- My personal solutions was constrained by: a) lack of time, and b) desire to impact the Worldwind code base to the least amount possible (I hate branching and merging).
- Thus I have gone with a localized solution that bumps up the coordinate projection system by several powers of two after a certain altitude is reached. This allows me to preserve adequate precision. It of course has ramifications throughout worldwind code, but I think I've gotten it fairly managed. I still need more testing to see if additional tweaks are necessary.

1 Comments:
Urobots> ddh - I've noticed your recent checkins. gracias for taking a stab
dumdumhead> it's a work in progress...got a couple more things i need to try
Urobots> I've moved a lot to Decimal, by the way
dumdumhead> do u have any sin/cos functions for Decimal?
dumdumhead> I think that's all i need really
Urobots> and then when I cross the border into WW land, I downsample
dumdumhead> tan too
dumdumhead> basically, the System.Math library doesn't really do Decimal, it generally sticks with double
Urobots> unfortunately, all that code is non-managed using high-end graphics libs.
Urobots> yup. You do see, though, how many places in WW you start out with a float, and then move to double, which does not do any good
Urobots> even just moving to pure double should get close to 12"
Urobots> (12" spatially)
dumdumhead> yeah, that's my first step really
dumdumhead> try to get double working
dumdumhead> have u done any calculations to see how good Decimal would get us?
Urobots> great to hear. Haven't done the calcs because it goes beyond well beyond my needs.
Urobots> In the end, we have to map to DX anyways
Urobots> unless you know of a Decimal enabled GPU :-)
Urobots> I've been tempted to map to a ECEF coordinated truncated to a WGS84 Geoid
dumdumhead> well, i just need to figure out the trickery in global->local frame transforms
dumdumhead> *should be* straightforward... =\
Urobots> this would easily allow the resolution needed inside doubles, allowing GPU'd clipping
Urobots> ddh - yup. Well, if it is any consolation, there are those of us interested, in both spatial and mesh dimensions to have sub ft resolution :-)
Urobots> I'll keep you posted -- I too will be tackling it in another week. Unfortunately only have 3 or so days to solve it :-)
KoS1> this may be a stupid question, but if imagery can be displayed at sub foot resolution. Them why is it hard to display the same in elevation
dumdumhead> Urobots: yes, it's very important for us too.
Post a Comment
<< Home