Home Technical Talk

Best way to clone stamp out normal map seams with partially rotated uv's.

polycount sponsor
Offline / Send Message
malcolm polycount sponsor
I came across a particularly troublesome model at work recently. I was asked to fix the seams on a rock model's normal map. It turned out the seam was not caused by the baked normal map, but by the 2D overlay map that was applied to create some nice high frequency noise.

Unfortunately the rock's UV layout was authored like a cardboard box in shape so clone stamping out the uv's in 3D space didn't work in Maya or Mudbox. I'm assuming this is because the 3D painting tool is projecting across the seam and inadvertently rotating the normal map colours.

How I got around this was not desireable, a colleague suggested I create a height map from my normal map, paint it on across the seam edges in 3D and then convert that to a normal map in Knald. This fixed the seams, but it didn't look as natural as it could. It would have looked better if I clone stamped it from the existing normal map.

So I'm just wondering does anyone have a better suggestion how to fix this kind of issue in the future. I'm just exploring xNormal at the moment for converting the normal map to object space, then clone stamping, then convert that bake to tangent space to see if that works.

normal_map_seam.jpg

Replies

  • Eric Chadwick
    Options
    Offline / Send Message
    I don't think you can paint normal maps properly across seams like this, as the tangent colors are going to be very different.

    It's better to go back to the source high-res sculpt, alpha stamp your high-frequency detail on there, then bake that.

    This assumes you're not using a detail map, a small map tiled multiple times across the model, for closeup detail. For that, there's no real solution except to try to hide your UV splits.

    Maybe you could use tri-planar UVs. Here's an example. https://www.assetstore.unity3d.com/en/#!/content/23425
  • heyeye
    Options
    Offline / Send Message
    heyeye polycounter lvl 6
    If its just a noise overlay can't you just cut and overlap the UV's? You might get a little stretch, but if its just high freq noise the seams are a bigger issue.
  • malcolm
    Options
    Offline / Send Message
    malcolm polycount sponsor
    Without redoing the uv mapping I'm stuck. Tried the object space route today and that doesn't work either, seems like this is impossible without sewing the uv edges together. Even tried the method I used at work and it won't work on this cube, so now I'm not even convinced it worked before, but just reduced the issue.
  • m4dcow
    Options
    Offline / Send Message
    m4dcow interpolator
    Do you have the option of redoing the high frequency noise on the normal map? Substance Designer 5 has a tri planar projection feature which if you re-do the high frequency noise over a correct normal map should fix those seams.
  • malcolm
    Options
    Offline / Send Message
    malcolm polycount sponsor
    I've actually tried redoing the noise over a correct normal map, in fact the example above doesn't even have a normal map bake on it just some noise. Projecting the noise into uv space doesn't seem to solve the problem. Also triplanar projections in any software don't solve any seaming problems unless you've got beveled edges for the falloff to blend out. I would imagine this is the same in substance, but I know for sure it doesn't work in Mari or Maya which both have triplanar projections.

    This is kind of messing with my mind, is it really not possible to fix a normal map seam across uv shells that face different directions?
  • Eric Chadwick
    Options
    Offline / Send Message
    How about using a 3d procedural texture, and baking from your lowpoly rock geometry into a normal map? This way the noise has no seams, and it's converted into the proper normal map colors to match the rock's normals. Then you can blend it into the high-poly sculpt map.
  • malcolm
    Options
    Offline / Send Message
    malcolm polycount sponsor
    Hey Eric, I've tried projecting into the correct uv space so the colours don't mismatch, but I still get a seam?
  • Eric Chadwick
    Options
    Offline / Send Message
    Are your normal maps usually seamless with your workflow? As in, baker matches display?
  • Farfarer
    Options
    Offline / Send Message
    For a situation like your example, you can simply swap the red and green channels where you clone stamp them, as your UV edges are rotated exactly 90 degrees. Although you'll need to be careful about how you blend it back down.

    For anything at an angle you're going to have a much tougher time.

    It can't easily be done without converting to something that's space agnostic (i.e. a bump map) do your editing, then convert it back. But I doubt even that is going to be a lossless or probably even an accurate process. For noise like this, I don't think it'll be the end of the world... for a proper bake with specific details it'd be much harder.
Sign In or Register to comment.