6
$\begingroup$

It is probably a very stupid question but why do have many shaders (diffuse, glossy, ...) a normal input ? What happens with that normal input ?

Maybe it helps when I clarify the background of my question...I am trying to understand the concepts of Physically-Based Shading and the implementation of these concepts in Blender. See also my questions here and here.

After some discussion with @piegames I noticed that I do not really understand why the normal input is used in shaders. I think I understand what a normal is but with the concept illustrated below I have difficulty to understand what Cycles does with this normal input when calculating the behavior of a shader

enter image description here

$\endgroup$
  • $\begingroup$ Have you tried connecting another node to it? $\endgroup$ – John Dvorak Dec 24 '16 at 0:49
  • 1
    $\begingroup$ related: blender.stackexchange.com/questions/21190/what-are-face-normals $\endgroup$ – cegaton Dec 24 '16 at 0:52
  • 1
    $\begingroup$ To simulate effect similar to displacement without the actual added geometry, similar to bump mapping. They add detail to the surface of the model $\endgroup$ – Duarte Farrajota Ramos Dec 24 '16 at 1:38
  • 1
    $\begingroup$ Normal is a vector that is perpendicular to the tangent plane to the surface, by feeding values to the normal socket you can manipulate the normal vector, that will change the angle of light scattering and reflection from the surface. $\endgroup$ – Denis Dec 24 '16 at 2:08
  • 2
    $\begingroup$ @cegaton I want to understand Physically-Based Shaders and I noticed that I miss some basic understanding of how current shaders work in Blender. If I understand how existing nodes/shaders work I maybe also come to an underdstanding of Physically-Based Shaders $\endgroup$ – Old Man Dec 24 '16 at 12:08
5
$\begingroup$

A face normal is the angle perpendicular to the face, it is used to determine reflections and lighting on the face.

A normal map is used to visually deform the surface of an object. It does this by altering the face normal for every position on the face. This fakes extra detail by altering the rendering calculation without using extra geometry.

This is where the normal input comes in, by feeding a normal map into the node you allow blender to calculate the surface colour at a given point using the modified normals and not just the one face normal.

You may find Blender Gurus recent tutorial on photorealistic wood of interest.

$\endgroup$
  • $\begingroup$ I edited my question because I still don't get it. Sorry $\endgroup$ – Old Man Dec 24 '16 at 16:30
  • $\begingroup$ The normal simply defines what direction a face is pointing. It's a vector that travels exactly perpendicular to face, away from the surface. It's used for a variety of shading operations that need a "direction away from the surface" for whatever reason (such as calculating reflections). Since polygon counts are limited, it's often useful to be able to define a normal that doesn't strictly correspond to the underlying face, such as in smooth shading or bump/normal mapping, as described in this answer. $\endgroup$ – JtheNinja Dec 24 '16 at 16:35
  • $\begingroup$ @JtheNinja So by feeding the normal as an input to the shader (for instance after bump mapping) you tell the shader how to calculate the reflections ? But If the normal input is not used how can the shader calculate reflections (not being fed with this info) ? $\endgroup$ – Old Man Dec 24 '16 at 16:46
  • $\begingroup$ If the shader's normal input is connected, it will use the normal vector supplied to the input in place of the actual mesh normal. $\endgroup$ – JtheNinja Dec 24 '16 at 16:48
  • $\begingroup$ @JtheNinja ah ok. So the default is the mesh normal ? $\endgroup$ – Old Man Dec 24 '16 at 16:49
2
$\begingroup$

The Normal socket is simply for changing the surface normals, without altering the real mesh.

Bear in mind that the Normal vector is different from face normals. Surface Normals in a render engine, cycles included, uses three colors for the three different axes. Blue for what we in blender would call the Z axis, but really it is down. Red and Green for the other two axis, X and Y.

normal vector of a sphere diagram

So when you change the surface normals you are altering how cycles views parts of the mesh.

First off Fresnel and the Layer Weight node's Facing output are similar. They both are darker for faces pointing directly at the camera, and get lighter as the angle of the faces points away from the camera.

This is the Layer Weight node's facing output on a sphere. On the left the sphere has no bump map, the right has a bump map.
Layer Weight node facing output on a sphere left no bump map, right has a bump map

Now here is the exact same view as in the first image, again viewing the surface normals (just plug it directly in to an Emission shader), this time looking at the normals from the bump node from the image above.
edited surface normals

This is the power of surface normals, it enables us to create complex surface details, when really all that is there is a sphere.

$\endgroup$
  • $\begingroup$ your answer really helps but by telling that the surface normal uses three colors for the three different axes you introduce some "new mist" for me haha. I thought a surface vector points to only one direction, so why would the surface normal use three axes ? $\endgroup$ – Old Man Dec 25 '16 at 13:35

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.