Chapter 11. Shinies

Table of Contents

Microfacets
Phong Model
Blinn-Phong Model
Gaussian
On Performance
In Review
Glossary

The diffuse lighting model works reasonably well for a smooth, matte surface. Few objects in reality conform to this archetype. Therefore, in order to more accurately model real objects, we need to improve upon this. Let us focus on making objects appear shiny.

Shiny materials tend to reflect light more strongly in the opposite direction from the angle of incidence (the angle between the surface normal and the incoming light direction). This kind of reflection is called a specular reflection. A perfect specular reflector would be a mirror.

One way to show that an object is shiny is to model specular highlights. A specular highlight is a bright highlight on an object caused by direct illumination from a light source. The position of the highlight changes with the view direction as well as the light direction.

Modelling true specular reflection would require reflecting all light from objects in the scene, whether direct or indirect. However for many objects, like shiny plastics and the like, indirect specular reflections are very weak. Thus, by modeling direct specular reflections, we can make an object appear shiny without having to do too much work.

We will look at several models for specular highlights and reflection. The Lambertian diffuse reflectance model was reasonably good for modelling diffuse lighting, but there are several models for specular reflection that should be considered. They vary in quality and performance.

Note that these models do not throw away diffuse lighting. They all act as supplements, adding their contribution into the overall result for the lighting equation.

Microfacets

All of these specular reflection models work based on an assumption about the characteristics of the surface. If a surface was perfectly smooth, then the specular highlight from a point light would be infinitely small (since point lights themselves are infinitely small).

Figure 11.1. Perfect Specular Reflection

Perfect Specular Reflection

Notice that the intensity of the reflected light depends not only on the angle of incidence but also on the direction to the viewer. This is called the angle of view or viewing angle. Viewing position A detects the light specularly reflected from the surface at the point P, but the viewing position B does not.

Surfaces however are rarely perfect specular reflectors (mirrors are the most common perfect reflectors). Surfaces that seem smooth from far away can be rough on closer examination. This is true at the microscopic level as well, even for surfaces that appear quite smooth. This roughness can be modelled by assuming that a surface is composed of a number of microfacets.

A microfacet is a flat plane that is oriented in a single direction. Each microfacet reflects light perfectly in that direction. Surfaces with microfacets would look like this:

Figure 11.2. Smooth and Rough Microfacets

Smooth and Rough Microfacets

It is part of the microfacet model's assumption that many microfacets on a surface will contribute to the light returned under a single pixel of the final image. So each pixel in the rendered image is the result of an aggregate of the microfacets that lie under the area of that pixel on the surface.

The average normal of the microfacets is the surface normal at that point. The relative smoothness of a surface can therefore be modeled as a statistical distribution of the orientation of microfacets on the surface. A smooth surface has a distribution close to the average, while a rough surface has a broader distribution.

Thus, a model of specular reflections includes a term that defines the overall smoothness of the source. This is a surface characteristic, representing the distribution of microfacets using whatever statistical distribution the particular specular model is using. One of the main differences between specular models is the kind of statistical distribution that they use.

Specular highlights are formed because, even though the surface normal may not be oriented to directly reflect light from the light source to the viewer, some microfacets may still be oriented to reflect a portion of that light. A microfacet distribution model determines the proportion of microfacets that happen to be oriented to reflect light towards the viewer.

Smooth surfaces, those who's microfacets do not deviate much from the surface normal, will have a small, bright highlight. Rough surfaces, who's microfacets are oriented in wildly divergent directions, will have a much dimmer, but larger specular highlight. These highlights will have positions and shapes based on the angle of incidence and the angle of view.

Note that specular reflectance models do not become diffuse reflectance models when taken to the extreme case of maximum roughness. Specular reflection represents a different mode of light/surface interaction from diffuse reflection.

Fork me on GitHub