Hi, I’m trying to create an atlas-generator inside of UE4, and it’s going okay - but I’ve encountered a problem which i’m hoping is just due to a simple but fundamental gap in my knowledge of how normal maps work inside Unreal. I’ve had a look for people encountering the same issue but haven’t had any luck.
Here’s a video of the generator “kind of” working: [video]https://i.gyazo.com/0cb4b55e9c58b296c62849b47bc13711.mp4[/video]
So, I draw a render capture of the world normal buffer, which results in this, which looks ok:
However, I noticed that the compression is set to:
This is fine, as I don’t intend to use the render capture directly anyway… So I right click my capture, and turn it into a static texture, and on this one, I set it to use normal map compression:
However, as you probably noticed, the normal map already looks a lot darker… Which I find strange. But anyway, things get even weirder in the material editor. Where my normal map now looks like this:
I find that If I use a constant bias scale node with the default values, it ends up looking a lot more like it should.
This is actually useable, however, it is far from perfect, as all of the values in the (-1,0) range are excluded, which means the map does not display as it should. Also, I am no longer able to Flip the green channel, as the values to flip do not exist. It seems that world normals from the gbuffer sometimes need to be flipped in order to display correctly. So this is another significant problem.
If I clamp the values to the 0,-1 range and then invert the map after the bias node, you can see nothing is displayed
This is what it looks like without the bias node:
And this is what it should look like
If anybody has encountered problems like this before, or could point me to some helpful resources, that would be amazing.