Testing new version (georeference)

Started by bigben, April 18, 2009, 10:49:15 PM

Previous topic - Next topic

bigben

Hi All

Just passing by and couldn't resist trying the new version for a little.  The GEOTIFF support shows a lot of promise  ;D. A few problems still left.


Quote from: RArcher on April 06, 2009, 01:39:02 PM
Now it seems that TG2 does not currently reference the image properly if the data is in UTM format and it would be really nice if it was able to do so.

Why? UTM doesn't fit nicely on a globe.  It provides a reasonable approximation of the correct projection when a TER file is draped onto a sphere from above but it's not suitable for correctly georeferencing data onto a sphere... just use geographic projection instead   ;)

From a quick test with low global res bathymetry it appears that it may be restricted to working on one hemisphere (90W - 90E). I've only tested at 90E and am guessing the same will occur on the other side? The geotiff with India straddles 90E (to 100E) but gets cut off in a straight line.
[attachthumb=#1]

North pole seems to be working OK
[attachthumb=#2]

South pole also works nicely, although once again, cut off at 90E.  This is the portion of Antarctica directly below india (Indian ocean geotiff not included here)
[attachthumb=#3]

Haven't looked closely at what happens at the border of files so I don't get distracted .... I'm going to have to recalculate my terrain masks for overlapping terrains but the possibilities with geotiff support are tremendous. Will it be possible to get lat/long coordinates from a planet to use in masks?

And to venture off topic for those asking about my animation script tool.... I'm technically past my contract date at work and have only 4 weeks left before I officially become "surplus to requirements", at which time I'll be working heavily on my website.  This tool is a high priority for the TG side of things.  I'll also have to re-evaluate my terrain sets to make use of georeferenceing but that's going to take a lot of testing. 

Ben

bigben

The other thing that was bugging me was wondering where the colours went in my test render.  I'd used a couple of mogn's gradients (http://forums.planetside.co.uk/index.php?topic=2968.msg30132#msg30132) for the land and water but the colour range didn't match the expected result.  I increased the displacement multiplier first until I saw the full range of colours (x4) and then zoomed in on the Himalayas, and it's obvious that it's due to the displacement not being along the planet's normal.

bigben

#2
Just confirming the cutoff at W90°. This is a polar view with data from 100°W - 100°E, but it gets cut off at +/-90°.  You can also see a small positive altitude artefact at the 90° boundary at the pole. 

There's no NZ Jo  :'( 

Oshyan

I'm sure Jo will take this personally and breathe down Matt's neck until it's resolved. ;D

I'm guessing these limitations are similar to some of the others we have that stem from the coordinate system. Once we can implement a proper global coordinate system these and other issues should be sorted out.

- Oshyan

bigben

It is, of course possible to edit the coordinates to bring the terrain into the "right" hemisphere, and at least we've now got terrain in the north and south hemispheres so this is a considerable step forward.

As for the displacement direction (increased lean as you move away from the origin)... had a closer look at the terrain on NZ and it seems the problem is with the direction of displacement of the fractal detail.  The last 2 images are with an additional alpine fractal or fractal detail. In one sense this is good news as I now know how to avoid some of the problems I've had in my larger terrain sets, and at least it's not a problem with the projection of the terrain file.

bigben

And finally....  made the obvious global reference terrain in preparation. 0.05° per pixel (101Mb).  So much easier to set up than a spherically projected image.

rcallicotte

Ben!  It's been a long time since we've seen you and we should have expected to see it's all about the technical wonders.  Thanks!
So this is Disney World.  Can we live here?

Mandrake

That last test render reminds me of the first Star Trek series.

bigben

#8
Couldn't resist another play on the train this morning.

1: echoing RArcher's request to georeference images maps as well...

2: ... particularly because georeferenced terrains and spherically projected images have different orientations. N-S axis for spherical projection is the Y-axis and for georeferenced terrains is the Z-axis. Global textures have to be remapped with a pitch of -90° to correctly align with georeferenced terrain, and more painfully, changing longitude requires remapping using roll instead of yaw (which is easily done using image offset).

This had caused me some confusion earlier, so it is still only the "top" of the TG planet that gets terrain added. Given this, it is probably more useful at the moment to have polar axis on the z-axis so that we can at least see southern elevation data as well and can "rotate" the data to see other longitudes beyond +/-90°.

3: Georeferencing TERs isn't automatic. I got around this by adding a geotiff first and then swapping the file to a TER (TERs are 50% smaller)

4: There is a lean of the terrain towards 0,0,0 at large X,Z values.

I started on a terrain blending mask based on lat/long by combining parts of my rainbow network with my previous blending masks. I'll finish that off on another train trip. The network is a little more complex but it's pretty straight forward and will (should) work for any planet position. Performance remains to be seen, but it's mainly in preparation for when georeferencing is fine-tuned a bit more.

Images below (Grand Canyon) include global 0.05° resolution elevation data, 10m resolution USGS NED (both as TERs, not geotiff),no terrain blending mask and no fractal detail... longitude adjusted 100° to bring terrain towards the centre of visible data (90W, 90E), 8K blue marble texture remapped to pitch -90° and then rolled 100° in PTGui. Ocean in the last image is "real". Duplicate planet with water surface, all terrain on original planet <0m altitude displaced -5m to ensure minimum water depth.

bigben

For those still scratching their heads, here is a spherical texture map that will match a global elevation data file georeferenced onto a TG planet.

jo

Hi Ben,

Quote from: bigben on April 19, 2009, 01:36:43 AM
There's no NZ Jo  :'( 

I'm definitely outraged, just so you know.

Regards,

Jo

neon22

OUTRAGE.. crikey....!

I mean Bigben's the guy with the only sewn together entire georef of NZ that I've ever seen :-)
its fantastic :-) (thanks Ben)
but I guess he forgot about us  :'(

sob...

keithlostracco

Thanks for the info Ben I've been trying to accomplish a similar thing and have just realized that my maps poles are on the equator of the planet. I've trying to find a way to rotate the image map around the globe and cannot find a way. I am wondering how did you get your sideways Blue Marble texture. I have a few different Blue Marble maps (displacement, bathymetric, specular, color) already and they are already spherical mapped in the normal direction (with the poles at the top and bottom). Did you find non spherical mapped Blue Marble images or did you reverse spherical map the image then cut, rotate, and re-spherical map the image. Any help would greatly be appreciated.

thanks

Keith

Oshyan

If you rotate the texture appropriately in an image editor it will affect how it maps in TG2. It's a workaround for now.

- Oshyan

keithlostracco

I cannot just rotate the texture in an image editor because the texture is a spherical projection, I have to convert the spherical texture map to a Cartesian texture map, then rotate it and then convert it back to a spherical map. I'm just not sure how to convert a spherical projection map to a Cartesian. I would prefer to change my coordinates of the heightfield's as in the other post "Image and Dem placement Difficulties". But if it is not to time consuming (to convert multiple maps colour, diplacement, reflection etc.) I'll convert the maps.
Here is an example of a spherical map of earth with the poles at the top and bottom:[attachthumb=#]


Thanks

keith