Author Topic: How to use UDIM textures exported from SP 2020.2 new workflow?  (Read 518 times)


Exporting textures for UV Tile (UDIM) Projects - YouTube
https://www.youtube.com/watch?v=2WG4BaNdrnQ

I watched the official tutorial video for the new UDIM workflow. But I couldn't understand how to use the texture file exported from Subscante Painter with other software.


For SP 2020.1 legacy workflow, the exported filenames will be:

  • Base_Color_1001.png
  • Base_Color_1002.png
  • Base_Color_1011.png
  • Base_Color_1012.png
  • Height_1001.png
  • Height_1002.png
  • Height_1011.png
  • Height_1012.png
  • ...

Therefore, I could assign these files to one shader and use it as a UDIM.


But in SP 2020.2 new workflow, file names are like this:

  • body_Base_Color_1001.png
  • body_Base_Color_1002.png
  • eyes_Base_Color_1011.png
  • eyes_Base_Color_1012.png
  • body_Height_1001.png
  • body_Height_1002.png
  • eyes_Height_1011.png
  • eyes_Height_1012.png
  • ...

Texture set names (body and eyes) are added, and the sequence numbers are divided into multiple textures.
Because of this, I have to create a shaders for each texture set. If I use 20 texture sets, I have to create 20 shaders. There is no benefit to using UDIM for resource reduction purposes because I cannot combine many textures into one shader.


So my question is: how to use these files as an effective UDIM with other 3D software?

Can I merge them into one shader? Or is there any 3D software that can recognize the texture set names? To my knowledge Blender or Unity cannot recoginize these names.
Last Edit: July 28, 2020, 05:34:54 pm

With Blender it works the same as it did prior.

Example:









Then for the base color (only using it for this example) I have them:



In Blender make a new image per channel, and add the first one ending with 1001 and fill up to the rest (6), the hit the refresh key and you're good to go:



Then you add one node to show it:


CAGameDEV

Thank you for replying.

Yes, it doesn't matter if you use only one material. But if you use more materials, is it possible to combine them into one shader?

In your example, if you assign "material_A" to UV tile 1001/1002/1003 and "material_B" to 1004/1005/1006, Substance Painter 2020.2 creates individual texture set structure like this:

- material_A
    - 1001
    - 1002
    - 1003
- material_B
    - 1004
    - 1005
    - 1006

After exporting these textures, the filenames are as follows:

- material_A_BaseColor_1001.png
- material_A_BaseColor_1002.png
- material_A_BaseColor_1003.png
- material_B_BaseColor_1004.png
- material_B_BaseColor_1005.png
- material_B_BaseColor_1006.png

So, back to Blender, you need to make setting for two shaders, "material_A" and "material_B". Using more channel (Height, Roughness, Normal, ...) and materials (material_C, _D, _E, ...) makes node creation and UV settings very tedious.

(In addition to this, Blender cannot recoginize UDIM sequences if the file number does not start with "1001". So "material_B" (start with "1004") cannot be loaded as UDIM.)


Is there any workaround?
Or... am I doing something wrong?
Last Edit: July 28, 2020, 03:39:37 pm

If you're going to use a second texture set make sure you start those UDIMs from 1001 -> ect... Don't start at 1004 then it will feed in correctly. There is no reason to start at 1004 on a new set as it is a fresh UDIM.

(Sorry, deleted my prior reply as I miss-read your post).

I'm sorry for my poor explanation  :-[

Quote
There is no reason to start at 1004 on a new set as it is a fresh UDIM.

In real life situation, there may be reasons to place the material on "not 1001" tiles. Especially for a large project with many parts and many materials.



For example, in my current project (Ancient Japanese Armor), the model uses 20 materials and has 6 large parts. UDIM tiles are assigned to each parts.

Both the "Body (Oh-yoroi)" and "Helmet (Kabuto)" have different surface patterns. They are placed on the dedicated UDIM tile. "Body" is on "1001" and "Helmet" is on "1004".
Since their patterns are different, "Body Pattern" material is on "1001" and "Helmet Pattern" material is on "1004" -- not "1001".


(By the way, in the official tutorial video, texture set is organized as follows: "body" is UDIM 1001/1002/1011/1012, "cornea" is UDIM 1022/1024)




I want Substance Painter to combine all the textures for each UDIM tile (not for texture set) and export files like "BaseColor_1001.png", "BaseColor_1002.png" just same as SP 2020.1.

Is it possible?
Last Edit: July 28, 2020, 05:26:09 pm

I'm sorry for my poor explanation  :-[

Quote
There is no reason to start at 1004 on a new set as it is a fresh UDIM.

In real life situation, there may be reasons to place the material on "not 1001" tiles. Especially for a large project with many parts and many materials.

I personally don't work this way for a number of reasons, but if that is your workflow then you'll have to work within your set limitations. I personally use ID Maps as needed to mask out like pieces, and also I keep track of which UDIM tiles are for what pieces. Unless you're actually using a different shader for certain parts there isn't a need to use another material ID and have your UDIMs split up like this, otherwise you would start at 1001 regardless.

Your above example does not justify the texture split because it seems you're only using it to mask out sections of the mesh. Having different patterns is solved by ID masking, and using certain tiles for those pieces which you can also manually mask in Painter.

Blender has a requirement to load in 1001 first, and if you want to bypass that requirement you need to create fillers, or rename your export files.

Quote
Having different patterns is solved by ID masking, and using certain tiles for those pieces which you can also manually mask in Painter.

I used ID Maps until SP 2020.1. It worked well.

In Blender (my main tool), it is much easier to assign materials than to paint ID maps. However, since SP 2020.1 ignored the materials, I had no choice but to use ID maps.

In SP 2020.2, the materials I set in Blender are now considered as TextureSets in SP. So I happily started using materials... but the new SP couldn't export the merged UDIM like the previous version :'(
For me, the new workflow is very useful when painting textures, but the exported UDIM was useless.


Quote
Blender has a requirement to load in 1001 first, and if you want to bypass that requirement you need to create fillers, or rename your export files.

If I want to keep using the material as a mask, your suggested method seems to be the only way.
Unfortunately, I will give up on the new UDIM workflow and return to the legacy workflow.


Thank you for your advice.

You don't have to vertex paint IDs, just use a material ID fill for those UV Shells and Faces.

What does it mean? As far as I know, Blender's material are not stored in FBX or OBJ files, so Painter cannot use them as Color Source of ID Maps. That's why I have to use vertex paint.



I use Material IDs all the time... If someone claims it wont work they don't know what they're talking about. You're storing color information, not actual texture files which is different.

Example:



Baked ID map with Material:



Works 100% fine... The only time I use Vertex Color is if I'm doing it manually in zBrush for example off a High Poly mesh.

Sorry, I was confused. You are right, Blender's material can be imported to Painter as Material Color.

However, using UDIM tiles and materials at the same time causes problems.


When you create a new project in Painter, choosing "Convert UV Tiles into individual Texture Sets (legacy)" (SP 2020.1 legacy workflow), the materials are discarded!





In this case, you can't use Material Color to bake ID Map. This is why I have to use vertex color in SP 2020.1.


On the other hand, if you choose "Preserve UV Tile layout per material and enable painting across tiles" (SP 2020.2 new workflow), the materials are saved and can be used as ID Map.



But as I described earlier in this thread, this workflow exports separated texture files. They cannot be combined into one shader. It's useless to me.


What I want Painter to do is:
- Ability to use Material Color as ID map or mask or layer
- Combined UDIM textures (not separeted per materials)

But it seems impossible for now.
Last Edit: July 29, 2020, 08:36:36 am

I've been using this flawlessly for my projects as do many others in the industry. I believe you're confused on how this works.

I wont spend too much more time going over this so below is my final example and you'll have to figure it out on your own.







If I use the new UDIM way it works as intended:







Same with legacy:





If you split up the IDs even more per tile within it will take effect as well:



New UDIM workflow:



Legacy for that set:



Your ID names are set for the ID Mesh, but your actual low shouldn't have the same IDs as the ID Mesh otherwise you'll be splitting texture sets up again... You only need one Material ID for the low unless you're using different shaders, then use the ID mask as per normal. This works perfectly fine, and if you're unable to get it working then it is most likely user error and lack of understanding the workflow.
Last Edit: July 29, 2020, 08:54:29 am

Thank you for sharing so much instructions.

I noticed that you are using 'High-poly to Low-poly' workflow. In your instruction, you created a new Painter project with Low-poly mesh (which has no material), then bake ID map from Material Color of High-poly mesh (which has 3 materials), right?



I've never used that process because my past project didn't need it. So I never thought of importing Material ID from another mesh.

Also I found that I was misunderstanding the concept from the beginning. If I want to merge all UDIM textures into one shader in Blender, don't create a Painter project with the mesh which has multiple materials. TextureSets are not just layers or masks!


With these knowledge, I'll retry my project.
Last Edit: July 30, 2020, 06:34:55 am

Yes, if you're wanting an ID map you can do it one of two ways. If you have a high poly mesh you can vertex or material fill it and when baking you'll get the maps. Or if you want to make an ID map based off your low poly you would bake your High to Low less the ID tab being ticked, then duplicate your low poly mesh and set up your ID Mesh, then bake only with the ID option and load it in as _high or _id, whatever you pick but make sure you change the suffix in your bake settings. This also works for those who don't use high to low work flows, just duplicate your low and make your ID off that.

Deciding to make an ID map based off a high poly mesh, or a low poly copy depends on your project needs.

Finally, I understand the concept of SP 2020.2 workflow. And also several ways to get ID Maps.
Thank you for teaching me patiently :)
Last Edit: July 30, 2020, 06:33:55 am