3
$\begingroup$

This mentions Unreal Engine but the problem is in Blender.

I'm creating a small hallway and exported it as fbx to use it in Unreal Engine 4. I followed this tutorial for baking and exporting.

When I placed it in Unreal Engine I noticed something weird with the lighting: Unreal view

In the image above, if you look closely, the left side of the point light (identified with the lamp icon) appears basically dark on the wall while at the right side has actual light. You can tell the lighting is incorrect by the light reflection on the floor.

I know this is a problem with the normal map in blender because if I delete the normal map in Unreal the issue dissapears and, sadly, I'm left with a relatively cheap version on the wall material.

Blender view Blender view of the hallway with a point light

I've searched everywhere for this and couldn't find anyone with this issue. Any help is appreciated. I've been hitting my head for days.

I have a backup collection with the original mesh and unbaked textures and another with the mesh with the baked textures, I Also inverted the green channel in the baked normal map.

$\endgroup$
5
  • $\begingroup$ Could you attach your .blend file: blend-exchange.com $\endgroup$ Jul 6, 2022 at 9:43
  • $\begingroup$ Of course. I flipped the green channel in the normal map of the baked texture. Also I have a backup collection with the unbaked textures. $\endgroup$
    – face
    Jul 6, 2022 at 10:56
  • 1
    $\begingroup$ Your normal map is referenced as sRGB in Blender, when it should almost certainly be non-color. The images aren't packed into the file, and it's not clear whether this is an issue that will affect Unreal, but if you bake normals to sRGB, and unreal reads normals as non-color, which it almost certainly does, you'd see a shift like you're describing. This isn't the only potential cause of issues, but it's not clear what normal map you're trying to use in Unreal, and it's not clear how you created it (high to low bake?) $\endgroup$
    – Nathan
    Jul 6, 2022 at 16:49
  • $\begingroup$ I don't know what hight to low bake is so I figure I didn't use it. I'm not really an expert in blender. I'll try the non-color and post a screenshot of the bake settings. $\endgroup$
    – face
    Jul 7, 2022 at 1:14
  • $\begingroup$ @Nathan Thank you soooo much. You're literally my saviour. I almost started getting depressed because of this. I didn't set the "Non-Color" Setting. I don't want to get over emotional but really, you just made my day! :D $\endgroup$
    – face
    Jul 7, 2022 at 1:39

2 Answers 2

2
$\begingroup$

Blender uses OpenGL normals, while Unreal - DirectX. To convert one format to another, invert Green channel:

enter image description here

enter image description here

Here is the list of applications that you can check if you have to convert normal maps:

Application Normals
Blender OpenGL
3DS Max DirectX
AMD OpenGL
Arnold OpenGL
Cinema 4D OpenGL
Corona Renderer DirectX
CryEngine DirectX
Godot Engine DirectX
Houdini OpenGL
IClone OpenGL
KeyShot DirectX
KeyShot 9+ OpenGL
Marmoset Toolbag OpenGL
Maya OpenGL
Modo OpenGL
Nvidia DirectX
Octane Render OpenGL
Redshift OpenGL
Shade3D OpenGL
Source DirectX
Substance Designer DirectX
Substance Painter DirectX
Unity OpenGL
UnrealEngine DirectX
VRay OpenGL
Zbrush OpenGL

BTW for me, texture looks right in Unreal and wrong in Blender. So maybe the texture is DirectX actualy

$\endgroup$
7
  • $\begingroup$ Thank you, I will try it in a few minutes. Does blender has this feature of I must do it in another program? $\endgroup$
    – face
    Jul 6, 2022 at 9:58
  • $\begingroup$ You can do it in 2D editor $\endgroup$
    – Crantisz
    Jul 6, 2022 at 9:59
  • $\begingroup$ BTW for me, texture looks right in Unreal and wrong in Blender. So maybe the texture is DirectX actualy $\endgroup$
    – Crantisz
    Jul 6, 2022 at 10:00
  • $\begingroup$ Well, I tried to flip the green channel but sadly it didn't change anything. I re-imported it to Unreal with the modified normal map and the result was the same. What do you mean by looking right in Unreal and wrong in Blender? I don't understand. $\endgroup$
    – face
    Jul 6, 2022 at 10:49
  • $\begingroup$ Try clicking sRGB in texture settings then $\endgroup$
    – Crantisz
    Jul 6, 2022 at 11:59
1
$\begingroup$

Okay after a few days of struggling I was able to solve this problem. All of the credit goes to Nathan!

The issue was when I was creating the image to bake the Normal Map to, the Color Space setting was automatically set to sRGB. All I had to do is change it to Non-Color and voila! It started giving me a correct circle relfection on the wall.

But wait! This doesn't mean everything was fixed. I still had to invert the green channel so that the normals were dark and bright in the correct sides.

That was it. I hope this post helps people with with issue. Have a nice day!

$\endgroup$

You must log in to answer this question.

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