4
$\begingroup$

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. A simple low-poly cube


High-Poly Mesh

I then created a "high-poly" version of the model, with beveled edges and a bit of detail.

A high-poly cube with beveled edges and details


Bake One - Distance-Based

I made a first attempt at baking the normal map, using distance.

enter image description here Results in "same area being captured multiple times 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

enter image description here - 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.

enter image description here Edges look better, but the object is clearly a sharp cube

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).

Material node structure before Material node structure after

I re-rendered both examples, thinking that this could be the reason why I was having this issue.

Distance-based bake 2nd attempt Cage-based bake 2nd attempt

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.

The corners look a lot smoother than before

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.

Edges still look slightly sharp


- New version with Normal Map node set to Non-Color Data

$\endgroup$
  • 1
    $\begingroup$ Is the low poly cube set to 'smooth shading' ? $\endgroup$ – Bert VdB Apr 7 '18 at 11:18
  • $\begingroup$ @BertVdB It was set to flat before the bake and I tried with both flat and smooth after the bake, both with similar results. $\endgroup$ – Polygami Apr 7 '18 at 11:33
  • 1
    $\begingroup$ Image texture with normal map has to be set to Non-Color Data to make normal map working as expected. Lowpoly object should have smooth shading to avoid double baking of the same face to the normal map (highpoly as well for this reason but yours is already). $\endgroup$ – Mr Zak Apr 7 '18 at 17:21
  • $\begingroup$ @MrZak. That almost fixed the problem and it is nearly correct. The sharpness is now only visible in areas with contrasting shadows and highlights.I'm starting to wonder if it is even possible to get it any smoother, due to the lighting/self-shadowing. $\endgroup$ – Polygami Apr 7 '18 at 17:53
  • 1
    $\begingroup$ I think you don't understand what a normal map is. A normal map is simply tweaking the lighting to give the appearance of more geometry than is actually there. The geometry doesn't change...so you'll never get smooth edges where there aren't any. You're just bending the light to make it appear smooth. If you want ACTUAL smooth edges then you either need a Displacement map (that actually moves the edges) or a higher-poly model. Normal maps will NEVER change the silhouette of an object. $\endgroup$ – Dale Cieslak Apr 7 '18 at 19:00

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.