1. What is a normal?
How the facing of a surface and the light angle decide brightness.
Angle θ between N and L
N·L = cos θ
Brightness max(0, N·L)
Toon (1 = lit, 0 = shadow)
- N is the surface normal (a unit-length direction perpendicular to the surface). L is the direction the light comes from.
- Brightness is
max(0, N·L)=max(0, cos θ): 1 when the light faces the surface, 0 from the side, and still 0 from behind. - Toon shading splits into two colors by whether
N·Lis above a threshold. Near the threshold, a tiny change of direction flips the color. - Move either the surface or the light: brightness depends only on the difference of the two angles.