Starting with version 2018.3 Substance Painter use Sparse Virtual Textures (SVT) in its realtime viewport to manage large amount of textures. This technology allows to stream in and out textures that are only necessary from a given point of view in order to maintain a specific footprint on the GPU memory. It improves performances on projects with a large amount of Texture Sets (or UDIMs).
Sparse textures rely on a specific hardware configuration in order to be fully performant. If the current configuration doesn't support it properly, Substance Painter will fallback to a software implementation instead (which will be less precise and less performant).
It is possible to force Substance Painter to use the software fallback instead of the Hardware acceleration by going in the Settings.
Here are the configuration that support the hardware accelerated Sparse Virtual Textures :
|Platform||Supported (Hardware accelerated)||Unsupported (Software fallback)|
* : Hardware acceleration disabled by default, can be enabled manually in the Settings.
Why is Substance Painter using Sparse Virtual Textures ?
Substance Painter use its main engine for computing textures which are then displayed in the viewports. This means the engine and the viewport have to share the GPU memory (VRam) for computing and displaying these textures. The more Texture Sets (or UV Tiles) a project contains, the more memory will be needed for the viewport. If the viewport takes too much memory on the GPU, the main engine don't have enough room to compute textures and will have to evict textures into the system memory (Ram). This will result in poor performances and slow computations.
The goal of the SVT is to budget how much the viewport can use on the GPU memory, letting as much room as possible for the main engine to do computations. The advantage of the system is that it also unlock the ability to load much bigger project into Substance Painter while still being able to work as normal.
How does Sparse Textures work ?
Sparse Virtual Textures are a type of textures which are not complete. This means the application only load parts of textures in memory. Only what is needed is loaded and the rest is put into the system memory or on the disk (cache). When needed again, the textures are retrieved from the cache and put back into the viewport. To make transferts quick enough the system relies on mipmaps and jump between different resolution of texture rapidly. This is why moving quickly into the viewport may display blurry textures at first which then increase in quality after a few seconds.
For more technical knowledge, see : Sparse Virtual Textures.
When there isn't enough system memory (Ram) available to store the SVT cache Substance Painter will switch to the computer hard drive instead to store the cache.
The location of this cache is by default into the Operating System Temporary Files folder. This location can be changed by going into the main settings of the application, see the "Temporary Files" setting.
In order to take full advantage of the SVT, Shaders have to request and read textures from the the Sparse system. Therefor previous functions based on vec2 texture coordinates and samplers have been deprecated. Helper functions are now provided instead to use the Sparse textures.
To update your Shaders :
- For Default Substance Painter shader : Follow the step by step procedure from the Updating a Shader page.
- For Custom shader : take a look at the error message(s) in the log as well as the Shader API page.
Older projects may display white flashes if their shaders are not up to date. See this page for more information : Mesh flash to white when moving camera