Chapter 71: Cook-Torrance
General form of the Cook-Torrance shading model:
in this equation is the
specular material property, which we can use directly from our
Diffuse reflection is often modelled using Lambertian:
There are other options, however, including Oren-Neyer.
Cook-Torrance specular reflectance (also sometimes simply called microfacet reflectance or microfacet BRDF) has the form:
is the Normal Distribution Function, which describes the concentration of microfacets which are oriented such that they could reflect light. (1)
is the Geometric Shadowing-Masking Function, which describes the percentage of microfacets which are neither shadowed or masked by neighboring microfacets. (1)
is the Fresnel Function, which describes the amount of light reflected by the material (as opposed to being absorbed or transmitted by the material).
is the macrosurface normal.
is the light vector.
is the view vector.
is the microsurface normal - in these computations (i.e. for implementation purposes) the half-vector is used.
is the angle between and
is the roughness constant.
is defined as such using the
roughness material property from our
.pov files: (4)
Normal Distribution Functions
This normalization is the source of the factors you see in the Blinn-Phong and Beckmann variations.
is the concentration of microfacets oriented with subsurface normal . For our microfacet model we plug in since we want , the concentration of microfacets which can reflect light from to . (1)
Here, is the “shininess” or “specular power”.
There doesn’t seem to be a standard way to compute this from or
Past iterations of CSC 473 have used the reciprical of POV-Ray roughness:
I recommend (and use) the equation provided by Karis’: (4)
This is the NDF which Cook and Torrance originally advocated for in (5).
Note that for normalized vectors, the following are equivalent:
And by trigonometric identity, the following are equivalent:
With those substitutions, you find the common form of the Beckmann NDF.
is the positive characteristic function:
2: Walter et al., Microfacet Models for Refraction through Rough Surfaces, 2007. Introduced the GGX form of D and G functions.
3: Nathan Reed, How Is The NDF Really Defined?, 2013. Describes where the normalization factor of D function comes from.
4: Brian Karis, Specular BRDF Reference, 2013. Reference of D, F, and G functions. Written by a UE4 graphics programmer.
5: Robert Cook & Kenneth Torrance, A Reflectance Model for Computer Graphics, 1982. Original Cook-Torrance paper. Many of the equations in this paper have slightly different forms in modern usage, so beware.