Working with global geo DEM with global image map

Started by bigben, August 11, 2014, 09:26:12 AM

Previous topic - Next topic


As the geog image map shader uses plan Y projection it's not practical for global image maps, so mixing global DEMs with global image maps can do your head in. Had a play to see what makes sense (to me anyway).
* Firstly, for the image texture map to work you need to use the normal image map shader with a spherical projection. 
* Typically global image maps will default to having 90°N, 0°E at the top of the planet, but TG uses 0,0 for the apex for the geog heightfield loader and geog image map nodes.
* The positioning of the geog nodes is done by changing the lat/long of the apex. Rotating the planet has no effect on these nodes.
* The positioning for a spherically projected image map is done by rotating the planet. Changing the lat/long of the planet apex has no effect on this image projection
* Attempting to adjust both to match can do your head in

To simplify things then I find it easier to transform the global image map by 90°, putting the south pole in the centre of the image. This make calculating the required rotation angle of the planet for the image map much easier. Latitude of planet apex = X rotation, Longitude of planet apex = -Z rotation