45/45
Per-vertex normals and illumination
For smooth looking meshes, we define a normal per-vertex.
-
- Vertices are seen as samples on a smooth underlying surface
-
- Normals are used for illumination
-
ambiant, diffuse, specular components
-

-
- Phong shading interpolates normals on each fragments of triangles, and compute illumination.

Possible automatic computation of normals: averaged normals of surrounding triangle.
\(\displaystyle n_k = \frac{\sum_{j\in{\mathcal{V}_k}} \hat{n}_j}{\|\sum_{j\in{\mathcal{V}_k}} \hat{n}_j\|}\), \(\mathcal{V}_k\): neighboring triangles.

\(\color{blue}{n_k}\)
\(\color{red}{\hat{n}_j}\)