Home Technical Talk

Multi UV sets / Textures in Maya

polycounter lvl 9
Offline / Send Message
tristamus polycounter lvl 9
Hey there guys! =)

So, I'm working on an art test for a studio I can't say (Because they said not to O_o) and I have a question about using two textures on a single model.

So, in MAYA, say I have a rock. I already have my color map applied and shader network set up with a normal map, etc.

My color map is a 512 by 512. I have it tiled so it looks all nice, but I want to add some moss onto my rock.

This is where I'm having a hard time.

Obviously, I can't add the moss into my tiling texture, because I want the moss to be layered on top of the tiling color texture.

I am thinking I have to use the Layered Texture node in Maya to do this but....do I need to have a separate UV set for my rock? 1 for my tiling color map and 1 for this moss? Would I save out the moss targa with alpha transparency and lay it over the color map for the 2nd uv set?

I r confussed.

Thank you guys =)

Replies

  • m4dcow
    Options
    Offline / Send Message
    m4dcow interpolator
    • For the layered shader it depends on whether you want the moss to tile the same as the rock, and if you wanted it to tile the same, you should just add the moss to the tiling texture.
    • If you simply want a different tiling amount, you could use a layered texture with the same UV set and then change the scaling value in the texture2D node associated with that file.
    • If you want to use an actual mask you would want to have another UV set that is unique and in 0-1 space. You would then use that to mask off the moss in the layered texture.
    This issue has come up a few times already, once with a tree. That guy wanted to vertex paint in maya and have that be used as his moss mask, unfortunately no one came up with a definitive answer for how to achieve this within maya itself. I am pretty interested in a silution myself, doing this in unreal is fairly easy, but I would like to be able to tackle it in Maya. Maybe someone has a CGFX shader out there that can do what you're looking for.
  • kodde
    Options
    Offline / Send Message
    kodde polycounter lvl 19
    I think your initial idea seemed correct.

    First of, if you're not going to vary the material parameters between the objects then you can just as well use Layered Texture. Otherwise go with Layered Shader.

    If you're not familiar with using multiple UV sets and assigning different textures to different UV sets then have a look at the Window > Relationship Editors > UV Linking. Given that you've got a polygon object with multiple UV sets and a shader solution with multiple textures (Layered Texture for instance) you should be able to assign them properly in this relationship editor.

    GL
  • tristamus
    Options
    Offline / Send Message
    tristamus polycounter lvl 9
    m4dcow wrote: »
    • For the layered shader it depends on whether you want the moss to tile the same as the rock, and if you wanted it to tile the same, you should just add the moss to the tiling texture.
    • If you simply want a different tiling amount, you could use a layered texture with the same UV set and then change the scaling value in the texture2D node associated with that file.
    • If you want to use an actual mask you would want to have another UV set that is unique and in 0-1 space. You would then use that to mask off the moss in the layered texture.
    This issue has come up a few times already, once with a tree. That guy wanted to vertex paint in maya and have that be used as his moss mask, unfortunately no one came up with a definitive answer for how to achieve this within maya itself. I am pretty interested in a silution myself, doing this in unreal is fairly easy, but I would like to be able to tackle it in Maya. Maybe someone has a CGFX shader out there that can do what you're looking for.

    Hey there man, thanks for your reply!

    Yeah, I actually want to not tile the moss at all on the rock. I have made a separate UV set for the model that is laid out specifically for where I want the moss to be, and so that it's texel density is really high, so that when it lays on top of the primary rock texture it looks as detailed as it possibly can be.

    I tinkered with the layered texture node for hours, and came up with something decent, but it's not what I want exactly. I don't know how to assign a part of the layered texture to the first uv set, and another to the 2nd uv set! Do you know how to do that through the nodes properties? I checked for that myself, and nothing jumped out at me as how to prioritize uv sets...just "repeat uv's" and the usual-like things are there.

    Thanks for any further help =)
  • tristamus
    Options
    Offline / Send Message
    tristamus polycounter lvl 9
    kodde wrote: »
    I think your initial idea seemed correct.

    First of, if you're not going to vary the material parameters between the objects then you can just as well use Layered Texture. Otherwise go with Layered Shader.

    If you're not familiar with using multiple UV sets and assigning different textures to different UV sets then have a look at the Window > Relationship Editors > UV Linking. Given that you've got a polygon object with multiple UV sets and a shader solution with multiple textures (Layered Texture for instance) you should be able to assign them properly in this relationship editor.

    GL

    Ahh! kodde! Thank you for that suggestion man! I'll definitely try that....but not right now. Shower and bed time =)

    Will try tomorrow and see if that works! Can't wait to see....

    I want dat hi rez moss, ya no?
  • tristamus
    Options
    Offline / Send Message
    tristamus polycounter lvl 9
    Okay, so I'm really trying to figure this out but I must be doing something wrong.

    I've got my layered texture node, connected to a tiling color map which is assigned to my first uv set, then ive got my 2nd color map, which is assigned to my 2nd uv set especially made for the moss, yet when I assign these uv's to their respectful nodes in the hypershade, of which are tied to a layered shader node, it doesnt work =(

    I only see the first color map, but the moss is not appearing!

    I've tried changing the blend modes to over, multiply, add, etc, yet it seems to never have the desired moss texture take affect.

    Any idea's guys??
  • kodde
    Options
    Offline / Send Message
    kodde polycounter lvl 19
    You might need to switch order they are shown?
    Your base texture might be shown in front of the decal texture. Decal being "behind" sort of say.

    You can rearrange this order in the Layered Texture node. Use Mouse3 to drag-and-drop them around to switch order. That is where you can add/remove the inputs in the Layered Texture. They should appear as blue? green? rectangles.
  • kodde
    Options
    Offline / Send Message
    kodde polycounter lvl 19
    Also you mention that you've got your Layered Texture connected to your "tiling color map". Don't you mean vice versa?

    The way I pictured it you wanted the two textures going into your Layered Texture node, then the Layered Texture node to your shader node.

    Texture A/Texture B -> Layered Texture -> Your Shader
  • tristamus
    Options
    Offline / Send Message
    tristamus polycounter lvl 9
    kodde wrote: »
    Also you mention that you've got your Layered Texture connected to your "tiling color map". Don't you mean vice versa?

    The way I pictured it you wanted the two textures going into your Layered Texture node, then the Layered Texture node to your shader node.

    Texture A/Texture B -> Layered Texture -> Your Shader

    Hey kodde!

    Yeah that's exactly right, Texture A/Texture B -> Layered Texture -> Your Shader

    And thanks for helping me out, I FINALLY got it working! It's definitely wasn't easy figuring this out, for some reason.. :o

    But now I know ^_^
  • kodde
    Options
    Offline / Send Message
    kodde polycounter lvl 19
    Good to hear.
    Cheers.
  • Lamuness
    Options
    Offline / Send Message
    Going to Necro this thread because I'm possibly working on the same art test.

    I'm trying to paint in areas using vertex colors, layered textures, and different UV sets. I've gotten this to work with the Diffuse textures, but when I do it for the Normal maps, they don't show up. It's either one normal map or none at all.

    In UDK, I can just multiply or add them together no problem. In Maya, it just doesn't want to show up at all. Even when I render the frame.

    Also, I can't seem to get the diffuse blend to work in high quality mode. If I use the default renderer, it shows up, but I can't see how my lighting will affect my model at all! I'm not sure what they want to see, the render or they want to see it in the viewport. I want to put it in both just in case.

    Can anyone help me here? Thanks in advance.
  • bugo
    Options
    Offline / Send Message
    bugo polycounter lvl 17
    I don't think there's a way without a cgfx/hlsl shader. I remember Bryce Vandermoortele did a vertex blending shader that has what you want.

    here's the link: http://www.polycount.com/forum/showthread.php?t=54839&highlight=terrain+vertex+shader
  • Lamuness
    Options
    Offline / Send Message
    Thanks Bugo, I'll check it out.
Sign In or Register to comment.