渲染方程¶
前置的内容为 辐射度量学。
Reflection at a Point¶
Radiance from direction \(\omega_i\) turns into the power \(E(\omega_i)\) that \(\mathrm{d}A\) receives. Then power \(E(\omega_i)\) will become the radiance to any other direction \(\omega_r\).
- Differential irradiance incoming: \(\mathrm{d}E(\omega_i)=L_i(\omega_i) \cos \theta_i \mathrm{d} \omega_i\)
- Differential radiance exiting due to \(\mathrm{d}E(\omega_i)\): \(\mathrm{d}L_r(\omega_r)\)
BRDF¶
The Bidirectional Reflectance Distribution Function (BRDF) represents how much light is reflected into each outgoing direction \(\omega_r\) from each incoming direction.
The unit is \(sr^{-1}\)。
The Reflection Equation¶
The Rendering Equation¶
Kajiya 提出 The Rendering Equation,就是自发光 + 反射光。
其中 \(n \cdot \omega_i = \cos \theta_i\)。
Ray Tracing¶
渲染方程中,未知的量只有 \(L_o(p, \omega_o)\) 和 \(L_i(p,\omega_i)\),但某一点的 \(L_i(p,\omega_i)\) 又依赖其他点的 \(L_o(p, \omega_o)\),形成了递归。积分是线性运算,如果用某个线性算子 \(K\) 改写渲染方程,能得到
可以把 \(K\) 看作某种变换矩阵,解得
对 \((I-K)^{-1}\) 用二项式定理,或者类似 \(\dfrac{1}{1-x}\) 的泰勒展开得到
项 | 意义 |
---|---|
\(E\) | Emission directly From light sources |
\(KE\) | Direct illumination on surfaces |
\(K^2E\) | One bounce indirect illumination, e.g., Mirrors, Refraction |
\(K^3E\) | Two bounce indirect illumination |
\(\cdots\) | \(\cdots\) |
光栅化渲染中,前两项比较容易,后面的项就困难了。后来,提出 光线追踪 来解决这个问题。
后面的项计算一定数量后就差不多收敛了,再计算差别也不大了。
参考¶
相关文章