上文推出了本系列最重要的方程,本片篇作为这个系列的完结篇,我会提一些未来的工作,并展示一些基于物理的渲染结果。
未来的工作
一个没有解决的问题是specular的power很高,而且非常光滑的表面。这样的材料对于渲染湿的表面这样的东西很重要。但是,精确光源的近似在这种情况下会挂掉,结果就是产生subpixel大小的极端强烈的高光,很不自然。实际上这种情况需要的是反射出光源的形状,这需要快到适合在游戏中使用的面光源近似。
另一个问题是有很多中geometry项,有没有能比$G_{implicit}$提供更好的视觉效果,同时开销很小的函数?候选之一是Kelemen et. al提出的,是对Cook-Torrance的geometry项的近似,但计算开销很小:
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 $G_{implicit}$ 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:
$\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}$
其中的$(\mathbf{l_c} \cdot \mathbf{h})$在Fresnel项中就有,可以重复利用。这个很接近完整的Cook-Torrance的geometry项除掉校正因子。
第三个问题是diffuse项的Fresnel。在现实中,没有“不带specular的表面”,这样的材质实际上$\mathbf{c}_{spec}$值在0.03-0.06之间,而且$\alpha$的值非常小(0.1-2.0之间)。在很斜的角度下,即使最粗糙的表面也有感觉得到的specular。缺乏这种效果是另一种游戏看起来不真实的原因。
note that $(\mathbf{l_c} \cdot \mathbf{h})$ 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 $\mathbf{c}_{spec}$ values around 0.03-0.06, and very low values of $\alpha$ (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.
渲染一个红色塑料球。下面一排图用的specular项是归一化过的系数渲染的,用的$\mathbf{c}_{spec} = 0.05$(差不多是塑料的值)。上一排图不带归一化系数,用的$\mathbf{c}_{spec}$值选成让最左的两张图看着一样。可以看出下一排的高光随着变小而变亮,这是正确的现象——出射光越小就越集中。上一排里,高光变小的时候亮度不变,所以有能量损失,表面反射率也下降了。图片来自Real-Time Rendering, 3rd edition。
更多来自Crytek的图片:
Rendered images of a red plastic sphere. The bottom row of images was rendered with a normalization factor applied to the specular term, using $\mathbf{c}_{spec} = 0.05$ (an appropriate value for plastic). The top row of images was rendered without a normalization factor, using a value of $\mathbf{c}_{spec}$ 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:
This serial ends here. Thanks and happy new year!
Comments