Render To Texture Normal Maps Appear Incorrect
Hello. I'm using the render to texture features for the first time whilst following the 'Baking Materials to Textures' Live Training video by Unreal and so far my textures have all baked correctly apart from the normal map.
I'm assuming the idea is that you bake the normal that has normal compression into a regular texture and then use that without normal compression. So following this, the baked normal looks fine in some areas, but in some it still appears incorrect. Mainly it seems like the red channel is much weaker than it should be.
I imported the baked normal into Photoshop and set the bits to 8Bits per channel as according to the video, but they don't show the baked normal map in effect so I don't know if I'm alone here. I plugged both the correctly functioning normal map into an emmisive of an unlit material and compared it to the baked normal shown below, there's literally no visual difference in the normal map. I'm confused.
I'm assuming all normal compression and then baking messes up somewhere along the lines and results in this, though I can't seem to pinpoint why it looks this way. Any help is much appreciated.
Thanks to a blog post made by Oliver M-H (linked below) I've managed to successfully bake a normal map correctly.
Turns out multiplying a normal map by 2 and then subtracting 1 will have the same effect of normal compression, so reversing this (adding 1 then dividing by 2) on your material normal output then baking will result in what looks like a correct normal map (like on the right in image in main post). Then simply take that and set up the normal compression settings a standard normal map would have.
As mentioned in the video, taking the baked texture into Photoshop to set the bits per channel to 8 which was supposed to fix some depth problems, for me just broke the normal map again. I'm unsure whether this affects overall performance,
I'm also rendering normals to textures. After solving the N*2-1 conversion, it was still generating very strong normals. To fix I Normalize the normals before the N*2-1 conversion. It now outputs normals identical to the original ones. And I do the conversion using the ConstantBiasScale node. The default values of 1 and 0.5 are exactly what we need.
Also, for anyone else baking material outputs into textures, for the BaseColor to appear correct, I had to do BaseColor^(1/2.2) to render the colors in sRGB. Then, after creating the static texture from the normal map, I always activate sRGB in the texture properties.
The baked textures now result in a material identical to the original one.
answered Sep 06 '18 at 06:01 AM
Follow this question
Once you sign in you will be able to subscribe for any updates here