UV Tile Discard (previously known as UDIM Discard) provides an efficient way to toggle portions of a model on and off at runtime. This is done by placing portions of the model on different UV Tiles, and then discarding specific tiles at runtime.
Traditionally, UDIMs are used to create a grid of tiles, with specific textures placed on different tiles. UV Tile Discard simply uses the concept of UV tiles, not doing anything with any textures. You can learn more about UV Tiles and UDIMs from Foundry Learn.
Type: Dropdown, Options:
Which UV to draw from for discarding. This can be the base UV or an alternative UV made specifically for UV Tile discard.
Type: Dropdown, Options:
Defines how the discarding is performed. Generally, this should be set to
Vertex unless there is a good reason to use
Vertex mode discards the vertices that are inside the discard UV by evicting the vertices (and any attached triangles) to an invalid position, causing the GPU to never run the fragment shader stage. This is faster than
Pixel mode, but is not exact to UV tile edges.
Pixel mode discards the pixels that are inside the discard UV by using the
clip HLSL operation. This performs the discarding in the fragment shader, which is slower than
Vertex mode, but is exact to UV tile edges.
Defines which UV tiles to discard. These are organized into 4 rows (v) of 4 tiles (u), defining a grid of 16 discard tiles. The bottom left is the origin, and the top right is the maximum. The bottom left tile (0,0) is where most UV mapping is performed.
When a box is checked, that tile is discarded. When animating these checkboxes, each one is its own independent property.
UV Tile Setup
For an example of a correct setup using Blender, we can take an existing mesh, and add an extra UV channel to it:
While it's not strictly necessary, the
UDIM Grid setting allows us to visualise our tiles. To change this setting your mesh has to be in
Edit Mode. In blender 3.2 and later, this setting can be found in the overlays dropdown.
On that extra UV channel, move different UV islands to different uv tiles. Using whole number offsets lets you map textures to it, but since we made an alternate UV, all that's necessary is that the islands are on different UV tiles:
With the UVs set up, we can use enable UV tile discard on the material, set the UV to the one we created (they're matched by slot position), and use UV tile discard successfully: