Search Unity

Hard edges at UV seams after lightmapping.

Discussion in 'General Graphics' started by topofsteel, Feb 3, 2015.

  1. topofsteel

    topofsteel

    Joined:
    Dec 2, 2011
    Posts:
    999
    I am having the hardest time getting models to lightmap without seams. I get them both at the UV seams I create and the UV2 lightmap seams created by Unity. I am modeling in Maya, my workflow is...

    - Create a high-poly detailed model in Maya
    - Convert the smooth mesh preview to polygons
    - Create UV seams on the hard edges and wherever else I need them.
    - flatten and fix any overlapping UV's
    - Copy the model and reduce it roughly 75%
    - Create a UV snapshot from the Low-Poly UV layout
    - Set up my texture baking settings with the high and Low poly models
    - Generate the normal map
    - Export the low poly model to Unity and bring in the normal and diffuse maps.

    Image 1 - Before lightmapping
    Image 2 - Lightmapping using UV2 set I created in Maya - Blue circles indicate UV seams
    Image 3 - Lightmapping using UV2 set created in Unity (I'll be using my own from now on)
    Image 4 - UV2 from Maya with Lightmap resolution
    Image 5 - UV2 from Unity with Lightmap resolution - Blue lines indicate bad UV2 from Unity

    The 2nd image doesn't look bad. I need to create a different UV2 layout and see which set is generating the seams. I feel like I have the mechanics down, but there is obviously a crucial step i'm missing. What do I need to do in Maya to prep my model for Unity? Thanks.

    UV1.png UV2.png UV3.png UV4.png UV5.png
     
  2. theANMATOR2b

    theANMATOR2b

    Joined:
    Jul 12, 2014
    Posts:
    7,790
    Here's a couple test suggestions to reduce the number of things 'it could' be down to less things it could be.
    Disclaimer - I'm a Max artist, not Maya

    The only time I experienced this before was when the normal was a little wonky. This wasn't in Unity though, but I fixed it by subtly modifying the normal map in photoshop.
    Can you do an AO test without the normal map to see if maybe the normal map is somehow causing the seams.

    Can you bake AO in Maya? I prefer this method just to get everything situated in Unity. It's hard enough to get things working once a game is being developed. I try to reduce the thing that could go wrong in Unity as much as possible.
    The drawback to this is if lighting setup changes AO's will have to be rebaked on all models.

    If you do bake AO in Maya are the seams still there?

    How much buffer do you have on your UV shells?

    Do you have mirrored UV shells?
     
  3. topofsteel

    topofsteel

    Joined:
    Dec 2, 2011
    Posts:
    999
    I have no doubt it has somthing to do with my normals, that is actually where I started looking for answers. See the link below for my question on polycount and the other is an article I read about it. How did you fix the normal map in Photoshop? And what was wrong with your model? In Max terms, what did you have to do to fix your model? I had not mirrored the UV's or anything. The workflow I mentioned is pretty accurate.

    There is some step in the modeling process regarding normals i'm missing. More than just setting the smooth angle. I've run tests with a simple smoothed cube with similar results. I have found that using better shaders greatly minimizes it, skyshop for example.

    Image 1 - Ao only
    Image 2 - Ao and lightmapped
    Image 3 - Ao and normal only
    Image 4 - Ao, normal and lightmapped