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.

http://i.imgur.com/wKsLLVs.jpg

http://i.imgur.com/GY2QTl0.jpg

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, but looking at the sizes a 32bit HDR is still smaller than a 8bit TGA, which doesn’t tell me much since TGA seems to always be locked at 48mb. Under the details panel the resource size seems to be half The baked normal with 32 bits per channel appears correctly so far, there are a few minor artifacts but I’m unsure whether much can be done about them.

One extra note. Using the ‘BlendAngleCorrectedNormals’ node to combine multiple normal maps will bake out incorrectly!
Use a Add/Multiply blend instead as shown here:

I’m also rendering normals to textures. After solving the N2-1 conversion, it was still generating very strong normals. To fix I Normalize the normals before the N2-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.

I don’t remember exactly my set up since this was quite a while ago but even after managing to replicate identical materials, the biggest issue I had is that mipmaps wouldn’t really work or be created with the baked textures. I wanted this baking process to be as automated and as isolated in UE4 as possible, but that was the deal breaker for me since I couldn’t find a way to get mipmaps to work correctly.