Announcement

Collapse
No announcement yet.

Visible seams on normal map

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Visible seams on normal map

    There is a strange glitch with normal maps I can't explain. (UE 4.23)

    I baked a normal map from a resculpted high poly mesh to a lower poly one in blender, tested it there and it looks just fine in blender (internal render). (no visible seams)
    But when I import it into UE4, there are ugly seams on the mesh, where the uv seams are+where I did the sculpting.

    Flipping the green or any other channel, making a 2k normal map or playing around with many different options (changing the margin, color depth....) in blender/ue4 (changing different options in the texture settings) like suggested in many threads on different forums, where people had similar problems didn't help to solve this problem.
    What's causing it? Any hints?
    Attached Files

    #2
    Hard to say with certainty.
    Top issue givers: Weight Paint, Bad UV map, bad material usage, no smoothing.

    Also, the way things render within blender or any other 3d program is not an accurate method of making any kind of determination when it comes to the engine - basically, it doesn't matter what looks fine in a 3d program that has no sorts of rendering constraints, and comparing one to the other is a bit worse then apples and oranges.

    Make sure you FBX export is correct and that it doesn't mistakenly contain the high poly. I've personally done that before.
    Make sure your file has SMOOTH shading - enter edit mode, select all, drop down the Faces panel and select smooth - make sure you export correctly selecting "smooth" faces.

    I must note that it looks like the normal map is not a complete mapping in this picture. it seems like High detail in the middle and lower detail below/above the seams. basically a body should have no seams (the unwrap is not too complicated. mark a seam under the foot/palms, mark a seams on the inside of the legs all the way up. ride the seam mid-body all the way up to the cranium. then for the arms you split with another seam riding up to the armpit, at which point it half-circles to connect to the middle, in somewhat of a T shape near the scapula.)

    I'm currently having issues with the Mips causing visible seams. and this is happening despite the diffuse texture being specifically created with the background color extended well beyond the area of the seams.


    Comment


      #3
      Also make sure that in UE4 the normal map is set to use normal map compression.

      Comment


        #4
        Are you by chance using "recompute tangent"/"compute skincache"? In that case, I have found a workaround: https://forums.unrealengine.com/deve...und-a-solution and here: https://answers.unrealengine.com/que...#answer-932819
        It isn't perfect and can introduce some other artifacts, an actual solution for this is supposed to be coming with one of the next unreal versions.
        Randomized tiling function to eliminate repeating patterns in textures.

        Comment


          #5
          Unfortunately nothing did help. Can I provide my example .blend file (blender 2.79) somewhere and you can see it for yourself. It's about 18 MB. (high poly mesh (one subdivision applied, no resculpting) and low poly mesh + baked normal map with everything prepared). Alternatively I could provide the fbx+normal map.png, but where to upload?

          Comment


            #6
            Dropbox or GitHub are both good options to upload your files/projects.
            Randomized tiling function to eliminate repeating patterns in textures.

            Comment


              #7
              Here is the link to an example .blend file. (Blender 2.79).
              Just download the .blend and export the low poly mesh to UE4 and you will see a seam. The high poly mesh is only for baking.

              The normal map looks fine in blender, so it must be a shader? related problem with UE.

              https://www.dropbox.com/s/5n8khln0ao...est.blend?dl=0

              Comment


                #8
                Works fine for me, just make sure that your texture is set to normal map and that the green channel is flipped:
                Click image for larger version

Name:	Unbenannt6.jpg
Views:	51
Size:	356.0 KB
ID:	1694733
                Randomized tiling function to eliminate repeating patterns in textures.

                Comment


                  #9
                  I tried the same settings, but there is still a seam (slightly less visible). What export / import settings did you use?

                  Comment


                    #10
                    I've saved the texture as a png file and exported the mesh with these settings (My export settings were the same when I was using 2.79):
                    Click image for larger version

Name:	Unbenannt7.jpg
Views:	46
Size:	48.3 KB
ID:	1695012
                    Unreal Import settings:
                    Click image for larger version

Name:	Unbenannt8.jpg
Views:	43
Size:	35.6 KB
ID:	1695013
                    Randomized tiling function to eliminate repeating patterns in textures.

                    Comment


                      #11
                      I used the exact same settings now, but there was no "transform vertex to absolute" option. I'm using UE 4.23. Did you import it as skeletal mesh?
                      Seam is still visible (even after flipping the green channel).


                      Click image for larger version  Name:	seam_01.jpg Views:	0 Size:	47.1 KB ID:	1695035

                      Comment


                        #12
                        Yes, as skeletal mesh and my mesh has a slight seam too but nowhere near as pronounced as in your image. If you are using "recompute tangent"/"compute skincache"(editor settings and mesh settings) try turning those off.
                        One small thing, but that doesn't appear to be the main problem here, it is better to bake the normal map with a triangulate modifier and to export it with the same triangulate modifier applied, else you get small differences between Blender (quad mesh) and Unreal (triangulated mesh).
                        Randomized tiling function to eliminate repeating patterns in textures.

                        Comment


                          #13
                          Both options were turned off for doing all the tests.
                          When I use "recompute tangent"/"compute skincache" the normal map quality gets even worse. (additional artefacts)
                          Triangulation in blender before bake & fbx export didn't change anything.

                          Given Examples with different model.

                          Example one is without "recompute tangent" / "compute skincache".

                          Click image for larger version  Name:	example_1.jpg Views:	0 Size:	77.6 KB ID:	1695590

                          Example two is with recompute tangent and compute skincache checked. Example two is of particular interest, because my game has shape keys
                          for my characters and I need the shadows to be absolutely correct and realistic, when the character raises his arms while a shape key is applied etc.

                          Click image for larger version  Name:	example_2.jpg Views:	0 Size:	72.8 KB ID:	1695589



                          In both cases I flipped the normal map green channel.
                          In the second case the settings / material blueprints are as follows:

                          Click image for larger version  Name:	annex_example_2.jpg Views:	0 Size:	138.8 KB ID:	1695591

                          What can I do in order to remove these awful artefacts / seams.
                          Is this a bug in the engine or expected behavior (lack of precision, bad compression?)
                          Should I report this as a bug or do you know of a better blueprint setup that a least reduces these artefacts on the normal map?

                          Comment

                          Working...
                          X