Definitive UVsets/Uv channels answers

Hey all,

I am trying to set up a shader that blends a wall over a floor texture. The floor textures have tiled UVs that are irregular, and the wall needs to be within the 0-1 UV square. In 3dsmax, I would normally achieve this through setting UV set 1 for floor textures, and blend over the UV set 2 for wall.

So far I cannot find any definitive answers to the following in the unity documentation.

1: How many UV channels can Unity use.
2: Which one the lightmapping uses.
3: How many FBX import.
4: In Shaderforge, it seems UV0 and UV1 are valid names. In Max, it’s UV1 and UV2 for parity. Maya, however, doesn’t number them but uses names. Unfortunately I have to use Maya for this project, so how do I export something to get a UV0, or UV2- do I have to name it specifically- if so what? ‘Uv0’ doesn’t seem to work. Is FBX just making an assumption that the second set is the other channel. Does that mean I cannot use lightmaps?

It would be really good to have a section in the manual that talks about uvsets/uvchannels and locks a workflow down for us.

Thanks for your help folks.

Partial answer for you based on my own experiences:

  • For working with meshes in the editor or runtime, Unity gives you access to just 4 UV channels
  • UV1 and UV2 channels are used for lightmapping & global illumination. So if you’re using lightmaps, then the only other additional channel you’ve left to work with is UV3
  • If you make a custom shader, you can access up to 8 UV channels on a mesh (maybe more depending on your hardware)

Sorry, I can’t help with the Max/Maya/FBX questions.

See here and here for some very useful info on UV channels that should be in the docs (but isn’t).

As a workaround, have you considered using something like vertex painting & splatmapping in Unity? There’s an excellent free vertex painter made by Jason Booth that you can see in action here, and can download from here. He also has a paid version which can do even more amazing things (vid of it in action here).