Home Technical Talk

Normal Map Issues

polycounter lvl 10
Offline / Send Message
Christian Cunningham polycounter lvl 10
I have read everything on this site about normal maps, I have been baking normal maps for years and now I am having issues, I hope you guys can help me out.

Here are some of the rules I live by:

*Always have UV split where there is a hard edge*
*Its okay to have a UV split where there is a soft edge*
*Only have hard edges on 90 Degree Edges and higher, everything else is soft*
*Have enough UV spacing so things dont bleed*

I wanted to go back to the basics and and just make sure I had a good understanding of baking. I made a cube, extruded some faces. Put the hard edges on, split the UVs. Duplicated that cube, threw some supporting edges on the cube and smoothed it so it had some soft bevels. Exported them, Opened them up in Painter and hit bake. To my supurise there are seams! What am I missing? Below is an image of those seams. I have also messed with the values of Painters cage to make sure everything was actually being baked.






Here are the files

https://drive.google.com/open?id=1QFZLjk1-NVJDk3kUGhzKvEC54rGJqa4X


Thanks





Replies

  • Mirbobo
    Options
    Offline / Send Message
    To me it seems quite like what you'd expect. I'm at work so can't download the file now, but everytime you use hard edges in your low-poly you are going to get a minimal seam at the edges.
    You can try the usual flip green-channel, make sure you have enough padding, no overlapping UV faces, use averaged projection etc. just in case. But I'm not sure if they are going to change anything.

    EDIT,
    Did a quick bake with a cube to demonstrate that you'll always gonna have some visible hard edges unless you chamfer every corner and use smooth shading. Simple cube with and without smoothing splits.


  • Christian Cunningham
    Options
    Offline / Send Message
    Christian Cunningham polycounter lvl 10
    Why does the one with a single smoothing group have a less visible seam? Since the cube has hard edges shouldnt you be setting up multiple smoothing groups?
  • Mirbobo
    Options
    Offline / Send Message
    With synced workflow you don't necessarily need to use multiple smoothing groups, even on a box or other hard-surface objects. It's recommended, but not necessary. The tangent-space normal map rely on the underlying surface and normals, so that's why you can still kinda see the hard edges even after baking. Someone else can probably give a more technical answer here why and how this happens.
    The seam visible there is so small that with actual texture on top it's extremely hard to notice and generally not something that you need to worry about. 
  • Axi5
    Options
    Offline / Send Message
    Axi5 interpolator
    I'm guessing that's substance painter.

    Turn the shader samples up, the seams should go away. The reason for this I think is that substance has some issues with roughness and tangent maps. I think the seam goes away when you get smoother materials. Haven't tested this thoroughly though.

    Also try previewing your normals in another piece of software such as unreal or unity
  • Christian Cunningham
    Options
    Offline / Send Message
    Christian Cunningham polycounter lvl 10
    Thank you guys, Happy new year
  • Thanez
    Options
    Offline / Send Message
    Thanez interpolator
    Mirbobo said:
    With synced workflow you don't necessarily need to use multiple smoothing groups, even on a box or other hard-surface objects. It's recommended, but not necessary. The tangent-space normal map rely on the underlying surface and normals, so that's why you can still kinda see the hard edges even after baking. Someone else can probably give a more technical answer here why and how this happens.
    The seam visible there is so small that with actual texture on top it's extremely hard to notice and generally not something that you need to worry about. 
    TLDR; Normal maps are limited in what they can do by their bitrate :)
    As you said, when you're using tangent space normals, it alters each vertex's normal by adding onto the model's vertex normals, so because OP split the vertex normals, the normal map is the limit to how well the split can be covered up.
    The normal maps are limited in two areas, they can't compensate for 90° angles very well, and they have a limit to how many steps they can alter the model's normals by their bitrate. 8bit maps have 256 values in each channel, 128 equals no effect, so you have 127 specific individual adjustment levels per channel. Your edge is imperfect because that split in the model's vertex normals requires 47,623 or some bullshit number but the normal map can only deliver either 47 or 48, so you're fracked.
    Twice fracked even, because every one of those ~45 degrees of the edge on each side of the split don't have a pixel of their own to represent them.

    If you want a perfect edge, keep it in a single smoothing group a.k.a. no hard edges, then compensate either by adding a chamfer or doing custom vertex normals or even supporting edgeloops, though a chamfer is cheaper to render and better looking. 
    If you switch to object space normals, it'll completely override the model's vertex normals, so if your bake is perfect in the sense that all edges were completely and perfectly captured, you should get a better result. Object space normals can't be compressed very much before they break tho, and they're hard to edit so you'll probably have to model in all your detail instead of doing texture based normals.
    Pros and cons

    I should point out that if you texture it and add detail normals, the split in the vertex normals won't be noticable at all.
    The tip of this barrel has a hard edge with no effort to cover it up at all. Just a nice clean bake with synced normals.

    The model is here if you wanna look for yourself: http://skins.thanez.net/spas12/wip/

    Christian, here's a couple of rules you can test out:
    *Don't chamfer an edge if that chamfer won't render by at least 2px width on screen*
Sign In or Register to comment.