Thursday, January 26, 2006

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:


#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
#4 -- Possible solutions / Problem discussions


#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:

Blogger Geoff said...

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.

1:43 AM  

Post a Comment

<< Home