图形学(7)BRDF and Render Equation

发布时间 2023-04-27 21:42:50作者: Watware

Render Equation

BRDF(双向反射分布函数)

由于表面不是完全光滑的,在宏观上光线射向一个粗糙物体后会产生漫反射而非镜面反射。考虑定义双向反射分布函数 \(f_r(p, \omega_i\rightarrow\omega_r)\),表示对于位置 \(p\) 的一个微元立体角 \(\omega_i\),从这个立体角入射的光的照度 \(dE_i\)\(\omega_r\) 的亮度的贡献 \(dL_r\) 的比值。

\[f_r(\mathbf p, \omega_i\rightarrow\omega_r)=\frac{\mathrm{d}L_r}{\mathrm{d}E_i}=\frac{\mathrm{d}L_r}{L_i\cos\theta_i \mathrm{d}\omega_i} \]

Render Equation

一个点在某个方向的出射光等于该点法向量所在半球内的所有入射光贡献的积分,有渲染方程:

\[L_r(\mathbf p,\omega_r)=\int_{H^2}f_r(\mathbf p,\omega_i\rightarrow\omega_r)L_i(\mathbf p,\omega_i)\cos\theta_i\mathrm{d}\omega_i \]

加上物体的自发光 emit:

\[L_r(\mathbf p,\omega_r)=L_{emit}(\mathbf p,\omega_r)+\int_{H^2}f_r(\mathbf p,\omega_i\rightarrow\omega_r)L_i(\mathbf p,\omega_i)\cos\theta_i\mathrm{d}\omega_i \]

(原则上物体对光的衰减也就是“颜色”也包含在 brdf 里面)