Requirements
Any image (except 32-bit images) can be manipulated with Terrain Shader. However, only images with elevation data can have its elevation values mapped to a color ramp or gradient. Images that do not have elevation data has its values stretched to a percentage of the color gradient. Terrain Shader is not available for images in Duotone or Bitmap color modes.
Apply Color Map and Shaded Relief 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 color maps and shaded relief 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
Colorization Schema
Click the Colorization Schema check box to enable its two main options: 1) Apply Color Map and 2) Apply Overlay Document.
Apply Colour Map
There are two available methods to apply a color map: Stretch gradient along image's DEM schema and use a preset color map. Choose Stretch gradient along image’s DEM schema to extend the color gradient to the minimum and maximum values of the DEM schema. Choose a color gradient in the drop-down list to map it to the DEM schema. The Color Gradient to Elevation map to the left of the Preview Image updates to show how the color schema is stretched.
Choose Use preset color map to use only the colors specified in the gradient that fall within the range of the DEM schema. This does not stretch the color gradient to the minimum and maximum values of the schema. Choose a color gradient in the drop-down list to map it to the DEM schema. The Color Gradient to Elevation map to the left of the Preview Image updates to show how the color schema is stretched.
Precision
Terrain Shader has a precision setting that affects how colors 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 layer at the cost of slightly lower precision. A Higher precision setting creates a colorized raster layer and a shaded relief 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 color gradient between color 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 colorization layer when multiple DEM layers are present. When unchecked, each DEM layer will have its own colorization layer.
Edit Selected Color Map
Click the Edit Selected Color Map button to edit how the color gradient stops and elevations are positioned. At the top of the Edit Color Map dialog box, the current gradient and color stops in it are displayed.
Edit a Color Stop
The color map table shows how each color stop is mapped to a corresponding elevation value. To adjust the position of the color stop, click and slide it left or right. When a color stop is adjusted, the respective Elevation and Position values in the color map table are updated. Similarly, changes made directly to the color map table are reflected in the gradient color 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 color of a colour stop, double-click either the colour stop itself or the color square in the corresponding row in the color map table. A selected color stop is highlighted in the table and is designated by a black triangle in the gradient. In the Select Color for Color Stop dialog box, use the options available to choose a basic or custom color.
Use Continuous Color
The Use Continuous Color option smooths the color gradient between color 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 color stops that are mapped to the elevation. When a specified color stop is not within the elevation range, the text is grayed out in the table (but can still be edited) and the color 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 color stops and stretches them to the new specified range. The color stops maintain their relative position in the color map. However, when a specified color stop exceeds a position value greater than 100%, the text is grayed out in the table (but can still be edited) and the color stop itself is not shown in the gradient. If needed, edit the Position value so that it is less than 100%.
Add a Color Stop
Click the Add Color Stop button to add a color stop to the gradient. In the Select Color for Color Stop dialog box, use the options available to choose a basic or custom color. After a color stop is added, adjust its position by sliding it left or right in the gradient bar.
Delete a Color Stop
Click a color-stop (in the gradient or color map table) to select it and click the Delete Color Stop button.
Clear Color Stops
Click the Clear Color Stops button to remove all color stops. A confirmation warning appears to confirm your decision.
Reset Color Stops
Click the Reset Color Stops button to reset all color stops to how they were when the Edit Color 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 Color Map
Click the Save button to save the color map. There are two options to save the color map: update the base color map or save it as a new color map. Specify a color map name if saving as a new color map. The new color map will appear in the Color Map drop-down list. When updating a base color map without saving it as a new color map, it will appear as (1) Custom: [color map name].
Delete Color Map
Choose a color map from the Color Map drop-down list and click the Delete Color Map button to remove it.
Import Color Map from File
Adobe Photoshop gradient and color map files can be imported as GRD and XML files. Click the Import Color Map From File button to open the dialog box and navigate to gradient or color map files to import. The details of the color map are opened before import. Choose a gradient from Color Map drop-down when multiple gradients and color map files are being imported at the same time. Hover over the color stops to see its position and color space values. The color stops can't be adjusted, however, the gradient name can be edited. Click the Import button to only import the current gradient or color map. Click the Import All button to import multiple files at once.
Export Color Map to File
Adobe Photoshop gradient and color 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 color stops. Instead, the XML exported from Geographic Imager will contain all the information of the color stops elevation and color settings. Click the Export Color Map to File button and choose one of the following:
To XML File |
Exports the selection in the Color Map drop-down list to an XML file |
All to XML File |
Exports the entire Color Map drop-down list to an XML file |
To Photoshop Gradient |
Adds the selection to the Color 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 Shaded Relief
Ensure the Apply Shaded Relief check box is checked (unchecked by default). Shaded relief can be applied whether Colorization 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 are 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 color map, the Adobe Photoshop color 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 layer for the shaded relief in the Adobe Photoshop Layers panel. They can be hidden to reveal only the color map, the shaded relief 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
Color mode compatibility
Terrain Shader is not supported with the following Adobe Photoshop color modes:
- Bitmap
- Duotone
- Indexed Color
- Multichannel
Applying color to images that do not contain elevation data
Color 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 color maps will work correctly. For example, an image that may use white (which is often the highest value) to represent low value areas, Geographic Imager and Adobe Photoshop will incorrectly apply color corresponding to the highest value to such areas. To prevent this from happening, use images converted by Geographic Imager.
Color map and DEM schema folder locations
Default color maps are stored in ColorMappings.xml in the following folder:
Windows: C:\Program Files\Avenza\Geographic Imager\Color Mappings
Mac: /Avenza/Geographic Imager/Georaphic Imager Plug-in/Color Mappings
Custom color 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.