Geog Image Map Shader

From Terragen Documentation from Planetside Software
Revision as of 04:33, 7 February 2014 by Jo (talk | contribs) (Created page with "center '''Node Description and Purpose'''<br /> The Geog image map shader can load and georeference images in many raster geospatial data formats...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search
Work in progress.jpg

Node Description and Purpose
The Geog image map shader can load and georeference images in many raster geospatial data formats. In other words, you can use it to load aerial and satellite photos. Georeferencing means it places images in their correct geographic location on the planet, as long as the georeferencing information is available with the image. Please note that the node does not support vector images.

The Geog image map shader is a specialised version of the Image map shader. It shares quite a few settings with the Image map shader but also provides new ones for working with geospatial data.

You can see a list of the image formats supported by the node here. TG3 supports all of the formats which have "Yes" in the "Compiled by default" column of the table on that page. It also supports JPEG2000 via OpenJPEG. Most commonly used image formats are supported. Please note that not all of the supported formats have been tested, there are a lot of them and some are quite obscure.

The Geog image map shader doesn't allow you to specify the image projection (not to be confused with the geographic projection) for the shader. The only image projection it supports is Plan Y.

When the node is loading an image it loads each raster band (channel) of the image in turn. It shows a progress dialog, if needed, for each raster band that's loaded.

Georeferencing settings are only available in the Professional edition. However the correct size for the image will still be calculated based on georeferencing if needed.

When you use a georeferenced image and the Georeference parameter is checked it will be placed at the correct position on the planet. However accuracy falls away as you move away from the origin of the planet, which corresponds to 0° latitude, 0° longitude or the Prime Meridian at the Equator. To ensure the best accuracy when working with georeferenced data it's suggested that you move the planet origin to the area you're interested in. This is less important with image data but can be a factor if you're using the image for displacement or along with georeferenced DEMs.

It's easy to move the planet origin. Let's say you've loaded an image and it's georeferenced. We'll move the planet origin so that it's at the southwest corner of the image. Follow these steps:

  1. Click the copy/paste button (clipboard icon) at right of the SW corner lat long parameter.
  2. Choose "Copy coordinates" from the menu which pops up. This will copy the lat/long values from both text fields at the same time.

  3. Open the parameter view for the Planet 01 node (the default planet object). You can find this in the Objects node list or double click on the node in the network view.

  4. Paste the values into the planet's Lat long at apex parameter. You should use the copy/paste button for this again. Click the button and choose "Paste coordinates".

Those steps move the planet origin to the area you're interested and should ensure the best results.

The node allows you to replace NODATA values with a different value. NODATA values indicate areas in the image without valid data, which would usually be represented as black ares in the image.

The Geog image map shader works best with images that are already have the raster data aligned north/south. For example some of the US National Land Cover Database images have the raster data rotated within the image bounds. These currently will not display properly. The Geog image map shader will support warping images such as these in the future. In the meantime you may want to warp these images yourself, perhaps using the GDAL tools.

The node uses GDAL and [1] to load and georeference image files.

Node Type: Shader (colour and/or displacement)


  • Image filename: This parameter lets you specify the image file to be loaded. Click the File button on the right to open a file chooser dialog.

The following georeferencing settings are only available in the Professional edition:

  • Georeference: If this is checked the heightfield will be georeferenced according to the settings in the fields below. If you uncheck this the position of the DEM will be controlled by the Heightfield Shader this node is attached to. The DEM will still be the correct size (according to values derived from the file).
  • Auto georeference from file: If this is checked the node tries to load georeferencing information for the DEM. This is on by default so when you a create a new node and choose a file the georeferencing information will be loaded automatically. If the node finds georeferencing information when it loads the file it also turns on the Georeference parameter. Please note that this also means that the georeferencing information will be read when the node loads as part of a project being opened. If you turn off the Georeference parameter you should also turn off Auto georeference from file or Georeference will be turned back on again when the project loads.

    If you make changes to the georeferencing values this parameter is turned off.

  • NW corner lat long: This sets the latitude and longitude of the northwest corner of the heightfield.

  • NE corner lat long: This sets the latitude and longitude of the northeast corner of the heightfield.

  • SE corner lat long: This sets the latitude and longitude of the southeast corner of the heightfield.

  • SW corner lat long: This sets the latitude and longitude of the southwest corner of the heightfield.

  • Position explicitly: If this is checked you can set the position of the image directly without using georeferencing. You use the parameters below to do this. Explicit positioning is the only option for editions of TG3 lower than the Professional edition.

Position center: If this is checked the shader is positioned relative to centre of the image. Position lower left: If this is checked the shader is positioned relative to the lower left corner of the image. Position: This sets the position of the shader. Size: This sets the size of the shader in metres. Size from Image: Click this button to set the size based on the data available from image. For example if the georeferencing data for the image said it covered an area of 5 km by 10 km then the Size parameter would be set to { 5000, 10000 }.

Additional tabs for Geog Image Map Shader[edit]

A shader is a program or set of instructions used in 3D computer graphics to determine the final surface properties of an object or image. This can include arbitrarily complex descriptions of light absorption and diffusion, texture mapping, reflection and refraction, shadowing, surface displacement and post-processing effects. In Terragen 2 shaders are used to construct and modify almost every element of a scene.

A vector is a set of three scalars, normally representing X, Y and Z coordinates. It also commonly represents rotation, where the values are pitch, heading and bank.

A parameter is an individual setting in a node parameter view which controls some aspect of the node.

Literally, to change the position of something. In graphics terminology to displace a surface is to modify its geometric (3D) structure using reference data of some kind. For example, a grayscale image might be taken as input, with black areas indicating no displacement of the surface, and white indicating maximum displacement. In Terragen 2 displacement is used to create all terrain by taking heightfield or procedural data as input and using it to displace the normally flat sphere of the planet.

The Node List is a part of the Terragen interface that shows a list of nodes along the left side of the application window. The Node List generally shows only those nodes that are relevant to the current Layout (e.g. Terrain, Atmosphere). It sometimes includes buttons or other controls that are specific to a particular Layout as well. The Node List is hierarchical and each level is collapsible.

A heightmap or heightfield is an array of height values, usually in a grid which describe the height at specific points in a defined area. Heightfields are used to represent real-world and virtual terrain in a specific, easily converted format. Most heightfields can be represented as simple image data in grayscale, with black being minimum height and white being maximum height.

DEM stands for Digital Elevation Model (or Map). A DEM is similar to a heightfield. DEMs are normally generated from real world measurements of a planet's surface, for example Earth or Mars.