1.10. SURFACES & VEGETATION

Whilst we’re using a procedural method for surface texturing and vegetation, we still need to define where they will appear using GIS data. This section describes how to apply the layer masks and perform basic set up of the Procedural Landscape Ecosystem.

Step 1:

Import layer mask for the pine forest.

  • <Right-click> the ‘Pine_forest_a’ layer on the ‘Paint’ tab of the ‘Landscape’ mode.
  • Select ‘Import from File’.
  • In the broswer window that appears, select the PNG mask for the pine forest.
  • Click ‘Open’
Step 2:

Import the layer mask for the birch forest:

  • <Right-click> the ‘Birch_forest_a’ layer on the ‘Paint’ tab of the ‘Landscape’ mode.
  • Select ‘Import from File’.
  • Select the PNG mask for the birch forest.
  • Click ‘Open’.
Step 3:

Turn on Procedural Foliage:

Now we’ve defined where the different surfaces should appear, we need to set up the vegetation. Since procedural foliage is experimental in UE4, the first thing we need to do is activate it in the Unreal Editor:

  • ‘Edit’ > ‘Editor Preferences…’
  • Click ‘Experimental’ in the ‘General’ section.
  • Check ‘Procedural Foliage’ to enable it.
Step 4:

Apply Procedural Landscape Ecosystem’s foliage spawners to the landscape:

  • Navigate to the ‘Ecosystem’ folder in the ‘Procedural_Ecosystem’ add-on.
  • Select all 3 spawners and drag them into the editor viewport.
Step 5:

Move the spawners to the centre of the landscape:

  • Select all 3 spawners (we can move them all together).
  • The landscape’s dimensions are 8,129m by 8,129m by 562.406m.
  • Since it’s origin is at 0,0,944.927 (in metres) the centre of the landscape sits at X=4,064.5m, Y=4,064.5m, Z=944.927 – (562.406/2) = 663.724m.
  • Remember the units in UE4 are set to cm, so we need to move the spawners to X=406450, Y=406450, Z=66372.4.
  • Put these numbers into the ‘Location’ parameter boxes.

[NOTE: Recall the height range of our DTM is 562.406m]

Step 6:

Scale the spawners to fit the landscape:

  • Keep all 3 spawners selected.
  • The default size of the spawners is 2m x 2m x 2m (length x width x height).
  • To fit our landscape we need them to be 8,129m x 8,129m x 562.406m.
  • Our scale sizes therefore need to be X=4064.50, Y=4064.50, Z=281.203.
  • Enter these into the ‘Scale’ parameter boxes.
Step 7:

Run the spawners to generate the vegetation:

  • Keep all 3 spawners selected.
  • Scroll down the ‘Details’ panel to the ‘Procedural Foliage’ section and de-select ‘Allow Static Mesh’.
  • Click ‘Resimulate’ to run the spawners.
  • It may take some time to run the vegetation spawners, depending on your system’s specification.