NVlabs / nvdiffrec

Official code for the CVPR 2022 (oral) paper "Extracting Triangular 3D Models, Materials, and Lighting From Images".
Other
2.09k stars 222 forks source link

Precomputed lighting code? #66

Closed prashantraina closed 1 year ago

prashantraina commented 1 year ago

In the repo, there is a file called data/irrmaps/bsdf_256_256.bin which contains 2 precomputed lookup tables related to the lighting calculations. These tables are loaded as a variable called _FG_LUT in the code. This is supposed to be related to the first integral in equation 5 of the paper. However, it is not obvious from the code how the integral and the 2 lookup tables are related to each other. Could you please share some details or code on how you precomputed bsdf_256_256.bin?

jmunkberg commented 1 year ago

See page 5-7 in this document: Real Shading in Unreal Engine 4

https://blog.selfshadow.com/publications/s2013-shading-course/karis/s2013_pbs_epic_notes_v2.pdf