The 3D Handbook
Topic

Blending meshes into terrain

Ways to hide the hard line where rocks, cliffs, roads and buildings meet the ground: shared world-space materials, vertex-painted transitions, runtime virtual textures, distance-field and depth-based blends, matched normals and decals at the seam.

environmentterrainmaterialsunrealblending

Mesh-to-terrain blending is any technique that hides the line where a separate mesh, such as a rock, cliff, road or building, meets the ground. Without it, the mesh looks placed on the terrain instead of growing out of it. James Field describes the goal in his UE5 case study as using virtual texturing to "blend landscape materials onto intersecting meshes" (ArtStation: Unreal Engine - Runtime Virtual Texture…).

There is no single method. Most shipped environments combine several: a shared ground material, a soft transition painted or computed at the base, matched normals, and decals or scattered debris over whatever seam is left.

#Why the intersection shows

Three things change at once where a mesh enters the terrain:

  • Texture. The mesh has its own UVs and material; the terrain has painted layers. The texture stops along a straight line.
  • Lighting. The mesh's normals point in different directions from the ground's, so the two shade differently even with the same texture.
  • Scale. A rock scaled up in the level stretches its texture, while the terrain keeps its own tiling. On the Battlefront thread, Jakro notes that the terrain object's scale affects detail-map tiling, so tiling stays consistent when objects are scaled (Polycount: Battlefront's Level Construction - how can…).

Each method below tackles one or more of these.

Notice the layering: terrain geometry, then embankment prototypes, then instanced rocks. Every layer meets the one below it and needs a blend.Jared Sobotta, via ArtStation

#Shared world-space materials

The simplest blend is to give the base of the mesh the same material as the ground, projected in world space so it lines up across the join. On the Battlefront thread, tadpole3159 says the same material appears on the mesh and the terrain, and rollin that the ground texture is in world space, "which makes blending easier" (Polycount: Battlefront's Level Construction - how can…).

On Disintegration, Tony Arechiga's vista materials were "all using world coordinate alignment nodes", so "the mesh can be rotated, scaled, and moved without the texture looking stretched or weird" (80 Level: Working on Game Vistas for Disintegration in…). The terrain itself was "a few individual sections of terrain that are blended together via the material" (80 Level: Working on Game Vistas for Disintegration in…).

World-space projection on sloped or vertical faces needs triplanar and world-aligned mapping; Ben Cloward's episode explains the projection and its blend weights (YouTube: Triplanar Projection - Shader Graph Basics…).

#Vertex-painted transitions

A mask painted into vertex colours decides where the mesh shows its own material and where it shows the ground. Combined with a height map, the transition follows the shapes of stones and cracks instead of a smooth gradient; see height blending and vertex painting and blending. Hoj Dee's tutorial builds this height-lerp and vertex-paint material in Unreal (YouTube: Detailed Texture Blending with Height Lerp &…).

Painting needs enough vertices at the base. A dedicated band of faces built for this purpose is a blend skirt.

#Runtime virtual texture blending in Unreal Engine 5

A runtime virtual texture (RVT) stores the terrain's shading in a cache that other materials can read. Epic notes that RVT "caches shading data over large areas" (Unreal Engine 5.8 documentation: Runtime Virtual Texturing in Unreal Engine). A rock material can then sample exactly what the landscape is showing at that spot, including painted layers, and fade into it near the ground.

Costs and limits: the YCoCg base colour option "comes at the cost of 25% extra memory", RVT "can be expensive for memory" when many components render to low mips, and RVT "does not support CPU or GPU-based instance culling and LOD selection for Instanced Static Meshes" (Unreal Engine 5.8 documentation: Runtime Virtual Texturing in Unreal Engine). Skinned and animated meshes are poor candidates because "RVT content is effectively a shading cache" (Unreal Engine 5.8 documentation: Runtime Virtual Texturing in Unreal Engine). See virtual texturing.

Notice the bottom of each rock: the sand colour and texture creep up the mesh, so there is no hard line where rock and ground cross.James Field, via ArtStation
Field's unlit comparison images make the blend zone easier to judge, because lighting no longer hides the seam.James Field, via ArtStation

#Distance-field and depth-based blends

Instead of painting a mask, the shader can compute how close each pixel is to the ground.

#Matched normals

Even with identical textures, a seam shows if the lighting differs. doc rob says DICE "adjust the vertex normals and tangents to match between the terrain and the terrain meshes" (Polycount: Battlefront's Level Construction - how can…). In practice this means transferring the ground's normals onto the bottom vertices of the mesh, or onto the outer ring of a skirt.

#Decals and debris at the seam

Whatever line remains can be covered. Epic's RVT quick start suggests "a Static Mesh Plane with a masked material to add decal-like details" that write into the virtual texture (Unreal Engine documentation: Runtime Virtual Texturing Quick Start in…). James Field's beach scene adds decals for pebbles and seaweed around the rocks (ArtStation: Unreal Engine - Runtime Virtual Texture…). Scattered small stones, grass and debris along the base do the same job; see decals, mesh decals and set dressing and art passes.

#Comparing the methods

Method Fixes Needs Watch out for
World-space shared material Texture, scale Triplanar or world-aligned mapping Cost of triplanar sampling
Vertex-painted transition Texture Vertices at the base; painting time Repainting after terrain changes
Runtime virtual texture Texture, colour matching UE RVT volume and setup Memory; no instance culling for ISMs (Unreal Engine 5.8 documentation)
Distance field / depth Soft edge without painting Distance fields or depth access Low resolution (Unreal Engine documentation); engine support (Unity Discussions)
Matched normals Lighting Normal transfer at the base Must be redone if the terrain changes
Decals and debris Leftover seams Decal or scatter assets Overdraw and repetition

#How to set one up

This sets up runtime virtual texture blending in Unreal Engine 5, following Epic's quick start (Unreal Engine documentation: Runtime Virtual Texturing Quick Start in…).

  1. Create an RVT asset in the Content Browser.
  2. Make the landscape material write to it. Enable Use Material Attributes, add a Runtime Virtual Texture Output node and connect the attributes to it (Unreal Engine documentation: Runtime Virtual Texturing Quick Start in…).
  3. Place an RVT Volume. Find "Runtime Virtual Texture Volume" under Volumes, assign your RVT asset, set the landscape as the Source Actor and click Set Bounds (Unreal Engine documentation: Runtime Virtual Texturing Quick Start in…).
  4. Assign the RVT to the landscape. Select the landscape and add your asset under Draw in Virtual Textures (Unreal Engine documentation: Runtime Virtual Texturing Quick Start in…).
  5. Sample it on the rock. In the rock's material, add a Runtime Virtual Texture Sample node with the same asset (Unreal Engine 5.8 documentation: Runtime Virtual Texturing in Unreal Engine).
  6. Build a mask. Make a gradient from the bottom of the rock upwards, for example a world-height difference that goes from 1 at ground level to 0 about 50 cm up, and break it up with the rock's height map.
  7. Blend. Lerp base colour, roughness and normal from the RVT result to the rock's own material using the mask.
  8. Check it unlit, as Field does in his comparison images (ArtStation: Unreal Engine - Runtime Virtual Texture…), and increase the virtual texture sample resolution if the blend looks soft up close (ArtStation: Unreal Engine - Runtime Virtual Texture…).

#Video tutorials

#Use in recent games

#In different tools

#Further reading and watching

Related pages: skirts, pixel depth offset, virtual texturing, triplanar and world-aligned mapping, height blending, vertex painting and blending, terrain and landscapes, decals.

References

  1. James Field · Unreal Engine - Runtime Virtual Texture - Case Study · ArtStation, 2020 · web · accessed 2026-10-22
  2. Polycount forum (tadpole3159, rollin, Panupat, leleuxart, Jakro, doc rob, Olmo and others) · Battlefront's Level Construction - how can everything just sort of match and blend? · Polycount · forum · accessed 2026-10-22
  3. Kirill Tokarev, interview with Tony Arechiga (V1 Interactive) · Working on Game Vistas for Disintegration in UE4 · 80 Level, 2020 · article · accessed 2026-10-22
  4. Ben Cloward · Triplanar Projection - Shader Graph Basics - Episode 28 · YouTube · video · accessed 2026-10-22
  5. Hoj Dee · Detailed Texture Blending with Height Lerp & Vertex Painting | Unreal Engine Materials · YouTube · video · accessed 2026-10-22
  6. Epic Games · Runtime Virtual Texturing in Unreal Engine · Unreal Engine 5.8 documentation · docs · accessed 2026-10-22
  7. Epic Games · Runtime Virtual Texturing Quick Start in Unreal Engine · Unreal Engine documentation · docs · accessed 2026-10-22
  8. Epic Games · Mesh Distance Fields in Unreal Engine · Unreal Engine documentation · docs · accessed 2026-10-22
  9. Epic Games · Material Inputs (Pixel Depth Offset) · Unreal Engine 4.27 documentation · docs · accessed 2026-10-22
  10. Unity Discussions (Nexusmaster, BenCloward, MajorWolph and others) · Depth output for shader graph -> PDO (Pixel Depth Offset) -> terrain blending -> billboard shadows · Unity Discussions, 2023 · forum · accessed 2026-10-22
  11. Jared Sobotta · Erosion Breakdown · ArtStation, 2023 · web · accessed 2026-10-22

Last updated 2026-10-22