Geog Image Map Shader - NODATA Tab

From Planetside Software Wiki
Jump to: navigation, search

The NODATA tab has parameters which let you replace pixels with NODATA values in the image data with another value. Pixels with NODATA values indicate areas in the image where there is missing or invalid data. The NODATA tab parameters let you replace these with a colour, a value or make them transparent.

When an image is loaded TG tries to do it in a manner which uses the least memory resources, by matching the internal image format as closely as possible to the image file. However replacing NODATA pixels may require that the internal image format takes up a lot more memory. As an example, let's say that the image file is an 8 bit greyscale paletted/indexed image. If you chose to replace NODATA pixels and make them transparent then TG would need to change the internal image format from 8 bit to 32 bit RGBA, quadrupling the amount of memory used. As geospatial images can be very large it is worth keeping this in mind if you don't have a lot of memory available.

You can check if an image has any NODATA values by looking at the Raster and Projection Info field on the Info tab.


  • Replace NODATA values: Check this to replace NODATA pixels in the image. You should be aware that this can take some time with large images, as the image data has to be reloaded. You might find it more efficient to first set up the replacement values with the parameters below and then check this checkbox. It will save you having to immediately update the image data after making the changes.
  • Replace with colour: Check this to replace NODATA pixels with a colour.

  • NODATA colour value: This lets you choose the colour NODATA pixels are replaced with. If the image is indexed/paletted greyscale the luminance of this colour is used as a greyscale value.

  • NODATA alpha value: This sets the alpha value for replacement colour. You can use values from 0 (fully transparent) to 1 (fully opaque). Note that this may change the internal image to RGBA if you specify a value other than 1.

  • Replace colour mode: This popup lets you choose how NODATA pixels are replaced. It has these options:

    • Channel by channel: This option replaces the NODATA values on a channel by channel basis. Lets say your image has R, G and B channels. A particular pixel has a NODATA value in its R channel but valid data in the G and B channels. In this case the node will take the R value from the NODATA colour value and replace the R channel of the pixel but leave the G and B channels unchanged.
    • Any channel: This option replaces the entire pixel if any channel has a NODATA value. Again we'll use the example of a pixel that has a NODATA value in its R channel but valid data in the G and B channels. With this option the pixel is entirely replaced using the NODATA colour value, even though the G and B channels have valid data.

  • Replace with scalar: Check this to replace NODATA values with a scalar value. This always operates on a channel by channel basis. If only one channel of an image pixel has a NODATA value then only that channel is replaced.

  • NODATA scalar value: This is the scalar value used for NODATA replacement.

  • Make NODATA transparent: Check this to make any NODATA values completely transparent. If any channel of a pixel has a NODATA value the pixel is made fully transparent. Please be aware using this setting means images will be expanded to RGBA, potentially increasing memory usage.

  • Update button: Click this button to update the image when you change any of the NODATA replacement parameters. This is not done automatically as you make changes as it can be a time consuming process with large images.

Back to: Geog Image Map Shader

This is essentially the brightness of the colour. Terragen converts RGB colours to greyscale by taking the luminance of the colour.

A single element of an image which describes values for color and/or intensity, depending on the color system which the image uses. Groups of ordered pixels together form a raster image.

A scalar is a single number. 1, 200.45, -45, -0.2 are all examples of scalar values.