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.
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.
#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.
- Meshes read the cache with the Runtime Virtual Texture Sample expression, which "takes in the assigned RVT Asset to sample" (Unreal Engine 5.8 documentation: Runtime Virtual Texturing in Unreal Engine).
- "Any Actor sampling from or writing to the Runtime Virtual Texture must be within the RVT Volume's bounds" (Unreal Engine documentation: Runtime Virtual Texturing Quick Start in…).
- Roads and decal-like meshes can write into the RVT. Epic's example is "a Landscape spline rendering a road mesh and material should write to the RVT to apply its material along the spline" (Unreal Engine 5.8 documentation: Runtime Virtual Texturing in Unreal Engine). See spline meshes: roads, pipes and cables.
- A World Height RVT "stores a height value", normalised between the volume's minimum and maximum Z (Unreal Engine 5.8 documentation: Runtime Virtual Texturing in Unreal Engine). Epic does not tie it to blending. One way to use it is to compare it with a pixel's own world height to build the fade mask.
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.
#Distance-field and depth-based blends
Instead of painting a mask, the shader can compute how close each pixel is to the ground.
- Distance fields. On the Battlefront thread, Olmo describes an Unreal terrain-blending tool inspired by Battlefront that uses distance field functionality (Polycount: Battlefront's Level Construction - how can…). Unreal's mesh distance fields cover only Static Meshes, Instanced Static Meshes, foliage and landscape heightfields, and "the Global Distance Field is a low-resolution Distance Field" (Unreal Engine documentation: Mesh Distance Fields in Unreal Engine), so blends built on it are soft and approximate.
- Pixel depth offset. Unreal's 4.27 documentation shows pixel depth offset with the DitherTemporalAA function blending "the ground with the object intersecting it using a stipple pattern texture" (Unreal Engine 4.27 documentation: Material Inputs). leleuxart suggests this can approximate Battlefront's soft blend (Polycount: Battlefront's Level Construction - how can…).
- Depth comparison. Mirbobo asked on the same thread whether a depth blend would be too expensive (Polycount: Battlefront's Level Construction - how can…); in Unity, users of the PDO thread discuss depth output for terrain blending and note that URP Shader Graph lacks it (Unity Discussions: Depth output for shader graph -> PDO (Pixel…).
#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…).
- Create an RVT asset in the Content Browser.
- 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…).
- 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…).
- 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…).
- 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).
- 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.
- Blend. Lerp base colour, roughness and normal from the RVT result to the rock's own material using the mask.
- 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
- The Last of Us Part I (Naughty Dog, 2022). Jared Sobotta's breakdown shows terrain geometry with prototype meshes and instanced rocks placed on top, and lists "blend work" among his tasks (ArtStation: Erosion Breakdown). In the landslide channels, he "used the height map to displace the terrain and create a new mesh" when texture alone could not show the erosion (ArtStation: Erosion Breakdown).
- Disintegration (V1 Interactive, 2020). World-aligned materials and terrain sections blended in the material (80 Level: Working on Game Vistas for Disintegration in…).
- Star Wars Battlefront (DICE, 2015). Artists attribute its blends to a shared world-space ground material, detail maps and matched vertex normals (Polycount: Battlefront's Level Construction - how can…). This is outside analysis, not a DICE breakdown.
#In different tools
- Unreal Engine 5: runtime virtual textures (Unreal Engine 5.8 documentation: Runtime Virtual Texturing in Unreal Engine), pixel depth offset with dithering (Unreal Engine 4.27 documentation: Material Inputs), distance fields (Unreal Engine documentation: Mesh Distance Fields in Unreal Engine), world-aligned material functions.
- Unity HDRP: has a Depth Offset output in Shader Graph; URP Shader Graph does not, according to users in 2023–2025, and Amplify Shader Editor offers depth output for URP and built-in shaders (Unity Discussions: Depth output for shader graph -> PDO (Pixel…).
- Any engine: world-space or triplanar ground materials, vertex-painted masks and matched normals need no special engine features.
#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
- · Unreal Engine - Runtime Virtual Texture - Case Study · ArtStation, 2020 · web · accessed 2026-10-22
- · Battlefront's Level Construction - how can everything just sort of match and blend? · Polycount · forum · accessed 2026-10-22
- · Working on Game Vistas for Disintegration in UE4 · 80 Level, 2020 · article · accessed 2026-10-22
- · Triplanar Projection - Shader Graph Basics - Episode 28 · YouTube · video · accessed 2026-10-22
- · Detailed Texture Blending with Height Lerp & Vertex Painting | Unreal Engine Materials · YouTube · video · accessed 2026-10-22
- · Runtime Virtual Texturing in Unreal Engine · Unreal Engine 5.8 documentation · docs · accessed 2026-10-22
- · Runtime Virtual Texturing Quick Start in Unreal Engine · Unreal Engine documentation · docs · accessed 2026-10-22
- · Mesh Distance Fields in Unreal Engine · Unreal Engine documentation · docs · accessed 2026-10-22
- · Material Inputs (Pixel Depth Offset) · Unreal Engine 4.27 documentation · docs · accessed 2026-10-22
- · Depth output for shader graph -> PDO (Pixel Depth Offset) -> terrain blending -> billboard shadows · Unity Discussions, 2023 · forum · accessed 2026-10-22
- · Erosion Breakdown · ArtStation, 2023 · web · accessed 2026-10-22
Pages that link here
- Skirts (terrain and blend skirts) Key term
- Spline meshes: roads, pipes and cables Topic
- Pixel depth offset Key term
Last updated 2026-10-22