4
$\begingroup$

I have been learning how to bake normal maps in Cycles for a little while. But I have run into a slight problem. I get these black edges/shading on curved edges.

Edit: I added .blend file. enter image description here

So my question is. How can I fix/prevent this from happening? Also I am using a cage.

Reagrds, Koreenium

$\endgroup$
  • $\begingroup$ Welcome to BSE, including more details in your question and uploading the .blend file will help you get more accurate answers, we can't see the shape of the cage or the high res object here, nor the baking parameters, you can upload the .blend file here: blend-exchange.giantcowfilms.com $\endgroup$ – Georges Jun 6 '16 at 9:17
  • $\begingroup$ This is caused by the fact that the normal color (let's say R: 128, G: 192, B: 255 -> aka a normal pointing up when you view the normal map at about 45°) which defines the particular little space on the actual polygon which is also pointing upwards, let's say at a 88° angle compared to the camera view vector. The resulting angle of the vector pointing up for that little tiny space on the polygon is then 88°+45° which is far more than 90° and thus looks black since the ray as far as Cycles is concerned basically goes into the polygon. $\endgroup$ – Alphisto Jan 9 '17 at 17:01
  • $\begingroup$ One way to "fix" this is by using fresnel to gradually reduce normal map strength at grazing angles. This won't help you in Game Engines I suppose but as far as I've seen they handle this little problem well as I only encounter it in rendering engines. $\endgroup$ – Alphisto Jan 9 '17 at 18:11
3
$\begingroup$

This is caused by the fact that the normal color (let's say R: 127, G: 192, B: 255 -> aka a normal pointing up at about 45° when you view the bitmap normal map in image editor) which defines the particular little space on the actual polygon which is also pointing upwards, let's say at a 88° angle compared to the camera view vector. The resulting angle of the vector pointing up for that little tiny space on the polygon is then 88° based on geometry +45° based on normal map which is far more than 90° and thus looks black since the ray as far as Cycles is concerned basically goes into the polygon.

Normal Map Grazing Angle Black Issue

Normal Map used in the above picture:

One way to "fix" this is by using fresnel to gradually reduce normal map strength at grazing angles. This won't help you in Game Engines I suppose but as far as I've seen they handle this little problem well as I only encounter it in rendering engines.

$\endgroup$
2
$\begingroup$

In my experience, lines around a mesh can often be caused by jagged edges and Smooth shading. See my answer here.

Solution

I assume you have Smooth Shading on, as activated in the Toolshelf. If you do, either return to Flat Shading or add a Subdivision surface object modifier.

To add such a modifier, first go to the Object Modifiers tab in the Properties panel. Select Subdivision surface from the options. Set both the View: value to 2 and the Render: value to 3.

Final modifier settings:

enter image description here

Smooth shaded Suzanne without any subsurf:

enter image description here

Smooth shaded Suzanne with subsurf at 3:

enter image description here

Flat shaded Suzanne:

enter image description here

$\endgroup$

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.