Technical art
Landscape and Forest PCG
Using real-world heightmap data and setting up PCG for trees scattering
Description

Project: Personal
Instruments used: UE5, Houdini, PCG, Megascans, Substance Designer
Real-World Terrain
To create a landscape in UE5, I used SRTM data downloaded from https://apps.nationalmap.gov/. The source file is a GeoTiff with pixel values not limited to 0-1, where 1 represents only 1 meter of height. Therefore, in typical raster editors like Photoshop, the image will not appear correctly. To set the desired size and convert the GeoTiff to .png for example, it’s better to use Houdini, which has a set of nodes for working with elevation data — Terrain category.
The Houdini setup is pretty simple and has the following output settings:
  • Format = Single Channel
  • Type = 16 bit Fixed
  • In the Red Channel, select the height attribute
  • Output Range = No Remapping (since remapping was already done)
  • Specify the path, name, and .png format for the file and click Save to Disk.

For a GeoTiff that was initially 14408×14293, cropped to 8129×8129, and then resized to 14293×14293, I needed to scale it with X=177.241973, Y=177.241973 and Z = 239.71484375.
After importing into UE5, the landscape with custom layers, which I will describe below, looks like this:
After adding grass types with megascan assets:
Materials
The landscape shader I implemented was based on Ben Cloward’s tutorials, using the CRNOH approach to save texture samples: BaseColor (RGB) + Roughness (A) and NormalMap (RG) + AO (B) + Specular (B) + Height (A) in two texture samples. I downloaded the textures from Megascans and distributed them to the appropriate channels in Substance Designer.
The workflow for preparing the shader and improving the landscape in UE5 was as follows:
  1. Created a material function for unpacking textures.
  2. Created a function for each landscape material (resulting in 6 materials).
  3. Fixed Landscape Tiling.
  4. Implemented Landscape Slope Blending Material.
  5. Created an advanced Landscape Auto Material.
  6. Added Landscape Painting functionality.
  7. Worked with Grass Types.
  8. Optimized the landscape and used RVT.
  9. Worked with Landscape Splines.
PCG
Here is the final result of how the landscape looks with tree scattering using PCG.
MMSHVYREV@GMAIL.COM
+381 62 9758559
Novi Sad, Serbia
© 2024 Maksim Shvyrev
Made on
Tilda