Home Technical Talk

Overlapping UV's Question/Explanation Please

Hello there,

I apologize if this question has already been asked/explained. I did try to search google and these forums but have such trouble finding information on the topic. So your time is much appreciated!

Basically, I was curious as to overlapping uv's in games and the correct way to do them (in Maya specifically.) I do know how to set my uv layouts to overlap by whatever distance, however my question comes in the shaded view that Maya has to offer.

As with the attached image as an example, I'm wanting to overlap the uv's on the right to match the left. I know that I can flip the uv's on the right side (which turns them red, and then overlap that way.) Does this have an effect on the actual in game uv's? Is it ok to leave my uv layout as purple? Or do I need to make sure that all the uv's are blue and snap them together? Is there a quick way to mirror uv's in Maya other than flipping and turning it red/messing with normal directions, or physically snapping each uv to match the other?

Bah, I seem to be totally lost and just confusing myself even more. Alas, any comments are much appreciated! Thanks for your patience :)

ovuvexample.JPG

Replies

  • Eric Chadwick
    Options
    Offline / Send Message
    Mirroring and overlapping are very important techniques for game models. Whether they stay overlapped or not, depends on a couple things...

    1. if you're baking a normal map from high-res mesh, then overlaps are bad (move them 1 unit outside the UV square instead)

    2. If you're using lightmaps, be careful with overlaps, as the lighting will be identical for overlapped parts. Overlaps should be avoided at bake time though, so you usually move them outside the UV square.

    Some tips here
    http://wiki.polycount.com/NormalMap#UV_Coordinates
  • warinmysky
    Options
    Offline / Send Message
    Thank you for the reply Eric! My questions were certainly directed towards baking a normal map from a high res mesh. I did view the wiki awhile back and do have experience baking normal maps. In the past I certainly did move them 1 unit on the outside, and then move then back.

    My more specific question with Maya is, Is it ok to leave the overlapped Uv's as purple? (That to me means that one uv set on the mesh needs flipped to be blue.) Does it matter if my uv's overlap and stay purple? or do they need to be all blue?
  • o2_is_alright
    Options
    Offline / Send Message
    Well purple (or dark blue or dark red as well for that matter) means there are overlapping UVs and as Eric said, if you're gonna bake stuff or if the uv-set will be used for lightmaps then it's usually not ok.
    Other than that it really doesn't matter except you need to remember that the texture will be mirrored on the uv-shells that are red. That's usually only a problem if you have text or something like that on your texture.
  • Eric Chadwick
    Options
    Offline / Send Message
    Also, some normal map baking tools will only bake the shells that face "up". So the backwards-facing shells will be ignored.

    Also, after moving the shells out of the UV square, you can leave them there, forever. As long as it is moved in whole units, so the texture placement will match.
  • Pola
    Options
    Offline / Send Message
    Pola polycounter lvl 6
    I do this as eric mentioned by leaving my mirrored UV's a full unit to the left, I sometimes put red to the left and blue a full unit below, keeping one blue uv in the upper right square (one that gets baked to). Only bad thing is you get any texture applied to it coming out mirrored. So text is not so readable for example.

    I'm not sure if this affects normal maps much though. Your normals direction is not related to the uv's red/blue colour like you thought in your first post. Although reversing the normal on a polygonal face will flip its uv, if you flip the uv yourself it will not reverse the normal.
  • warinmysky
    Options
    Offline / Send Message
    Thank you very much Eric, o2, and Pola. I am very appreciative for your comments. I'm glad to know that the flipped uv's (red) won't have an effect on my bakes so long as I have them 1 unit apart. That will save me a ton of time. Previously I was still offsetting the uv's a unit apart, but would literally take all the uv's and snap them to the shell that I wanted to mirror so that they matched (making the dark blue!):poly115:
  • Eric Chadwick
    Options
    Offline / Send Message
    Depending on your game engine, you may need to offset all overlapping UVs. We do that here with our proprietary engine, and it allows us seamless mirrored normalmaps. But if there are some overlaps, seams will occur. Has to do with the way the engine creates the tangent basis, or something. :)
  • R4DI4NT
    Options
    Offline / Send Message
    R4DI4NT polycounter lvl 5
    Hi there
    What would it be the workflow in Maya with Overlapping UVs ?

    There is no option dedicated to that and the only one that I've found is in the auto layout function that unfortunately does not work :poly127:

    So I've come out with this workflow , please let me know what are your thought and if there is a easier way to do it .

    • Build the Low Poly model using instances for the objects you want to overlap on the UV space.
    • Auto Lay Out the single not overlapping shells UV shells.
    • When you're ready to export , make a copy of the Low Poly with all the instances merged in one object : this will delete the instance node and assign an overlapping UV shell for each instance element.
  • Eric Chadwick
    Options
    Offline / Send Message
    After that last step, you still need to move the instance overlaps 1 unit over in UV space. Before you bake, make sure only one set of non-overlapping UV shells is in the 0-1 space.
  • R4DI4NT
    Options
    Offline / Send Message
    R4DI4NT polycounter lvl 5
    ah so I take it that the workflow if fine then ?

    I'm using substance painter to bake all my maps and never gave me an error , maybe SP only bakes the one on top and ignore the others underneath ?
  • Eric Chadwick
    Options
    Offline / Send Message
    It's fine if you get no errors!

    We have more info on optimal workflow here, along with reasons for each step.
    http://wiki.polycount.com/wiki/Texture_Baking
Sign In or Register to comment.