Requirements
Any image (except 32-bit images) can be manipulated with Terrain Shader. However, only images with elevation data can have their elevation values mapped to a colour ramp or gradient. Images that do not have elevation data have their values stretched to a percentage of the colour gradient. Terrain Shader is not available for images in Duotone or Bitmap colour modes.
Apply Colour Map and Shaded Relief/Texture Shading Only to Selection
It is possible to apply Terrain Shader only to a selection on the image. Before opening the Terrain Shader dialog box, use any of the Adobe Photoshop selection tools (Marquee tool, Lasso tool, Magic Wand tool or Quick Selection tool) to create a selection (or multiple selections of the same layer). Open the Terrain Shader dialog box and make sure the Apply to selection only check box is checked. If the option was unchecked, checking it will display a warning message that indicates only colour maps and shaded relief/texture shading will be applied to the selected area even though the preview doesn't show it.
Terrain Shader Dialog Box
With an opened image, click the Terrain Shader button in the Geographic Imager panel to open the Terrain Shader dialog box.
Terrain Shader button
Colourization Schema
Click the Colourization Schema check box to enable its two main options: 1) Apply Colour Map and 2) Apply Overlay Document.
Apply Colour Map
There are two available methods to apply a colour map: Stretch gradient along image's DEM schema and use a preset colour map. Choose Stretch gradient along image’s DEM schema to extend the colour gradient to the minimum and maximum values of the DEM schema. Choose a colour gradient in the drop-down list to map it to the DEM schema. The Colour Gradient to Elevation map to the left of the Preview Image updates to show how the colour schema is stretched.
Choose Use preset colour map to use only the colours specified in the gradient that fall within the range of the DEM schema. This does not stretch the colour gradient to the minimum and maximum values of the schema. Choose a colour gradient in the drop-down list to map it to the DEM schema. The Colour Gradient to Elevation map to the left of the Preview Image updates to show how the colour schema is stretched.
Precision
Terrain Shader has a precision setting that affects how colours are mapped to a DEM. The precision value is listed in the drop-down list (e.g. 0.3 m). A Regular precision setting quickly creates an Adobe Photoshop adjustment layer and a shaded relief/texture shading layer at the cost of slightly lower precision. A Higher precision setting creates a colourized raster layer and a shaded relief/texture shading layer, however, this process uses more memory and takes longer to calculate.
The DEM precision (displayed in the Import DEM File dialog box) is different than the precision used in the Terrain Shader dialog box.
Use Continuous Colour
The Use Continuous Colour option smooths the colour gradient between colour stops.
Use Discrete Colours
The Use Discrete Colours option classifies pixels to the specified colours only. It also allows you to specify whether the colour stop values should be treated as the minimum or maximum value of each class.
Create Single Layer
The Create Single Layer option is enabled by default when the Higher Precision setting is chosen. When checked, it creates a single colourization layer when multiple DEM layers are present. When unchecked, each DEM layer will have its own colourization layer.
Edit Selected Colour Map
Click the Edit Selected Colour Map button to edit how the colour gradient stops and elevations are positioned. At the top of the Edit Colour Map dialog box, the current gradient and colour stops in it are displayed.
Edit a Colour Stop
The colour map table shows how each colour stop is mapped to a corresponding elevation value. To adjust the position of the colour stop, click and slide it left or right. When a colour stop is adjusted, the respective Elevation and Position values in the colour map table are updated. Similarly, changes made directly to the colour map table are reflected in the gradient colour stop. The changes can be viewed in real-time when the Update preview image in the Terrain Shader dialog option is checked.
To edit the colour of a colour stop, double-click either the colour stop itself or the colour square in the corresponding row in the colour map table. A selected colour stop is highlighted in the table and is designated by a black triangle in the gradient. In the Select Colour for Colour Stop dialog box, use the options available to choose a basic or custom colour.
Use Continuous Colour
The Use Continuous Colour option smooths the colour gradient between colour stops.
Use Discrete Colours
The Use Discrete Colours option classifies pixels to the specified colours only. It also allows you to specify whether the colour stop values should be treated as the minimum or maximum value of each class.
Adjust Low and High Elevation values
Specify new values in the Low and High Elevation boxes. Changing these values will alter the relative position (in percentage) for all colour stops that are mapped to the elevation. When a specified colour stop is not within the elevation range, the text is grayed out in the table (but can still be edited) and the colour stop itself is not shown in the gradient (negative position value). If needed, edit the Elevation value to set it within range or set a positive Position value.
Stretch Elevation Range
Click the Stretch Elevation Range button to specify new elevation range values. This is applied to all colour stops and stretches them to the new specified range. The colour stops maintain their relative position in the colour map. However, when a specified colour stop exceeds a position value greater than 100%, the text is grayed out in the table (but can still be edited) and the colour stop itself is not shown in the gradient. If needed, edit the Position value so that it is less than 100%.
Add a Colour Stop
Click the Add Colour Stop button to add a colour stop to the gradient. In the Select Colour for Colour Stop dialog box, use the options available to choose a basic or custom colour. After a colour stop is added, adjust its position by sliding it left or right in the gradient bar.
Delete a Colour Stop
Click a colour-stop (in the gradient or colour map table) to select it and click the Delete Colour Stop button.
Clear Colour Stops
Click the Clear Colour Stops button to remove all colour stops. A confirmation warning appears to confirm your decision.
Reset Colour Stops
Click the Reset Colour Stops button to reset all colour stops to how they were when the Edit Colour Map dialog box was first opened. This is particularly useful in situations where you may want to return to the original settings without closing the dialog box. A confirmation warning appears to confirm your decision.
Save Colour Map
Click the Save button to save the colour map. There are two options to save the colour map: update the base colour map or save it as a new colour map. Specify a colour map name if saving as a new colour map. The new colour map will appear in the Colour Map drop-down list. When updating a base colour map without saving it as a new colour map, it will appear as (1) Custom: [colour map name].
Delete Colour Map
Choose a colour map from the Colour Map drop-down list and click the Delete Colour Map button to remove it.
Import Colour Map from File
Adobe Photoshop gradient and colour map files can be imported as GRD and XML files. Click the Import Colour Map From File button to open the dialog box and navigate to gradient or colour map files to import. The details of the colour map are opened before import. Choose a gradient from Colour Map drop-down when multiple gradients and colour map files are being imported at the same time. Hover over the colour stops to see its position and colour space values. The colour stops can't be adjusted, however, the gradient name can be edited. Click the Import button to only import the current gradient or colour map. Click the Import All button to import multiple files at once.
Export Colour Map to File
Adobe Photoshop gradient and colour map files can be exported as GRD and XML files. An Adobe Photoshop GRD file will have its gradient automatically stretched to the image’s DEM schema, however, will not contain elevation values for colour stops. Instead, the XML exported from Geographic Imager will contain all the information of the colour stops elevation and colour settings. Click the Export Colour Map to File button and choose one of the following:
To XML File |
Exports the selection in the Colour Map drop-down list to an XML file |
All to XML File |
Exports the entire Colour Map drop-down list to an XML file |
To Photoshop Gradient |
Adds the selection to the Colour Map drop-down list |
A sample that shows the structure of the XML file:
Apply Overlay Image
The Apply Overlay Image option overlays another open document above the current elevation data. The overlay must be in the same coordinate system and pixel size as the image Terrain Shader is being applied to. The overlay image is added as a layer above the DEM in the Layers panel. The Blending Mode allows users to adjust how to overlay the image based on Photoshop's native blending settings.
Apply Relief
Click the Apply Relief check box to enable its two options: 1) Apply Texture Shading and 2) Apply Shaded Relief.
Click the Disable Relief Preview check box to hide the relief in the preview image.
Apply Texture Shading
Ensure the Apply Texture Shading checkbox is checked (unchecked by default). Texture shading can be applied whether Colourization Schema is enabled or disabled. The preview image is immediately updated to reflect the Brightness, Contrast and Detail settings.
The Brightness setting controls the midtone brightness of the created texture shade. Setting a higher value here will create a brighter texture shade, and setting a lower value will create a darker texture shade.
The Contrast setting controls the amount of contrast that will be visible in the created texture shade. Setting a higher value here will increase contrast in the midtones (smaller terrain features) but may result in detail being lost for the brightest and darkest features of the DEM (i.e. the highest ridges and the lowest valleys).
The Detail setting controls the amount of texture shading that will be applied to the DEM. Setting a higher value here will place more emphasis on enhancing the finer terrain details of the DEM all the while placing less of an emphasis on the larger terrain features and overall elevation trends throughout the DEM.
Texture Shading is disabled for images that are in a geodetic coordinate system or for images without an assigned coordinate system.
Apply Shaded Relief
Ensure the Apply Shaded Relief check box is checked (unchecked by default). Shaded relief can be applied whether Colourization Schema is enabled or disabled. The preview image is immediately updated to reflect the Angle and Intensity settings.
The Angle setting represents the lighting angle at which the elevation is rendered. Edit the value (degrees) in the Angle box or rotate the jog dial to the right of it. Shaded relief is commonly used with an overlay document (see the main topic example). The lighting is global and affects the entire image. The default Angle setting is 45 degrees, a commonly used lighting angle.
The Intensity setting represents how soft or hard the lighting effect is. Edit the value in the Intensity box or use the slider. A lower intensity value creates a softer-looking shaded relief (below left) while a higher intensity value creates a sharper-looking shaded relief with more shadows and contrast (below right). The default Intensity value is 2; with a minimum of 0 and a maximum of 100.
Results
After successfully applying a colour map, the Adobe Photoshop colour mode will change to RGB (and will maintain the respective 8 or 16 Bits/Channel). Depending on the precision setting chosen, an adjustment layer or full raster layer will be created along with a separate shaded relief/texture shading layer in the Adobe Photoshop Layers panel. They can be hidden to reveal only the colour map, the shaded relief/texture shading or the elevation layer.
Layers when regular precision is used.
Layers when higher precision is used.
Layers after an overlay image is used.
Important Notes
Colour mode compatibility
Terrain Shader is not supported with the following Adobe Photoshop colour modes:
- Bitmap
- Duotone
- Indexed Colour
- Multichannel
Applying colour to images that do not contain elevation data
Colour maps will only work correctly if the image was converted from a DEM by Geographic Imager (or using a similar software). If an image is generated from a DEM by some method that is unknown to Geographic Imager, there is no guarantee that colour maps will work correctly. For example, if an image uses white (commonly the highest value) to represent low-value areas, Geographic Imager and Adobe Photoshop will incorrectly apply colour corresponding to the highest value to those areas. To prevent this from happening, use images converted by Geographic Imager.
Colour map and DEM schema folder locations
Default colour maps are stored in ColorMappings.xml in the following folder:
Windows: C:\Program Files\Avenza\Geographic Imager\Color Mappings
Mac: /Avenza/Geographic Imager/Geographic Imager Plug-in/Color Mappings
Custom colour maps are stored in CustomColorMappings.xml in the following folder:
Windows: C:\ProgramData\Avenza\Geographic Imager
Mac: /Avenza/Geographic Imager/Geographic Imager Plug-in
Custom DEM schemas are stored in CustomDEMSchema.xml in the following folder:
Windows: C:\ProgramData\Avenza\Geographic Imager
Mac: /Avenza/Geographic Imager/Geographic Imager Plug-in
Comments
0 comments
Please sign in to leave a comment.