ACM SIGGRAPH Symposium on Interactive 3D Graphics and Games (I3D), 2022
Aakash KT1, Eric Heitz2, Jonathan Dupuy2, P. J. Narayanan11CVIT, KCIS, IIIT Hyderabad, 2Unity Technologies
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
Precomputed LUTs for two parameterizations are in the
LUT
directory.
Parameterization | Numpy | C++ float array |
---|---|---|
αx , αy , θ , φ | LUT.npy | LUT.cpp |
α , λ , θ , φ | LUT.npy | LUT.cpp |
All fitting code is contained in the
fitting/
directory.
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]
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.