Home General Discussion

Normal Map issues around UV Seam

interpolator
Offline / Send Message
Zack Maxwell interpolator
I'm learning Blender, and I'm having trouble with creating a Normal Map. I created the high and the low poly and UV mapped it. I can't find any adequate tutorials on UV mapping in Blender though, and I've heard the map baking inside it isn't good anyway. So, I decided to just bake it out inside Substance Designer.
No matter what I do though, I'm getting a lot of strange distortion along the UV Seam.
I don't know if it might be the cause, but I didn't create a cage, since 1) I can't find adequate tutorials on that either and 2) I can't find anything even saying what use a cage has in baking.
ZBrush's map baking seems to have the same issue, even if the whole thing is created entirely within ZBrush, so I really have no clue what I'm missing.
Here's a picture;
FlaskMapBug_zps7faa61fb.jpg

Replies

  • Tobbo
    Offline / Send Message
    Tobbo polycounter lvl 11
    Try inverting the green channel of the normal map?

    Actually, did you set hard edges on your low poly mesh and export them out with smoothing groups checked?
  • Fuiosg
    Offline / Send Message
    Fuiosg polycounter lvl 5
    post your UV layout and normal map, as well.

    Here's an excellent video on normal map baking, it gets into cages and all that. The cage is basically just a scaled up version of your lowpoly, to fit both the low and high model inside it.

    https://www.youtube.com/watch?v=kGszEIT4Kww&list=FLA_HkCFHELYzKtJgYZZ1qRg&index=6

    You'll also want to get the program xNormal.
  • RobeOmega
    Offline / Send Message
    RobeOmega polycounter lvl 10
    Tobbo wrote: »
    Try inverting the green channel of the normal map?

    Actually, did you set hard edges on your low poly mesh and export them out with smoothing groups checked?

    Smoothing group support in blender?

    Keep dreaming buddy
  • James Ordner
    Robeomega wrote: »
    Smoothing group support in blender?

    Keep dreaming buddy

    It has its own way of doing things. Just use sharp edges, it accomplishes the same thing. OBJ exporting supports smoothing groups, and in the next version of Blender it can also export FBX with smoothing info (without physically splitting the edges, as it does now) and tangents/binormals.

    It could be an issue with the inverted green channel, but it could also be an out of sync tangent basis. I don't know enough about baking in SD to really know for sure though.
  • Stromberg90
    Offline / Send Message
    Stromberg90 polycounter lvl 11
    I actually did a tutorial about this for cg cookie few months ago.
    might be worth checking out.
    http://cgcookie.com/blender/2013/12/04/baking-normal-maps-blender-xnormal/
  • Jerc
    Offline / Send Message
    Jerc interpolator
    You should use the 3dsmax tangent basis inside of Toolbag2 to get the best results with SD bakes.
  • PyrZern
    Offline / Send Message
    PyrZern polycounter lvl 12
    Might want to separate UV islands.
  • Zack Maxwell
    Offline / Send Message
    Zack Maxwell interpolator
    Okay, I have an image now of the Normal Map and UV;
    FlaskMapBug_zps3e4106fe.jpg
  • Malus
    Offline / Send Message
    Malus polycounter lvl 17
    Set the edges with the UV split to be hard.
  • Neox
    Offline / Send Message
    Neox godlike master sticky
    did you try inverting the green/y channel already?
  • HAL
    Offline / Send Message
    HAL polycounter lvl 13
    Like malus said, mark the edges as hard (sharp in blender)

    ctr + e -> mark as sharp .

    if that fails, ONLY as last resort, select the to-be-split surface and press y, it splits them. use v for single edges.

    In addition dont bake in blender, it does strange stuff sometimes, use xnormal.

    + export surface normals when exporting as .obj, it broke blender .objs for the first toolbag, couldnt reproduce it with toolbag 2 though.

    regarding the uv mapper: its quite powerful once you get the hang of it.

    good tip: use pinching ( should be on p or so) when unwrapping to dewarp the uvs. alt p removes the pinch. the vertexes with a pinch marking wont be moved by the unwrapper.
  • Neox
    Offline / Send Message
    Neox godlike master sticky
    i don't think this is an hard edge versus soft edge issue, in general if you have hard edges you NEED uv splits , but you don't have to use hard edges on UV splits, thay can bring you advantages, but in this case and as your model looks exactly the same from all angles those advantages fade away.
  • Brandon.LaFrance
    Online / Send Message
    Brandon.LaFrance polycount sponsor
    When you export your low-poly from Blender, make sure "Write Normals" is selected in your export settings.
  • Zack Maxwell
    Offline / Send Message
    Zack Maxwell interpolator
    I couldn't find an option when exporting for "Write Normals".
    I tried inverting the green channel (set it to DirectX instead of OpenGL), but that didn't fix it.
    I tried setting the edges of the UV to Sharp, and that did remove all the distortion, but there's still a clear seam along the edge of the UV that I think is caused by the Sharp edge itself.
    If I use the Normal made from the sharpened mesh on an un-sharpened mesh, the distortion is even worse than before.FlaskMapBug_zpsc4f70418.jpg
  • Neox
    Offline / Send Message
    Neox godlike master sticky
    directx open gl what? just click "flip y" in your normalmap settings in marmoset, or invert the greenchannel in Photoshop.

    the result looks better actually, some errors look as if your baked mesh has a different triangulation than the one displayed in marmoset.

    also why would you apply the bake from a mesh with hard edges to one without? apply it to the mesh it was baked onto.
  • Fuiosg
    Offline / Send Message
    Fuiosg polycounter lvl 5
    post the .blend or an obj if you want, we can tell you what's wrong.
  • Zack Maxwell
    Offline / Send Message
    Zack Maxwell interpolator
    Neox wrote: »
    also why would you apply the bake from a mesh with hard edges to one without? apply it to the mesh it was baked onto.
    As I said, the remaining issue seems to be from the mesh having the UV seams set as Sharp. It has the same kind of look before I even apply the normal map.
    The obvious next step was to try removing the sharp edge from the mesh.
    Flipping the Y in Marmoset doesn't fix it either, so it's not that.

    Here's a link to the files.
    I've got the .blend which includes the original high and low poly together, as well as the exported .fbx and normal for both the original and new verion of the low poly as well as the high poly.
    Flask1 is the original, Flask2 is the one with sharpened edges.
    https://www.dropbox.com/sh/j8fpmdk0iy3mxyn/EjwyVCSeQl
  • Tobbo
    Offline / Send Message
    Tobbo polycounter lvl 11
    Did you remember to make sure that you have a UV split everywhere that you have a sharp edge marked? The normal map also must have padding baked in with it as well.
  • Zack Maxwell
    Offline / Send Message
    Zack Maxwell interpolator
    Tobbo wrote: »
    Did you remember to make sure that you have a UV split everywhere that you have a sharp edge marked? The normal map also must have padding baked in with it as well.
    I should have the UV splits marked; that was what I used to initially unfold the UV as it is now, and I simply sharpened around where it was already split.
    As for padding, I don't know what that is or how to do it.

    Actually, it may not be split, I'll have to check that. I realized that I later decided instead to use a mirror-modifier to cut the UV space in half. When I did that I may have undone the splits along the mirror, since they would have seamed unnecessary.

    -Edit-
    After looking again, I was thinking of Mark Seam, not a "UV Split". I'm not sure then exactly what you mean. I did only Mark Sharp the edges of the UV, if that's what you mean.
  • HAL
    Offline / Send Message
    HAL polycounter lvl 13
    Neox: Blender sometimes wont export the sharp marking to the .obj for whatever reason, that's why I wrote to split it manually if all fails.

    Grim: You need to put a uv seam there!

    Otherwise you get overlapping normals.

    In addition... why on earth would you hide the mesh in edit mode?!

    :poly117:


    Check this in the wiki:

    http://wiki.polycount.com/NormalMap#Working_with_Cages
    seam.jpg
  • Fuiosg
    Offline / Send Message
    Fuiosg polycounter lvl 5
    here http://www.speedyshare.com/V7smw/flaskedit.zip

    did a quick look, not really sure what you did but there were no edges. In addition to marking the edges as sharp you have to add an edge-split modifier otherwise it won't do anything.

    Your UVs had a lot of bad distortion from not having enough islands. Make sure you check for distortion by adding a checker texture. It's called 'uv grid' under new image / generated image in the UV panel.

    I put the hi-poly is on the 2nd layer btw
  • Zack Maxwell
    Offline / Send Message
    Zack Maxwell interpolator
    Oh my God, finally. I figured it out after lots of reading and trial-and-error.
    The problem was that, since I had mirrored the UV, I had both halves overlapping each other, and that was causing the distortion.
    I had to take the mirrored half of the UV, and shift it off to the right of the main UV space, so that both halves were occupying exactly the same space on the texture without actually overlapping each other.
    This was done in Blender by just pressing G to move and holding Ctrl to snap the movement to increments, and dragging it to the right.
    Thanks everyone for the help.
Sign In or Register to comment.