|
197 | 197 | Note though that this albedo-scaling approximation does not correctly take into account the effect of multiple light bounces back and forth between the interfaces, or absorption and scattering in the volumetric medium of the coat $V_\mathrm{coat}$. In general the resulting BSDF lobe shape will not be a simple linear combination of the interface BSDFs. |
198 | 198 | To some extent these effects can be put back into the albedo-scaling model by making various approximations. For example the effect of the volumetric absorption through the coat in the incident and output directions could be approximately modeled as |
199 | 199 | \begin{equation} \label{non-reciprocal-albedo-scaling-with-T} |
200 | | -f_\mathrm{layer}(\omega_i, \omega_o) = f_\mathrm{coat}(\omega_i, \omega_o) + T^2_\mathrm{coat} \bigl(1 - E_\mathrm{coat}(\omega_o)\bigr) \,f_\mathrm{sub}(\omega_i, \omega_o) |
| 200 | +f_\mathrm{layer}(\omega_i, \omega_o) = f_\mathrm{coat}(\omega_i, \omega_o) + \mathbf{T}^2_\mathrm{coat} \bigl(1 - E_\mathrm{coat}(\omega_o)\bigr) \,f_\mathrm{sub}(\omega_i, \omega_o) |
201 | 201 | \end{equation} |
202 | | -where $T^2_\mathrm{coat}$ accounts for the total volumetric transmittance of the coat along the input and output rays. Similarly if the coat is rough this will effectively roughen the substrate BSDF lobe also, which can be accounted for approximately via various heuristics. |
| 202 | +where $\mathbf{T}^2_\mathrm{coat}$ accounts for the total volumetric transmittance of the coat along the input and output rays. Similarly if the coat is rough this will effectively roughen the substrate BSDF lobe also, which can be accounted for approximately via various heuristics. |
203 | 203 |
|
204 | 204 |
|
205 | 205 | Mixing |
|
262 | 262 | where $f_\mathrm{layer}$ is the BSDF corresponding to $\mathrm{\mathbf{layer}}(S_\mathrm{sub}, S_\mathrm{coat})$. |
263 | 263 | If we use the non-reciprocal albedo-scaling approach described in the Layering section (equation [non-reciprocal-albedo-scaling-with-T]), then $f_\mathrm{layer}$ can be expressed as |
264 | 264 | \begin{equation} |
265 | | -f_\mathrm{layer} = f_\mathrm{coat} + T^2_\mathrm{coat} \left(1 - E_\mathrm{coat}\right) \,f_\mathrm{sub} |
| 265 | +f_\mathrm{layer} = f_\mathrm{coat} + \mathbf{T}^2_\mathrm{coat} \left(1 - E_\mathrm{coat}\right) \,f_\mathrm{sub} |
266 | 266 | \end{equation} |
267 | | -where $f_\mathrm{coat}$ is the BSDF of the coat and $T^2_\mathrm{coat}$ is the volumetric transmittance along the path of the input and output rays. Thus combining these [^lerp], |
| 267 | +where $f_\mathrm{coat}$ is the BSDF of the coat and $\mathbf{T}^2_\mathrm{coat}$ is the volumetric transmittance along the path of the input and output rays. Thus combining these [^lerp], |
268 | 268 | \begin{equation} \label{coat_layering_formula_with_albedo_scaling} |
269 | | -f_\mathrm{weighted-layer} = w_\mathrm{coat} f_\mathrm{coat} + \mathrm{lerp}\bigl(1, T^2_\mathrm{coat} (1 - E_\mathrm{coat}), w_\mathrm{coat}\bigr) f_\mathrm{sub} \ , |
| 269 | +f_\mathrm{weighted-layer} = w_\mathrm{coat} f_\mathrm{coat} + \mathrm{lerp}\bigl(1, \mathbf{T}^2_\mathrm{coat} (1 - E_\mathrm{coat}), w_\mathrm{coat}\bigr) f_\mathrm{sub} \ , |
270 | 270 | \end{equation} |
271 | 271 | which, for example, is the formula used in the Autodesk Standard Surface [#Georgiev2019] coat layer. |
272 | 272 |
|
|
1025 | 1025 | where $\mathbf{E}_\mathrm{spec}$ is the normal-direction reflectance of all energy reflected from the coat's dielectric interface _without_ macroscopic transmission, and $\mathbf{E}^\prime_c$ represents the albedo due to transmission into the coat medium (and scattering off the base substrate, potentially multiple internal reflections off the coat interface, and re-transmission back out). |
1026 | 1026 | We then require that the *effect* of $\delta$ = **`coat_darkening`** is to multiply $\mathbf{E}^\prime_c$ by an RGB boost factor |
1027 | 1027 | \begin{equation} \label{undarkened_coat_albedo_scaling} |
1028 | | -\mathbf{B}(\delta) = \mathrm{lerp}\biggl(\frac{\mathbf{T}_\mathrm{coat}^2 \mathbf{E}_b}{\mathbf{E}^\prime_c}, 1, \delta \biggr) |
| 1028 | +\mathbf{B}(\delta) = \mathrm{lerp}\biggl(\frac{\mathbf{T}^2_\mathrm{coat} \mathbf{E}_b}{\mathbf{E}^\prime_c}, 1, \delta \biggr) |
1029 | 1029 | \end{equation} |
1030 | 1030 | where $\mathbf{T}_\mathrm{coat}$ is the coat absorption transmittance, and $\mathbf{E}_b$ represents the normal-incidence albedo of the entire base beneath the coat (which can be approximated as the normal-incidence albedos of the individual slabs of the base, blended according to their mix weights). |
1031 | 1031 |
|
|
1093 | 1093 |
|
1094 | 1094 | In the case of an absorbing coat, there is also enhanced darkening and saturation at grazing angles due to increased path-length within the coat medium. The effect of this can be modeled via a factor in the coat BRDF of |
1095 | 1095 | \begin{equation} |
1096 | | -T_\mathrm{coat}^\mbox{$1/\mu^t_i + 1/\mu^t_o$} |
| 1096 | +\mathbf{T}_\mathrm{coat}^\mbox{$1/\mu^t_i + 1/\mu^t_o$} |
1097 | 1097 | \end{equation} |
1098 | 1098 | where $\mu^t_i$ is the angle cosine of the incident ray refracted into the coat, i.e. |
1099 | 1099 | \begin{equation} |
1100 | 1100 | \mu^t_i =\sqrt{1 - \frac{1 - \mu^2_i}{\eta^2_c}} |
1101 | 1101 | \end{equation} |
1102 | | -and similarly for $\mu^t_o$. Note that at normal incidence, this factor reduces to $T^2_\mathrm{coat}$ which we defined to equal **`coat_color`**. [^absorption_effect_on_K] |
| 1102 | +and similarly for $\mu^t_o$. Note that at normal incidence, this factor reduces to $\mathbf{T}^2_\mathrm{coat}$ which we defined to equal **`coat_color`**. [^absorption_effect_on_K] |
1103 | 1103 |
|
1104 | 1104 | ![Figure [coat_view_dependent_absorption_color]: The color of an absorbing coat becomes darker and more saturated at grazing angles.](images/coat_view_dependent_absorption_color.png width="75%") |
1105 | 1105 |
|
|
1418 | 1418 | &= \mathrm{lerp}\left(\mathrm{lerp}(\color{darkblue}{f_\mathrm{diffuse}}, \color{darkblue}{f_\textrm{SSS}}, \mathtt{S}), \color{darkblue}{f^T_\textrm{specular}}, \mathtt{T}\right) \ . |
1419 | 1419 | \end{align} |
1420 | 1420 |
|
1421 | | -Next, the coat is layered on top of the base substrate with the coverage weight $\mathtt{C}$, where the BRDF of the coat dielectric interface is taken to be $\color{darkblue}{f_\mathrm{coat}}$, with a transmittance $T_\mathrm{coat}$. As in equation [coat_layering_formula_with_albedo_scaling], this can be expressed as: |
| 1421 | +Next, the coat is layered on top of the base substrate with the coverage weight $\mathtt{C}$, where the BRDF of the coat dielectric interface is taken to be $\color{darkblue}{f_\mathrm{coat}}$, with a combined transmittance $\mathbf{T}^2_\mathrm{coat}$. As in equation [coat_layering_formula_with_albedo_scaling], this can be expressed as: |
1422 | 1422 | \begin{equation} |
1423 | | -f_\mathrm{coated-base} = \mathtt{C} \,\color{darkblue}{f_\mathrm{coat}} + \mathrm{lerp}\left(1, T_\mathrm{coat} (1 - E[\color{darkblue}{f_\mathrm{coat}}]), \mathtt{C}\right) f_\textrm{base-substrate} \ . |
| 1423 | +f_\mathrm{coated-base} = \mathtt{C} \,\color{darkblue}{f_\mathrm{coat}} + \mathrm{lerp}\left(1, \mathbf{T}^2_\mathrm{coat} (1 - E[\color{darkblue}{f_\mathrm{coat}}]), \mathtt{C}\right) f_\textrm{base-substrate} \ . |
1424 | 1424 | \end{equation} |
1425 | 1425 |
|
1426 | 1426 | Similarly, the fuzz layer is applied with coverage weight $\mathtt{F}$ (with albedo-scaling adjusted to account for the gray transmission, according to equation [fuzz-layering-approx]), producing (where $\color{darkblue}{\overline{f_\mathrm{fuzz}}}$ is the fuzz BRDF with the tint color set to white): |
|
1436 | 1436 |
|
1437 | 1437 | If $\mathtt{E}$ represents the isotropic emission luminance from the base, then the total EDF lobe $\color{darkblue}{L_e}$ can be modeled according to the absorption in the coat layer as: |
1438 | 1438 | \begin{eqnarray} |
1439 | | -\color{darkblue}{L_e} &=& (1 - \mathtt{C}) \,\mathtt{E} + \mathtt{C} \,T_\mathrm{coat} \mathtt{E} \nonumber \\ |
1440 | | - &=& \mathrm{lerp}\left(1, T_\mathrm{coat}, \mathtt{C}\right) \mathtt{E} \ . |
| 1439 | +\color{darkblue}{L_e} &=& (1 - \mathtt{C}) \,\mathtt{E} + \mathtt{C} \,\mathbf{T}_\mathrm{coat} \mathtt{E} \nonumber \\ |
| 1440 | + &=& \mathrm{lerp}\left(1, \mathbf{T}_\mathrm{coat}, \mathtt{C}\right) \mathtt{E} \ . |
1441 | 1441 | \end{eqnarray} |
1442 | 1442 | which in principle is a function of direction due to the varying transmittance. This can also be thought of as a lobe in its own right (representing light self-emitted, rather than reflected or transmitted). |
1443 | 1443 |
|
|
1450 | 1450 | \begin{aligned} |
1451 | 1451 | \; f_\mathrm{PBR} &=& \!\!\!\!\!\!\!\!\!\! &\mathrm{lerp}\left(\color{darkblue}{f_\textrm{transparent}}, f_\mathrm{surface} , \mathtt{\alpha}\right) \ , \; \nonumber \\ |
1452 | 1452 | \; f_\mathrm{surface} &=& \!\!\!\!\!\!\!\!\!\!\mathtt{F} \,\color{darkblue}{f_\mathrm{fuzz}} + &\mathrm{lerp}\left(1, \quad\quad\; 1 - E[\color{darkblue}{\overline{f_\mathrm{fuzz}}}] , \;\mathtt{F} \right) f_\textrm{coated-base} \ , \; \nonumber \\ |
1453 | | - \; f_\mathrm{coated-base} &=& \!\!\!\!\!\!\!\!\!\!\mathtt{C} \,\color{darkblue}{f_\mathrm{coat}} + &\mathrm{lerp}\left(1, T_\mathrm{coat} (1 - E[\color{darkblue}{f_\mathrm{coat}}]) , \mathtt{C} \right) f_\textrm{base-substrate} \ , \; \nonumber \\ |
1454 | | - \; \color{darkblue}{L_e} &=& \!\!\!\!\!\!\!\!\!\! &\mathrm{lerp}\left(1, T_\mathrm{coat} , \mathtt{C} \right) \mathtt{E} \ , \; \nonumber \\ |
| 1453 | + \; f_\mathrm{coated-base} &=& \!\!\!\!\!\!\!\!\!\!\mathtt{C} \,\color{darkblue}{f_\mathrm{coat}} + &\mathrm{lerp}\left(1, \mathbf{T}^2_\mathrm{coat} (1 - E[\color{darkblue}{f_\mathrm{coat}}]) , \mathtt{C} \right) f_\textrm{base-substrate} \ , \; \nonumber \\ |
| 1454 | + \; \color{darkblue}{L_e} &=& \!\!\!\!\!\!\!\!\!\! &\mathrm{lerp}\left(1, \mathbf{T}_\mathrm{coat} , \mathtt{C} \right) \mathtt{E} \ , \; \nonumber \\ |
1455 | 1455 | \; f_\textrm{base-substrate} &=& \!\!\!\!\!\!\!\!\!\! &\mathrm{lerp}\left(f_\textrm{dielectric-base}, \color{darkblue}{f_\mathrm{conductor}} , \mathtt{M} \right) \ , \; \nonumber \\ |
1456 | 1456 | \; f_\textrm{dielectric-base} &=& \!\!\!\!\!\!\!\!\!\!\color{darkblue}{f^R_\textrm{specular}} + &(1 - E[\color{darkblue}{f^R_\textrm{specular}}]) f^T_\mathrm{dielectric-base} \ , \; \nonumber \\ |
1457 | 1457 | \; f^T_\mathrm{dielectric-base} &=& \!\!\!\!\!\!\!\!\!\! &\mathrm{lerp}(\mathrm{lerp}(\color{darkblue}{f_\mathrm{diffuse}}, \color{darkblue}{f_\textrm{SSS}}, \mathtt{S}), \color{darkblue}{f^T_\textrm{specular}}, \mathtt{T}) \ . \; |
|
0 commit comments