Landscape Caching
How to setup and use RVTs to improve performance
Last updated
How to setup and use RVTs to improve performance
Last updated
Virtual Texture Support needs to be enabled in your project.
See Installation for info on how to set them up.
For UE5 users with Instances created on version 1.1.2 or lower: You need to edit your Master like this to have working Caching !
This is fixed on all new Masters created with the 1.1.3 version or higher.
Add a "BreakoutFloat3Components" node, plug the Opacity channel into it and set the R output to the "add" node (Instead of directly having the Opacity into it.)
First, Create 2 Virtual Textures.
Set them both like this, and in "Virtual Texture content" one set up to "Base Color, Specular, Roughness, Normal" and the other to "World Height".
Then, place 2 Runtime Virtual Texture Volumes in your world. In the Details panle, look for "Bounds Align Actor" and select your Landscape for both of them and click "Get Bounds" on each.
Set in "Virtual Texture" one of the virtual textures for each of them. In the end one of the volumes will have the Height VT, the other the standard VT.
Click on your landscape, and in the details panel search for "Draw in Virtual Textures". Add the 2 Virtual Textures into it.
If you use UE5, Select the Landscape and ALL its Streaming Proxies, and set the VTs into all of their "Draw in Virtual Textures" slot !
Finally, In the Builder interface, enable the use of Virtual Texturing caching in the Global options (or by clicking the red Caching OFF button.)
Your landscape will now be black. If it dosen't change anything, your Vitual Textures may be disabled.
Then, go in your Global Settings in the Caching options. Click on the thumbnail to select your virtual texture with the "Base Color, Specular, Normal, Roughness" option selected. (In our case, the RVT_Normal).
Done ! Now your Instance can use Virtual Texture Caching to improve performance !
Caching works by setting the Instance fully static. But, some features do not work when cached. So, you can tick the "Exclude from Caching" option in the Material settings to keep a Sub-Layer uncached.
These features cannot work when cached :
Parallax Occlusion Mapping
Distance-Based UV Scaling
Tessellation-based Displacement
However, other material features are taken into the caching when enabled and are as such free :
Triplanar Mapping
UV Tiling Variance
Uncaching a Layer has a great impact on shader complexity.
Even though only one Sub-Layer is uncached out of four for example, it's going to have something like more than half of the uncached shader complexity.
Still, it's better than keeping it uncached. Depending on your use case you may need to uncache some layers (Rocks far away for example.)
Uncaching the second Sub-Layer in our case for example gives us this shader complexity. As you can see, it's better than uncached but still negatively impacts the complexity.