Bringing Linearly Transformed Cosines to Anisotropic GGX

ACM SIGGRAPH Symposium on Interactive 3D Graphics and Games (I3D), 2022

Aakash KT1, Eric Heitz2, Jonathan Dupuy2, P. J. Narayanan1

1CVIT, KCIS, IIIT Hyderabad, 2Unity Technologies


Abstract

Linearly Transformed Cosines (LTCs) are a family of distributions that are used for real-time area-light shading thanks to their analytic integration properties. Modern game engines use an LTC approximation of the ubiquitous GGX model, but currently this approximation only exists for isotropic GGX and thus anisotropic GGX is not supported. While the higher dimensionality presents a challenge in itself, we show that several additional problems arise when fitting, post-processing, storing, and interpolating LTCs in the anisotropic case. Each of these operations must be done carefully to avoid rendering artifacts. We find robust solutions for each operation by introducing and exploiting invariance properties of LTCs. As a result, we obtain a small $8^4$ look-up table that provides a plausible and artifact-free LTC approximation to anisotropic GGX and brings it to real-time area-light shading.

[Project Page] [Author’s Version] [Supplementary] [bibtex]


Precomputed LUTs

Parameterization Numpy C++ float array
αx , αy , θ , φ LUT.npy LUT.cpp
α , λ , θ , φ LUT.npy LUT.cpp

Using the Code

Fitting your own LUT can be done by:

Parameterization: αx , αy , θ , φ

python fit_alphax_alphay_theta_phi.py --savedir [directory_to_save_lut] --epochs [optimization_iterations]

Parameterization: α , λ , θ , φ

python fit_alphax_alphay_theta_phi.py --savedir [directory_to_save_lut] --epochs [optimization_iterations]

Using the OpenGL demo

Run the following commands inside the opengl_renderer/ directory:

mkdir build
cd build/
cmake ..
make -j8

To run the demo:

./sphere

The demo is build for the α , λ , θ , φ parameterization. You can replace the default LUT with your own in the ltc_m_reparam.h file.

GitHub

View Github