Terrain Layer Blending into Objects

Overview

This feature creates a soft transition between terrain materials and objects (e.g. rocks or tree trunks), which makes for a much more natural look. It hides the artificial looking hard edge between objects and the terrain.

Implementation

  1. Select the terrain material in the Material Editor

    You can use the Pick Material From Object button in the Material Editor to pick the material from the scene.

  2. Enable Soft Depth Test in the Shader Generation Params.
  3. Tweak the amount of blending with Soft Depth Test Distance Ratio and Soft Depth Test Range.

CVars

Cvar/Command

Description

Comment and examples

e_TerrainBlendingDebug 0Only blend objects that have FOB_ALLOW_TERRAIN_LAYER_BLEND setdefault
e_TerrainBlendingDebug 1Disable blending on all objects
e_TerrainBlendingDebug 2Enable blending on all objects