Untitled

Untitled

목차

  1. 개요
  2. Specular BRDF
    1. Specular D
    2. Specular F
    3. Specular G
  3. Monte Carlo Integration
  4. Importance Sampling
  5. PDF, CDF, InverseCDF
  6. Full approximation
  7. Split sum approximation
  8. 마치며
  9. Reference

개요

Spherical Harmonics 글에서 Diffuse IBL을 주제로 Irradiance Map에 대해 알아보았던 것에 이어서 이번에는 Specular IBL에 대해 알아보도록 하겠습니다.

Specular 반사는 Diffuse 반사와 다르게 조명과 카메라의 방향에 따라 음영의 변화가 급격하게 이뤄질 수 있으므로 Diffuse IBL과는 다른 방식으로 접근하게 됩니다.

여기서는 이미지를 통하여 Specular 반사를 계산하기 위한 기반 지식을 알아보고 Direct3D 11/12로 구현한 결과물을 통해 표면의 재질에 따른 비주얼의 차이를 살펴보도록 하겠습니다.

Specular BRDF

Spherical Harmonics 글에서 살펴보았듯이 조명 계산은 다음과 같은 렌더링 방정식을 계산하는 과정입니다.

$$ {\displaystyle L_{\text{r}}(\mathbf {x} ,\omega {\text{o}})=L{\text{e}}(\mathbf {x} ,\omega _{\text{o}})+\int {\Omega }f{\text{r}}(\mathbf {x} ,\omega _{\text{i}},\omega {\text{o}})L{\text{i}}(\mathbf {x} ,\omega _{\text{i}})(\omega _{\text{i}}\cdot \mathbf {n} )\operatorname {d} \omega _{\text{i}}} $$

각 항의 자세한 의미는 Spherical Harmonics 글에서 설명하였으므로 해당 글을 참고하시기를 바랍니다.

Diffuse 반사에서는 Lambert BRDF를 사용했지만, Specular 반사를 위해서는 다른 BRDF 함수를 사용할 필요가 있습니다. 지금부터 Specular 반사를 위해 널리 사용되는 Cook-Torrance BRDF를 살펴보겠습니다. Cook-Torrance BRDF는 다음과 같습니다.