Background
I have been trying to solve a seemingly simple problem with normal map baking in Blender 2.9 since last weekend. I wanted to make sure that I read and researched as much as possible before asking for help, but after reading several articles and even signing up for CG Cookie and watching their normal mapping course, I am still having issues.
The following is a simplified example of the issue I am having, using a simple cube as a demonstration.
Low-Poly Mesh
First, I created a model in Blender.
High-Poly Mesh
I then created a "high-poly" version of the model, with beveled edges and a bit of detail.
Bake One - Distance-Based
I made a first attempt at baking the normal map, using distance.
This gave me incorrect-looking edges, and after reading a few articles and forum posts, I learned that distance-based projection causes the exact same area of the mesh to be baked multiple times onto different adjacent faces
- Common XNormal Baking Errors and How to Solve Them
Bake Two - Cage-Based
Several people suggested using averaged normals to combat the projection issue, which can be achieved in Blender by using a cage-based bake.
This seemed to work slightly better, however, the "true identity" of the cube is clearly visible and there is no way that anyone would even think that it was a smoothly beveled cube.
I thought that maybe the reason why it looks so "cubic" is because of its self-shadowing, however, if you compare the original, non-normalmapped cube, to the end result, the contrast between shadows and highlights is much more prominent, and the edges, therefore, look somewhat sharper than the original!
- Old version (incorrect node setup)
Update 1
I realised shortly after posting that, embarrassingly, my nodes were hooked up wrong in the node editor (I was missing a Normal Map node).
I re-rendered both examples, thinking that this could be the reason why I was having this issue.
As you can see, they look not only wrong, but actually look worse than before!
- Old version with updated node setup
Update 2
I changed the Image file color space of Image Texture node from Color to Non-Color Data, as per MrZak's advice and now have much better results.
Now it is just a question of whether or not it is actually possible to get perfectly smooth corners, considering that there is self-shadowing, that make areas of contrasting highlight/shadows still appear slightly sharp close-up.