kyotovision-public / fmbrdf

MIT License
7 stars 1 forks source link

Regarding the training of MLP models used #1

Closed vanshilshah97 closed 11 months ago

vanshilshah97 commented 1 year ago

Hi Thanks a lot for the paper and for making the code public. The idea and results are very interesting I had one question regarding the training of the models used. Would it please be possible to highlight the detailed training procedure for shadowing_net and body reflection net ? Thanks a lot once again

login1998 commented 1 year ago

Sorry for the late response.

We train both networks with the tabulated data computed by Markov Chain Monte Carlo (MCMC) for each set of parameters.

The shadowing net learns to output the value of $\Lambda$ of Smith's shadowing (or masking) function (Heitz, "Understanding the Masking-Shadowing Function in Microfacet-Based BRDFs", JCGT, 2014) with respect to input parameters $\alpha$, $\beta$, and incident angle $\arccos(N \cdot L)$ (or $\arccos(N \cdot V)$ ). We train this network by minimizing the RMSE of $\Lambda$ between the network's output and tabulated data. We compute the geometric attenuation term $G$ from $\Lambda$ through GAFNN in FMBRDF.py.

The body reflection net learns to output the integral of Eq. 24 (I denote this Mueller matrix as $M$ here) with respect to input parameters $N$, $L$, $\mu$, $\alpha$, $\beta$, and $\kappa$. This integral does not include $G_m$ and $G_s$ because Smith's shadowing and masking function does not depend on microfacet normals $n$ and $ni$. We train this network by minimizing the RMSE of intensity ( $M{00}$ ), DoLP ($\sqrt{M{10}^2 + M{20}^2}/M{00}$ ), AoLP ($\frac{1}{2}\arctan(M{20}/M{10})$ ) converted into a vector ( $(\cos2AoLP, \sin2AoLP)$ ), and other elements ($M{01}, M{11}, M{21}, M{02}, M{12}, M_{22}$).

Note that we use the networks as just an approximation of the derived model like curve fitting. Our purpose in using networks is to avoid a heavy computation of MCMC during rendering and enable us to compute a gradient for solving inverse problems, such as BRDF estimation and shape reconstruction.

Thank you for your interest in our paper.