1.8. CREATING LANDSCAPE MASKS:

We’re going to use masks created from the aerial imagery to determine where our surface textures and vegetation should appear.

The Procedural Landscape Ecosystem content provides Pine forest and Birch forest surfaces, so we’ll create masks for these. The underlying surface texture we’ll use will be grass, but since we’ll assume this is ubiquitous where there aren’t forests, we don’t need to create a mask for grass.

Step 1:

Launch Photoshop and open the aerial GeoTiff file you exported from Global Mapper.

Image dimensions should be 8,129px by 8,129px, but we can see the file Global Mapper exported was 8,128px by 8,128px.

(This is because the aerial images we downloaded were in a different projection to the DTM and the pixel boundaries lay in a sligthly different place. But since the extents of the file are the same as the DTM, we can edit this in Photoshop.)

Step 2:

Scale the Canvas in Photoshop to the correct size:

  • On the main menu, select: ‘Image’ > ‘Image Size…’
  • Edit the width and height values to 8,129 pixels.
  • Click ‘OK’ to apply the changes.
Step 3:

Save the resized aerial image as a .png file:

  • ‘File’ > ‘Save As…’
  • Change ‘Save as type:’ to PNG (*.PNG; *.PNG)
  • Save it in the same folder as the GeoTiff version.
Step 4:

Select pine trees in the aerial image:

(This step is a bit of an approximation since we’re assuming pine trees are all broadly the same colour in the aerial image, but the results are actually quite effective.)

  • Select Photoshop’s ‘Magic Wand’ tool.
  • Edit the tool’s settings at the top of the window (shown below).
  • Zoom into the aerial image and click on a pine tree.

Depending on your aerial image, you may need to fiddle a little with the ‘Tolerance’ to make sure you’re selecting the features you want and not those you don’t.

You should see something like this:

Step 5:

Create a mask from the selection:

  • Create 2 new layers for the image.
  • Change the foreground colour to white.
  • Change the background colour to black.
  • Select the top-most layer and fill the ‘Magic Wand’ selection with white (<alt> + <delete>)
  • Deselect everything (<alt> + <D>)
  • Choose the lower of the two new layers and fill it with black (<ctrl> + <delete>).

The results should looks something like this:

Step 6:

Merge the black and white layers into a single layer.

  • Select the new layers (<ctrl> + <left-click> to select both)
  • <Right-click> on the two selected layers in the ‘Layers’ panel and select ‘Merge Layers’.
  • Rename the new layer ‘PineForest’.
Step 7:

Repeat this process for the Birch forest:

  • Hide the ‘PineForest’ layer and select the aerial layer (‘Background’).
  • Zoom in to the aerial.
  • Using the ‘Magic Wand’ tool, click on a birch tree. (Fiddle with tool settings as appropriate.)
  • Create 2 new layers.
  • Set foreground colour to white, background colour to black.
  • Fill the selection white (<alt> + <delete>) for the top-most layer.
  • Deselect (<ctrl> + <D>)
  • Select the lower layer and fill it black.
  • Select both layers and merge.
  • Rename the new layer ‘BirchForest’.
Step 8:

Finally we need to save the masks as separate .png files.

To save the pine forest mask:

  • Hide the ‘BirchForest’ layer.
  • ‘File’ > ‘Save As…’
  • Change ‘Save as type’ to ‘PNG’
  • Give it a useful filename and save to your exports folder.

To save the birch forest mask:

  • Hide the ‘PineForest’ layer.
  • ‘File’ > ‘Save As…’
  • Change ‘Save as type’ to ‘PNG’
  • Give it a useful filename and save to your exports folder.