9.4 Conductor BRDF
Having described the relevant physical principles, we now turn to the implementation of a BRDF that models specular reflection from an interface between a dielectric (e.g., air or water) and a conductor (e.g., a polished metal surface). We initially focus on the smooth case, and later generalize the implementation to rough interfaces in Section 9.6.
The internal state of the ConductorBxDF consists of the real (eta) and imaginary (k) component of the index of refraction. Furthermore, the implementation requires a microfacet distribution that statistically describes its roughness. The TrowbridgeReitzDistribution class handles the details here. The constructor, not included here, takes these fields as input and stores them in the ConductorBxDF instance.
We will sidestep all discussion of microfacets for the time being and only cover the effectively smooth case in this section, where the surface is either perfectly smooth or so close to it that it can be modeled as such. The TrowbridgeReitzDistribution provides an EffectivelySmooth() method that indicates this case, in which the microfacet distribution plays no further role. The ConductorBxDF::Flags() method returns BxDFFlags accordingly.
The conductor BRDF builds on two physical ideas: the law of specular reflection assigns a specific reflected direction to each ray, and the Fresnel equations determine the portion of reflected light. Any remaining light refracts into the conductor, where it is rapidly absorbed and converted into heat.
Let denote the unpolarized Fresnel reflectance of a given direction (which only depends on the angle that this direction makes with the surface normal ). Because the law of specular reflection states that , we have . We thus require a BRDF such that
where is the specular reflection vector for reflected about the surface normal . Such a BRDF can be constructed using the Dirac delta distribution that represents an infinitely peaked signal. Recall from Section 8.1 that the delta distribution has the useful property that
A first guess might be to use delta functions to restrict the incident direction to the specular reflection direction . This would yield a BRDF of
Although this seems appealing, plugging it into the scattering equation, Equation (4.14), reveals a problem:
This is not correct because it contains an extra factor of . However, we can divide out this factor to find the correct BRDF for perfect specular reflection:
The Sample_f() method of the ConductorBxDF method implements Equation (9.9).
Note that Dirac delta distributions require special handling compared to standard functions. In particular, the probability of successfully drawing a point on the peak is zero, unless the sampling probability is also a delta distribution. In other words, the distribution must be used to determine the sample location.
Because the surface normal is in the reflection coordinate system, the equation for the perfect specular reflection direction, (9.1), simplifies substantially; the and components only need to be negated to compute this direction and there is no need to call Reflect() (the rough case will require this function, however).
The PDF value in the returned BSDFSample is set to one, as per the discussion of delta distribution BSDFs in Section 9.1.2. Following the other conventions outlined in that section, BRDF evaluation always returns zero in the smooth case, since the specular peak is considered unreachable by other sampling methods.
The same convention also applies to the PDF() method.
The missing three fragments—<<Sample rough conductor BRDF>>, <<Evaluate rough conductor BRDF>>, and <<Evaluate sampling PDF of rough conductor BRDF>>—will be presented in Section 9.6.