转载请注明出处为KlayGE游戏引擎,本文的永久链接为http://www.klayge.org/?p=582

The most import equation of this serial is shown in my last article. This one is the last article in this serial. I’ll propose some future works, and will present some rendering results of physically-based model here.

Future works

A unsolved problem occurs in the context of very smooth surfaces with high specular powers. Such materials are important to model e.g., wet surfaces. However, the punctual light approximation breaks down in this case, yielding extremely intense highlights of subpixel size that are unrealistic and alias badly. What we would like to see is a sharp reflection of the shape of the light source, which requires some kind of area light approximation which is fast enough to use in games.

Another problem is that there are a variety of geometry terms in the literature. Do any of them provide a visual improvement over the “cheaper-than-free” implicit geometry function [latex]G_{implicit}[/latex] that is worth the extra cost? One candidate is the geometry factor proposed by Kelemen et. al. This is an approximation to the Cook-Torrance geometry factor but it is far cheaper to compute:

[latex]\frac {G_{CT}(\mathbf{l_c}, \mathbf{v}, \mathbf{h})} {(\mathbf{n} \cdot \mathbf{l_c})(\mathbf{n} \cdot \mathbf{v})} \approx \frac {1} {(\mathbf{l_c} \cdot \mathbf{h})^2}[/latex]

note that [latex](\mathbf{l_c} \cdot \mathbf{h})[/latex] also exists in any case for Fresnel. It’s a close approximation to the full Cook-Torrance geometry factor  divided by the foreshortening terms.

The third problem is the Fresnel of diffuse term. It should be noted that there is no such thing as “a surface without specular”. In reality such materials have [latex]\mathbf{c}_{spec}[/latex] values around 0.03-0.06, and very low values of [latex]\alpha[/latex] (around 0.1-2.0). At glancing angles, even the most “matte” surfaces have noticeable specular appearance; the lack of this effect is another reason why so many game environments appear unrealistic.

Normalization factor

Rendered images of a red plastic sphere. The bottom row of images was rendered with a normalization factor applied to the specular term, using [latex]\mathbf{c}_{spec} = 0.05[/latex] (an appropriate value for plastic). The top row of images was rendered without a normalization factor, using a value of [latex]\mathbf{c}_{spec}[/latex] chosen so that the two leftmost images match. It can be seen that in the bottom row, the highlight grows much brighter as it gets narrower, which is the correct behavior-the outgoing light is concentrated in a narrower cone. In the top row, the highlight remains equally bright as it narrows, so there is a loss of energy and surface reflectance appears to decrease. (image from “Real-Time Rendering, 3rd edition”)

More pictures from Crytek:

Teapot with different BRDF parametersConsistent lighting

This serial ends here. Thanks and happy new year!