Physically-based BRDF

From KlayGE
Revision as of 20:38, 27 December 2010 by Gongminmin (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Introduction

Physically based rendering have been known for many years, but the "ad-hoc" rendering models (such as Phong) are still widely used in game. These "ad-hoc" models require laborious tweaking to produce high-quality images. However, physically based, energy-conserving rendering models easily create materials that hold up under a variety of lighting environments.

Surprisingly, physically based models are not more difficult to implement or evaluate than the traditional "ad-hoc" ones.

Reflectance equation

The most common used rendering model in game describes only reflectance, not including terms such as SSS. The reflectance equation is:

LaTeX: L_0(\mathbf{v})=\int_{\Omega} \rho(\mathbf{l},\mathbf{v}) \otimes L_i(\mathbf{l}) (\mathbf{n} \cdot \mathbf{l}) d\omega_i

Here LaTeX: \rho(\mathbf{l},\mathbf{v}) is BRDF, LaTeX: L_i(\mathbf{l}) is the contribution from light source, LaTeX: (\mathbf{n} \cdot \mathbf{l}) is the angle between light and surface normal. This integration results the sum of all light sources contribute to a surface point.

Diffuse term

The simplest BRDF is the Lambert. The well-known Lambertian BRDF in game is present as LaTeX: (\mathbf{n} \cdot \mathbf{l}). However, it is part of reflectance equation, and lambertian term is actually a constant value:

LaTeX: \rho_{lambert}(\mathbf{l},\mathbf{v})=\frac{\mathbf{c}_{diff}}{\pi}