UDIM is essentially a naming convention for having multiple image tiles in one texture.
The traditional (0,0)-(1,1) UV space is assigned ID 1001, and from there on additional unit
squares are numbered in ascending order with ten tiles per row.
For example, tile 1005 is (4,0)-(5,1) and 1013 is (2,1)-(3,2).
This commit adds initial support for that convention in Blender. Instead of storing all tiles
in a single Image datablock, which would require extensive changes all over Blender, a Image
datablock now can store references to other Image datablocks - that way, the 1001 "master tile"
links to the other tiles.
This allows to handle issues like user counting and linking with the regular methods while
providing an efficient way for detecting whether a Image is a UDIM master tile (checking whether
the tile array pointer is non-NULL) and iterating over the tiles.
In addition to support in the kernel, there also are extensions for other parts that allow them
to handle UDIMs:
- In the image editor, when the master tile is selected, all other tiles are shown in their locations. Also, a grid with UDIM IDs is shown in the background, which makes it easy to lay out the UVs. This grid can be enabled even if no image is selected currently.
- The Cycles Image Texture Node automatically handles UDIMs - if you select a master tile, it will show a note in the node to show that the other tiles were detected and load and use them during rendering.
- In Material mode in the viewport, the Cycles GLSL shaders also support UDIMs.
- When opening an image with 1001 in its name, Blender will not do the usual frame sequence detection. Instead, it will parse the selected files to check which ones form UDIM textures and assign them to the master tile(s). Additionally, it will check the folder for other matching tiles, which means that just selecting the 1001 tile is enough.
I'm not really sure who to add as a reviewer here, so feel free to add anyone/yourself :)




