Using Terrain Shaders

In the previous lesson, we were introduced to the structure of raster data and we learned that its visual characteristics are determined by values associated with individual pixels. In the examples we worked with, the values in question were a combination of red, green, and blue, which applied the appropriate colors to the pixel array. In this lesson, we will continue to work with raster data but in a different form. Instead of each pixel having a specific color they will be attributed with an elevation value, the representation of which is chosen from a list of available shaders.

Terrain data can be accessed using Global Mapper’s online sources dialog box, with both U.S. and worldwide datasets available. Alternatively, high-resolution terrain layers can be created from lidar or other point cloud layers.

In this lesson, we will begin by looking at the unique characteristics of elevation data, including the terrain-specific layer options that are available in Global Mapper. We will then introduce some of the built-in shaders that are available before wrapping up this section by creating a custom shader.

Load the following terrain layer and follow along with this video as the instructor explores some of Global Mapper’s terrain settings and visualization options: *Intro to Global MapperDataTerrainBlack Mountain Terrain.gmg

Creating a Custom Shader

As we saw in the preceding video, Global Mapper offers numerous built-in terrain shader options. In this exercise, we will add to this list by creating our own custom shader.

  1. If necessary, load the following terrain layer: *Intro to Global MapperDataTerrainBlack Mountain Terrain.gmg
  2. From the Shader dropdown list, choose Add Custom Shader…
  3. In the resulting Custom Shader dialog box, apply the following settings:
    • Name: Earthtone Shader
    • Blend Colors Between Elevation/Slope Values: Check this box
    • Scale Shader to Loaded Elevation Values: Check this box

      As mentioned in the preceding video, this creates a scaled shader in which the colors are applied across the range of elevations in the loaded terrain data. If this box is left unchecked, the selected colors will be applied to specific elevation values, as was seen with the Global Shader.

  4. In the center of the dialog box, enter a value of 1 meter in the Height/Slope field and click the adjacent Add button.
    As noted above, the value of 1 meter is not an actual elevation in this case but is the first value in a relative scale from 1 to 5.
  5. When prompted to assign a color, type the following RGB values:
    • Red: 220
    • Green: 220
    • Blue: 200
  6. Click the OK button
  7. Repeat steps 4, 5, and 6 four more times, applying the following Height/Slope and RGB values:
    • Height/Slope: 2
      RGB: 160, 150, 100
    • Height/Slope: 3
      RGB: 100, 130, 70
    • Height/Slope: 4
      RGB: 160, 180, 140
    • Height/Slope: 5
      RGB: 255, 255, 255
  8. When finished assigning the values and colors, click the OK button and the new shader is automatically applied to the terrain display

Custom shaders are permanently added to the Shader dropdown list in the toolbar. To remove or edit them, open the Configuration dialog box, choose Shader Options, and select the shader name from the Custom Shaders dropdown list. Click the adjacent Edit or Delete buttons as necessary.

Summary

  • Global Mapper includes several pre-installed shaders that provide differing representations of the terrain
  • The Dynamic Hill Shading tool can be used to modify the shadows and texture of the terrain display
  • The ability to create a custom shader offers unlimited options for terrain colorization
  • Click here for more information