How to fix mirrored normals

I exported a model from Blender and I mirrored it completely so it can share both the texture and normal map. Now the seam is visible and the other half’s normal in engine is upside down. I’ve tried this solution: Normal map is inverted when using mirrored geometry - Rendering - Epic Developer Community Forums but It did not work so I assumed it’s outdated in some way. My attempt:

193255-3.png

I wasn’t even able to see a difference changing to clamp or anything.

How can I fix my models without having to resort to doing clamping and logic in the material itself?

that trick doesn’t really work, since mirroring the normal-map will… well… also give you a flipped normal map.

that said, nowadays this isnt a much-practiced thing anymore and we tend to just bake everything onto the texture instead of mirroring it.

So your suggestion would be to just half everything x-wise to fit both halves into the 1 texture?

That is what I would do. I hope someone replies with an answer that makes me go “oh, wow… there is a way!” though.

I know of a way to adjust normals when they are rotated, but flipped… hmm.

even with proper tangents and normals, flipping a normal map that way will result in very wrong results though.

I’ve ran into this issue not so long ago. Mirrored UVs are absolutely fine in UE4, however, there are few caveats, including limitations of the software you are exporting from.

Firstly, you have to ensure, that your modelling software is exporting mirrored tangents and binormals correctly. Last time I tried, blender did not by default.

Then You have to ensure that UE4 importer is set to import tangents and binormals.
You should get a seamless mirrored mesh.

If with this settings, you are getting the result, like the one you have on your picture(one side has flipped normals) It most likely means that your modelling software and/or its exporter is not exporting mirrored binormals correctly.

In this case, you can set UE4 importer to “Import Normals” and it will automatically generate binormals properly, however the drawback is that tangent space will be slightly discontinuous along UV edge, and you will notice a slight seam in normal map.

Do note, that you do not need to set sampler tiling mode to mirror.

I am not sure which packages and their versions are exactly capable of exporting mirrored tangents/binormals properly, but I can safely say that not all of them are. In fact I would be really grateful, if anyone would put up a list with that.

As Luos mentioned, these complications are main cause for mirrored UVs not being popular, when used with normal mapping.

1 Like

OP was referring to this kind of mirroring, which relies on flipping R channel in material.

First I would not mirror the UVS both sides should use exactly the same uvs only mirror the object itself (mirror modifier would be the best way i think).
When you use Object->Mirror->… Try this: go into blender select the mirrored object after applying the mirror then ctrl-a apply scale after that edit mode shading/uvs (select every face) “recalculate” then export. Because what blender does with its mirroring it just uses -1 scale and thats what unreal seems to dislike. After applying the scale you will also see the issue in blender iteself.
If this doesent do it feel free to upload the .blend file and i’ll take a look at it

in that case, that is correct.

So I logged back in yesterday to fix it and apaprently it fixed itself magically. The texture still set to wrap and the UV was placed normally within the texture yet it magically fixed itself. I have no idea what the hell is going on but the UE4 restart seemed to fix the problem.

The real answer to this is to uncheck sRGB in the texture properties. It seems to use bootlegged world normal, otherwise. It is also best to have the Compression Settings = NormalMap (if it is not).

Mirroring UVs should always be supported by engines, as they are great for optimizing texel density and not having to do re-work. Especially useful in Environment Art pipelines.

Check my latest answer, sir! Mirroring normals is the best way to get extra texel density, not have to rebuild extra parts of the model, and also remove seems on such items as curved cylinders (which completely wrap back to itself). I know that Substance Painter does a lot of these things, but not everyone has access to it nor are all of the “new-aged” people trained properly in getting extra texture resolution/density, and are over-reliant on the new tools. Reminds me of being in college: just because some kid had the latest mac book, didn’t automatically make them the best artist.