π¬ Landscape Caching for better Performance
How to setup and use RVTs to improve performance
Last updated
How to setup and use RVTs to improve performance
Last updated
First, Create the Runtime Virtual Textures that will be used. For Caching, at least the Color VT is mandatory for it to work, other additional VTs may not be needed depending on your needs.
Open the principal color VT and set its "Virtual Texture content" to "Base Color, Specular, Roughness, Normal". Recommended default values for the Sizes are 12-2-2.
If you want to use VTs for World Height, open the one for it and set it to "World Height". Recommended default values for the Sizes are 8-2-2.
If you want to use VTs for Nanite Displacement, open the one for it and set it to "Displacement". Recommended default values for the Sizes are 10-2-2.
Then, place Runtime Virtual Texture Volumes for each of the VTs in your world. In the Details panel, look for "Virtual Texture" and select the one you need, then click Set Bounds.
Do that for each of the volumes you need.
Then, click on your Landscape, and add the Virtual Textures needed in the "Draw in Virtual Textures" zone of its details as the screen below shows.
Finally, In the Builder interface, enable the use of Virtual Texturing caching in the Global options.
You can click the wand button to automatically select the Landscape's Virtual Texture, or select it manually by clicking its thumbnail.
Done ! Now your Instance can use Virtual Texture Caching to improve itsperformance !
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
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.