# Why do shaders have a normal input?

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 • Have you tried connecting another node to it? – John Dvorak Dec 24 '16 at 0:49
• – user1853 Dec 24 '16 at 0:52
• To simulate effect similar to displacement without the actual added geometry, similar to bump mapping. They add detail to the surface of the model – Duarte Farrajota Ramos Dec 24 '16 at 1:38
• 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. – Denis Dec 24 '16 at 2:08
• @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 – Old Man Dec 24 '16 at 12:08

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.

• I edited my question because I still don't get it. Sorry – Old Man Dec 24 '16 at 16:30
• 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. – JtheNinja Dec 24 '16 at 16:35
• @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) ? – Old Man Dec 24 '16 at 16:46
• 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. – JtheNinja Dec 24 '16 at 16:48
• @JtheNinja ah ok. So the default is the mesh normal ? – Old Man Dec 24 '16 at 16:49

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. 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. 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. This is the power of surface normals, it enables us to create complex surface details, when really all that is there is a sphere.

• 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 ? – Old Man Dec 25 '16 at 13:35