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:
https://i.gyazo.com/6974ed4718ee6e663b8070acdb7b6ada.jpg
However, I noticed that the compression is set to:
https://i.gyazo.com/c43c3ca28b4aeb274724c3d8d854b586.png
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:
https://i.gyazo.com/8d90d55819a7c0a88fcf93e48e1cbcac.png
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:
https://i.gyazo.com/e52164430f603022ed99911b207140b3.png
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.
https://i.gyazo.com/e0cd1e2c1ed8eb5a1318219d80360df5.png
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
https://i.gyazo.com/eee83114d613cc758e2d3b8fa98ca9fc.png
This is what it looks like without the bias node:
https://i.gyazo.com/e84e19b06188c51abcde32bd2cdfbd33.png
And this is what it should look like
https://i.gyazo.com/7e2038ad0d30384977f402626108e811.png
If anybody has encountered problems like this before, or could point me to some helpful resources, that would be amazing.