1
$\begingroup$

I am having some really weird issues trying to get a working normal map for this small props project I'm doing. Here's the whole scene set up in UE4 (after modeling in Blender, sculpting in Zbrush, and texturing/baking in Substance Painter), the lighting is reading completely crazy on this because the normal maps seem to be inverted in weird places. Can anybody help me figure out what's going on? This is driving me insane as I can't find what the issue is.

Scene in UE4 with lighting on (see how all the faces are reading dark and bright in odd places), and world normal mode reflects how whacky this is: enter image description here

Substance Painter normal preview shows how the faces look inverted in weird areas that are exactly where they look weird in UE as well. enter image description here Substance Painter materials view, how the textures (and lighting) are supposed to look... but if you zoom in you'll see the normal seaming issue. enter image description here

Normals, faces etc. all look fine in Blender. I've tried recalculating and weighting normals, neither have fixed the issue. Here are my fbx export settings as well. enter image description here

Substance Painter project and baking settings. enter image description here

If anyone could help me out figuring out what is going on with these messed up normals (and therefore causing the lighting to look completely broken and make seams super intrusive) I would really appreciate it.

$\endgroup$
4
  • $\begingroup$ did you make sure that the Image Texture is set to Non-Color instead of sRGB and also maybe use 32-Bit Float images? Maybe share one of the object where you see the problem (don't forget to pack the image)? pasteall.org/blend $\endgroup$
    – moonboots
    Commented Feb 18, 2022 at 18:16
  • $\begingroup$ @moonboots textures are all set to not sRGB in my UE project, how do I change to 32-bit float images? Sure thing here's just the chair (though it is happening with all the assets) pasteall.org/blend/764bbc1a1c4c48ab81f032e4b618daf1 Thanks so much for looking it over! $\endgroup$
    – CHRISQI
    Commented Feb 18, 2022 at 18:28
  • 1
    $\begingroup$ you haven't packed the normal image texture to your file, could you please do it (File > External Data > Pack Resources) and save + share again? $\endgroup$
    – moonboots
    Commented Feb 18, 2022 at 18:33
  • $\begingroup$ @moonboots Thank you, had no idea that was a function! pasteall.org/blend/b8428f90b3c34b2684e03146ea6d73cb $\endgroup$
    – CHRISQI
    Commented Feb 18, 2022 at 18:39

3 Answers 3

1
$\begingroup$

As you see it seems to work, plug the normal map into the Normal Map node, choose Non-Color in the Image Texture, increase the Strength value of the Normal Map node:

enter image description here

$\endgroup$
4
  • $\begingroup$ Unfortunately this seems not to fix the main problem which is that the normal map faces are strangely inverted? This would just display the map onto the model right? Is there anything you can see that is wrong with the mesh itself that would be causing the normal map inverted faces issue? Thank you for trying this out though! $\endgroup$
    – CHRISQI
    Commented Feb 19, 2022 at 3:03
  • $\begingroup$ maybe try Object Data > Geometry Data Clear Custom Split Normals Data $\endgroup$
    – moonboots
    Commented Feb 19, 2022 at 6:14
  • $\begingroup$ maybe share the high-poly from which you made the normal map? $\endgroup$
    – moonboots
    Commented Feb 19, 2022 at 13:33
  • $\begingroup$ I did not have any custom split normals data so unfortunately that is not the problem. My high poly sculpt is too large to share via pasteall so here's a google drive link: drive.google.com/file/d/1Rc8Cin4i82N82oelgKDEjnw1W43FIlV2/… $\endgroup$
    – CHRISQI
    Commented Feb 19, 2022 at 17:41
1
$\begingroup$

First, let's talk about what you're concerned about that is not an error:

enter image description here

The reason your normal map is all seamed up is because it has seams.

A tangent-space normal map is measured relative to the surface normal and the UV tangent, which is the direction of increasing U. The direction of increasing U changes across seams. Because of that, don't expect the color of a normal map to be continuous across seams. It's not supposed to be, it doesn't have to be. Instead, look at the actual normals:

enter image description here

We can see, with a roughness 0 glossy shader, that the normals are continuous across that region, even though the color of the normal map isn't.

You may wonder what I'm doing with my normal map there. Your pictures indicated you baked this for DirectX, while Blender is an OpenGL application. The significance of that difference for baking normals is the handedness of the coordinate system, and to convert a normal map from DX to OGL or vice versa, you invert the green channel.

That doesn't mean there are no concerns here. Let's look at some other parts of the normal map:

enter image description here

This kind of thing doesn't look good. Although you didn't provide the high poly, it's easy enough to imagine what happened here. Rather than the low poly's faces following the high poly's, giving you smooth, continuous normals, you've made a low poly out of self-intersecting geometry. You're not going to get the smooth normals of your high poly on any of these places made out of self-intersections.

Now let's look at your cage, which you provided in the file:

enter image description here

Your cage appears to just be your low poly, with a live displace modifier. There's not really any reason to use a cage in that situation (as you've noticed, using it doesn't change anything), because a bake with some ray extrusion, or whatever SP calls it, is the same as baking from a displaced mesh. However here, we can see some self intersection in the low poly, which is going to translate into some wonky reads from the high poly. If you wanted to use it, it would be smart to edit this cage to smooth that area out with alt-s on individual vertices.

One last thing that worries me here, although there isn't enough information to absolutely know that it's a problem: this mesh is all quads. Isn't that supposed to be a good thing? It's not, when you're dealing with multiple engines (Blender, SP, UE) that aren't necessarily going to triangulate meshes in the same way. Different triangulations will lead different interpolation of vertex data across the mesh, and whenever you bake any kind of texture, you need to know that you're baking it to a particular triangulation.

enter image description here

That's what happens when we flip triangulation on your model (fixed to fixed alternate.) Neither of these triangulation methods is necessarily what SP used for the bake. If you are using SP to paint textures, and UE to render, you should be exporting a consistently triangulated model to each.

$\endgroup$
4
  • $\begingroup$ Thanks so much for the thorough breakdown, much appreciated! Looking back at previous models I may be freaking out a bit too much over the colour but the reason this one in particular concerns me is that where the colours differ across seams is also where lighting information and world tangent information seems to go crazy. I do wonder if this is simply a directx to opengl issue but have tried both with the same results. I've followed your advice and triangulated the mesh and rebaked, but this strange inverted lighting/normals issue is still occurring: imgur.com/n8iewGY $\endgroup$
    – CHRISQI
    Commented Feb 19, 2022 at 17:46
  • $\begingroup$ Also I've uploaded my high poly here if you want to take a look and that might help diagnose anything: drive.google.com/file/d/1Rc8Cin4i82N82oelgKDEjnw1W43FIlV2/… Good point calling to attention the intersecting geo and cage! However I don't think they're contributing to the overall issue of weird faces/normals. What do you suggest on fixing these intersecting geo normals in future? Once again, thanks for your efforts and time! $\endgroup$
    – CHRISQI
    Commented Feb 19, 2022 at 17:56
  • $\begingroup$ Not being familiar with UE, I can't tell you-- but that is definitely where you need to be looking for answers, maybe some site focused on UE rather than Blender. I agree, with some better pictures and labelled views ("lighted"), that your issues are more significant than the ones I've mentioned. The solution on intersecting geo is don't make intersecting geo for your low poly-- make a single manifold mesh. $\endgroup$
    – Nathan
    Commented Feb 19, 2022 at 17:58
  • $\begingroup$ Thanks for trying to help out anyways! $\endgroup$
    – CHRISQI
    Commented Feb 19, 2022 at 18:01
0
$\begingroup$

Posting for posterity sake! This was indeed a UE issue not a Blender/texture map one. For anyone trying to find the answer to perceived weird seaming and light information, make sure all your textures are set to the correct compression settings and sampler types in the materials, as well as checking off sRGB.

$\endgroup$

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .