Udim is an abbreviation of U-Dimension. It’s a tile-indexing system that converts a 2d (UV) coordinate into a 1d (Udim) tile.

To convert UV coordinates into Udim.

$udim = floor(($v) * $maxu + ($u + 1) + $base);
$u = U coordinate.
$v = V coordinate.
$maxu = Maximum in U dimension, 10 is industry standard.
$base = The origin. 1000 is the industry standard.

To convert a Udim back into it’s UV coordinates.

$u = int($udim-base) % $maxu
$v = int(floor(($udim-$base) / $maxu))

Leave a Reply

Your email address will not be published. Required fields are marked *