UDIM Guide

Since the introduction of Mari to the texture world, There has been some confusion when it comes to UDIM, the UV offset system that Mari uses. To explain what UDIM is, some basic understanding of UV space is needed.

UV TILE: (U,V)
The standard coordinate system that 3d packages uses to define a tile is a simple two number notation. A UV coordinate using this notation would look like (0,1), this is simply (u,v). The first number is the starting point of U (horizontal) and the second is the starting point of V (vertical). We are only concerned about whole numbers in this format, as all we are dealing with in Mari are offsets. Below is a standard Maya UV editor tile showing the default "0 to 1" tile, which is defined as (0,0)


UV TILE: _U1_V1
Before UDIM was introduced to us, in CG we often used the UV tile notation "_u1_v1"
This is a simple and easy to understand, although a bit verbose, way of indicating tile offsets. This notation really only uses one rule, and that is to add a value of one to the traditional (u,v) coordinate, and then it adds the U and V descriptors. So, a UV coordinate of (0,1) would be translated into _u1_v2.

UV TILE : UDIM
This brings us to UDIM, the newest notation for UV tiles. This notation is harder to breakdown in a grid style progression like the all of the above because UDIM has a limitation of 10 UV tiles in the U dimension. The notation starts at 1001 (which is (0,0)) and continues on U for 10 offsets, at that point it resumes its progression on the next row of V, meaning for every 10 in U it moves 1 in V. This is a little confusing, and is helpful to see it, so check out the following sequence:

1021 1022 1023 1024 1025 1026 1027 1028 1029 1030
1011 1012 1013 1014 1015 1016 1017 1018 1019 1020
1001 1002 1003 1004 1005 1006 1007 1008 1009 1010

Notice how at 10, it returns upward and continues another 10. This is how you would see the UV tiles organized in Mari. This would then repeat into very high numbers, so even though there is 10 on U limitation, you will never run out of tile spaces.

Furthermore, you can get to this number from a traditional (u,v) coordinate by using the following maths: 1000+(u+1)+(v*10)

Further examples of conversions:

UV Tile: (u,v) = (0,0) = (0+1,0+1) = _u1_v1

UDIM: (u,v) = (0,1) = 1000+(0+1)+(1*10) = 1011

Below I have prepared a UV offset grid and legend to better visualize and understand the relationship of all the information above. Keep in mind UDIM does go to 10 on U, and this example only shows a range of 5 on both dimensions.








13 comments:

Unknown said...

Hai Ben Neall,

I tried using mari and im kind of stuck with udim workflow. after seperating the uvs in seperate tiles in maya uv editor and exporing the obj to mari all the UVs patches are in the same udim... im kind of stuck at the starting itself... hope you help me :) thanks...

Unknown said...

Got it i just need to change my grid setting haha :) i never used Zbrush or any other 3d app except maya... so it kind of took some time to figure it out ... thanks...

Unknown said...

Thanks Ben! Just the info we were looking for!

samiam said...

Thanks man, this is awesome.

Krossing said...

I was wondering how you'd put several files into one file node in for example Maya. I've been told you can easily be able to make file nodes read several texture files just with 1 shader and 1 file node. Is that something you could write? I haven't been able to find anything about it so far.

Anonymous said...

Great post, Ben

Kevin said...

hey Krossing you can just create a file node with a filepath of type $filepath/$filename..$ext and it should work.

Andres Weber said...
This comment has been removed by the author.
Andres Weber said...

So what exactly is the function to go backwards from UDIM to UV values? It's pretty tough to go backwards with two unknown variables once either number goes above 9...

Christopher said...

For UV, you simply do (0+1,0+2) = u1_v2, correct ? Always add by zero either going in U or V ?

And for UDIM you have to take the UV tile, if it's (0,2) = 1000+(0+1)+(???) = ????

Unknown said...

Hi Ben, I am wondering if skipping tiles will cause any problems. For instances that I have textures in 1001 and 1003 but not in 1002. Is this ok?

rodrigo guerechit said...

Thanks a lot Ben pretty usefull.
For those who wondered to revert from Udim to Uvyou can use
v=((UDIM - 1000 - U)/10) + 1
U happens to be the very last number of the Udim if the last number is 0 then u should be 1.
For instance 1010 being the last number 0, then U=1.
Probably everyone already figured this out.
Hope this helps.
Cheers

logesh said...

Such a very useful blog. Very interesting to read this blog. I would like to thank you for the efforts you had made for writing this awesome blog.
ibm full form in india |
ssb ka full form |
what is the full form of dp |
full form of brics |
gnm nursing full form |
full form of bce |
full form of php |
bhim full form |
nota full form in india |
apec full form