Its been a while since i last did a full landscape in UE (actually, back then it was UDK) so i decided it was time to dust off World Machine and get cracking. Some reference images for what i am going for:
The main purpose of this is to create a realistic large scale environment with good close up detail that also runs good enough for normal gameplay.
I started with a 8k (8129x8129) landscape that covers 8km. Generated some maps like erosion, wetness, roughness, etc. from WM and started to build the master material in UE4. I knew that i didn't want to paint the landscape by hand in any way so i decided to go with a function based material as opposed to using Landscape Layers.
The master material consists of multiple material functions that are blended together based off multiple factors. In most cases its a height blend between 2 mat functions with a slope factor. But there are special cases - like snow - where a map exported from WM dictates where snow has accumulated and not yet melted completely (based on sun position). Other materials are blended by world Z position, like the lake bed and shore. Also, all layers use a randomness texture to break up repetition or to add macro variation to unnatural "straight" blends (for example when using world pos blend). At a distance, a simplified material function is used in order to remove visible tiling and also for performance reasons.
I tested both tessellation and POM and decided to go with POM since the performance was better. However, i might try tessellation again at a later point in time, depending on how much optimization i can do in other areas.
Imported terrain textures from Megascans and some foliage from one of the Project Nature free marketplace pack.
I used the Grass function to spawn the foliage, rocks, debris. The trees and grass models are pretty well done and very optimized so not a lot of tweaking was involved. Just changed the lod distance and modified the imposter material a bit to give it a fake ambient occlusion.
The lake material uses spiral blur to add blurriness in the water and has varying opacity based on depth and fresnel.
Lighting is baked for the landscape but due to the dynamic nature of the foliage, cascaded shadows are also used and helped out by contact shadows.
Everything is pretty much WIP and might change a lot during this process.