Course contentsShow
← Unreal Engine Game Development
Lesson 798 of 88011. Performance Profiling and OptimizationFree lesson

Utilizing Virtual Texturing for Large Landscapes

Enable Runtime Virtual Texturing to render high-fidelity landscape surfaces without exceeding the physical memory limits of the GPU.

In this lesson, you will learn how to leverage Runtime Virtual Texturing (RVT) to render expansive, high-fidelity landscape surfaces while keeping your GPU’s physical memory consumption strictly under control.

The Problem: Texture Bloat

When working with large, open-world landscapes, the sheer volume of high-resolution textures required for blending materials (like sand, grass, and rock) can quickly exceed your GPU's Texture Streaming Pool. If you attempt to load every unique layer into VRAM simultaneously, you will hit memory bottlenecks, causing hitching and texture pop-in as the engine struggles to keep up with swapping data.

The Solution: Runtime Virtual Texturing

RVT solves this by caching the complex shader output of your landscape into a set of fixed-size, "virtualized" textures at runtime. Instead of the GPU evaluating dozens of complex material layers for every pixel on the screen, it samples a pre-rendered, flattened representation of your terrain.

To implement this, you perform a two-step process:

  1. Setup the Virtual Texture Volume: Place a RuntimeVirtualTextureVolume actor in your level to define the physical world bounds that will be captured.
  2. Configure the Material: In your Landscape Material, you must use the RuntimeVirtualTextureOutput node. This instructs the engine to "bake" the base color, normal, and roughness data into the virtual texture cache.

Inside your material graph, you would replace expensive calculations with an RuntimeVirtualTextureSample node:

// Logic flow for sampled output
TextureSample (RVT_Cache_Object) -> BaseColor, Normal, Roughness

Because the RVT caches the final look of your landscape, the GPU only needs to read a few textures rather than executing a massive chain of texture blends and math expressions across the entire terrain. This significantly reduces the memory overhead because you are no longer storing the raw, uncompressed source layers for the entire landscape surface in VRAM. Instead, you manage a predictable, fixed-size cache that scales gracefully regardless of the terrain’s complexity.

Key Takeaway: By using Runtime Virtual Texturing, you shift the burden from real-time material computation to a cached texture process, allowing you to render massive, detailed landscapes while maintaining a stable and efficient GPU memory footprint.