Skip to main content
Version: 10.0

UV Tile Discard

UV Tile Discard (also referred to as UDIM-discarding) 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 same concept of UV tiles, but without modifying the textures in any way. You can learn more about UV Tiles and UDIMs from Foundry Learn .

Known Issues with Screen-Space AO

UV Tile Discard can have some side-effects in Worlds that use a heavy amount of Screen-Space AO Post Processing. If a Tile is discarded in a World with this, heavy shadows and/or ghosting will be visible around the discarded area.

Please keep this in mind when using UV Tile Discard.

Discard UV

  • Type: Dropdown, Options: UV0/UV1/UV2/UV3

Which UV to draw from for discarding. This can be the base UV or an alternative UV made specifically for UV Tile discard.

Discard Mode

  • Type: Dropdown, Options: Vertex (Faster)/Pixel (Slower)

Defines how the discarding is performed. Generally this should be set to Vertex which is most common among setups, unless there is a good reason to use Pixel.

Vertex mode discards the vertices that are inside the discard UV by eviscerating 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.

Discard Coordinates

  • Type: Toggles

Defines which UV tiles to discard. These are organized into 4 rows of 4 tiles, 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 button is clicked, that tile is discarded. When animating these Toggle buttons, each one is it's own independent material property.

Table Reference:

UDIMColumn 0Column 1Column 2Column 3
Row 30,31,32,33,3
Row 20,21,22,23,2
Row 10,11,12,13,1
Row 00,01,02,03,0
Notice for third-party utilities

Some third-party utilities such as VRCFury or Modular Avatar may sometimes fail to correctly find these material property names, even though they are exposed in the shader's code.

To ensure you can use them, enter the material property names manually in their respective components. They are labeled with the pattern _UDIMDiscardRowX_Y, with X being the Row number, and Y being the Column number. For example, Row 2 Column 3 will appear as _UDIMDiscardRow2_3.

Face Discard

  • Type: Toggle

Face Discard is a granular alternative to the Cull rendering option, providing control over which faces of a mesh to discard. It utilizes the pixel mode of UV Tile Discard to apply face discarding selectively, instead of applying global face culling across the entire material.

This is useful when some backfaces are visible, such as in exposed interior areas of clothing, while others are not and can be discarded to improve performance. Using Face Discard in these cases lets you achieve performance gains without the limitations of enabling global culling.

However, it’s important to note that while Face Discard provides more granular control compared to traditional face culling, it does not offer the same level of performance improvement as the global Cull render option, which should be used when possible. This is due the discarding being performed in the fragment shader.

Face Discard UV

  • Type: Dropdown, Options: UV0/UV1/UV2/UV3

Which UV to draw from for discarding. This can be the base UV or an alternative UV made specifically for UV Tile discard.

Face to Discard

  • Type: Dropdown, Options: Back/Front

Sets what faces should be discarded. By default, this is set to Back. Front is only useful for special effects.

Discard Coordinates

  • Type: Toggles

These coordinates work in the same manner as the primary Discard Coordinates option.

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 visualize 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.

Overlays

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: