|
491 | 491 |
|
492 | 492 | - The specular lobe shape is controlled by the roughness properties of the surface, parametrized by **`specular_roughness`** and **`specular_roughness_anisotropy`** (see the section on the [Microfacet model](index.html#model/microfacetmodel) NDF). |
493 | 493 |
|
494 | | -- The **`specular_ior`** parameter controls the index of refraction (IOR) of the dielectric. The **`specular_weight`** parameter provides a convenient, texturable linear $[0, 1]$ multiplier of the dielectric reflectivity at normal incidence via reduction of the IOR below the reference value. When **`specular_weight`** is $0$, the specular reflection disappears entirely, as the IOR of the dielectric is then equal to that of the surrounding medium. As a convenience, we also allow the **`specular_weight`** to exceed $1$, thus increasing the reflectivity via increase of the IOR above the reference value. Equation [modulated_ior] below gives the formula for the applied IOR modulation. |
| 494 | +- The **`specular_ior`** parameter controls the index of refraction (IOR) of the dielectric. The ratio $\eta_s$ of this to the adjacent medium's IOR (along with the angle cosine $\mu$), determines the physical dielectric Fresnel factor $F_s(\mu, \eta_s)$. The presence of the [Coat](index.html#model/coat) determines the value of $\eta_s$ (see equation [modulated_specular_fresnel_factor]). |
495 | 495 |
|
496 | | -- The **`specular_color`** parameter modulates the Fresnel factor of $f_\mathrm{dielectric}$, but only for the initial reflection of light incident from above, while the light transmitted from above or below (or reflected from below) is assumed to be unaffected. This is technically unphysical if altered from the default white color (as real dielectrics have a Fresnel factor dependent only on the index of refraction), but can be useful in practice to artificially tint the specular highlight without disturbing other aspects of the light transport, i.e. the reflection due to scattering from the internal medium, or the reflection from below, or the transmission from above or below. |
497 | | - |
498 | | -The formula for the specular IOR modulation controlled via **`specular_weight`** is as follows. Given the existing **`specular_ior`**, the ratio $\eta_s$ of this to the IOR of the surrounding medium is computed (which should take into account the presence of the coat, according to equation [specular_ior_ratio] in the Coat section). |
499 | | -Given this ratio, the dielectric Fresnel reflection factor of $f_\mathrm{dielectric}$ at normal incidence is given by |
500 | | -\begin{equation} \label{unmodulated_fresnel} |
501 | | -F_s = \left|\frac{1 - \eta_s}{1 + \eta_s}\right|^2 \ . |
502 | | -\end{equation} |
503 | | -This Fresnel factor (of the initial reflection from above) is then modulated by multiplying by $\xi_s$ = **`specular_weight`**. Thus solving for the new IOR ratio $\eta^\prime_s$ after the modulation: |
504 | | -\begin{equation} \label{modulated_ior} |
505 | | -\eta^\prime_s = \frac{1 + \epsilon} {1 - \epsilon} \quad \mathrm{with} \quad \epsilon = \mathrm{sgn}(\eta_s-1)\sqrt{\xi_s F_s} \ . |
506 | | -\end{equation} |
507 | | -Applying this modulated IOR ratio $\eta^\prime_s$ in the angle-dependent dielectric Fresnel formula $F(\mu, \eta^\prime_s)$ then produces the desired reflectivity modulation at any incident angle cosine $\mu$. The Fresnel transmission factor and refraction into and out of the base dielectric should also be consistent with the IOR ratio $\eta^\prime_s$. |
508 | | - |
509 | | -For convenience, we also allow $\xi_s = \mathtt{specular\_weight}$ to exceed 1 so that the reflectivity is increased above the level set by **`specular_ior`**. Note though there is a constraint $\xi_s \le 1/F_s$ since the scaled reflection coefficient cannot exceed $1$. So there needs to be an internal clamp to ensure $\xi_s \in [0, 1/F_s]$. |
| 496 | +- The **`specular_weight`** parameter provides a convenient, texturable linear $[0, 1]$ overall multiplier of the dielectric reflectivity. This is further multiplied by **`specular_color`**, giving a total RGB specular reflectivity modulation of $\boldsymbol{\xi}_s$ = **`specular_weight`** * **`specular_color`**. This multiplies the physical Fresnel factor $F_s$, with a clamp to ensure energy conservation, producing the modulated specular Fresnel factor $\boldsymbol{F}'_s$: |
| 497 | + \begin{equation} \label{modulated_specular_fresnel_factor} |
| 498 | + \boldsymbol{F}'_s = \min{(1, \,\boldsymbol{\xi}_s F_s)} \ . |
| 499 | + \end{equation} |
| 500 | + However we assume that this $\boldsymbol{F}'_s$ Fresnel factor applies *only* for rays incident to the dielectric interface from above, while the light transmitted from above or below (or reflected from below) is assumed to be unaffected. This is technically unphysical if altered from the default white color (as real dielectrics have a Fresnel factor dependent only on the index of refraction), but can be useful in practice to artificially tint the specular highlight without disturbing other aspects of the light transport, i.e. the reflection due to scattering from the internal medium, or the reflection from below, or the transmission from above or below. |
510 | 501 |
|
511 | 502 |
|
512 | 503 | Specular params | Label | Type | Range | Norm | Default | Description |
513 | 504 | ------------------------------------|------------|----------|:---------------:|:----------:|:-------------:|---------------------------------------------- |
514 | | -**`specular_weight`** | Weight | `float` | $ [0, \infty) $ | $ [0, 1] $ | $ 1 $ | Modulates the dielectric reflectivity at normal incidence |
515 | | -**`specular_color`** | Color | `color3` | $ [0, 1]^3 $ | | $ (1, 1, 1) $ | Tints the dielectric Fresnel factor |
| 505 | +**`specular_weight`** | Weight | `float` | $ [0, \infty) $ | $ [0, 1] $ | $ 1 $ | Modulates the dielectric reflectivity |
| 506 | +**`specular_color`** | Color | `color3` | $ [0, 1]^3 $ | | $ (1, 1, 1) $ | Tints the dielectric reflectivity |
516 | 507 | **`specular_roughness`** | Roughness | `float` | $ [0, 1] $ | | $ 0.3 $ | Roughness of NDF of dielectric BSDF $f_\mathrm{dielectric}$ |
517 | 508 | **`specular_roughness_anisotropy`** | Anisotropy | `float` | $ [0, 1] $ | | $ 0 $ | Anisotropy of NDF of dielectric BSDF $f_\mathrm{dielectric}$ |
518 | 509 | **`specular_ior`** | IOR | `float` | $ (0, \infty) $ | $ [1, 3] $ | $ 1.5 $ | Refractive index of $V_\mathrm{dielectric}$ |
|
818 | 809 | B &=& \frac{n_d - 1}{V_d \; (\lambda^{-2}_F - \lambda^{-2}_C)} \ , \nonumber \\ |
819 | 810 | A &=& n_d - \frac{B}{\lambda^2_d} \ . |
820 | 811 | \end{eqnarray} |
821 | | -We assume that **`specular_ior`** (including any modulation via **`specular_weight`** as in equation [modulated_ior]) defines $n(\lambda_d)$. |
| 812 | +We assume that **`specular_ior`** defines $n(\lambda_d)$. |
822 | 813 | Thus the IOR $n$ at any wavelength $\lambda$ is determined, given $V_d$. A renderer can use this known $n(\lambda)$ function to model the effect of dispersion, for example by stochastically choosing a wavelength sample and tracing the refracted ray direction according to the corresponding IOR. |
823 | 814 |
|
824 | 815 | However the Abbe number itself is not very intuitive to work with, as the dispersion effect increases as the Abbe number decreases (zero dispersion occurs at infinite Abbe number). We therefore prefer to use a more artist-friendly parametrization, where the Abbe number is specified by |
|
909 | 900 | \begin{equation} \label{specular_ior_ratio} |
910 | 901 | \eta_s = \mathrm{lerp}(n_b/n_a, n_b/n_c, \mathtt{C}) \ . |
911 | 902 | \end{equation} |
912 | | -This ratio then determines the specular Fresnel factor, as in equation [modulated_ior]. |
913 | | -(Note that as discussed in the coat [TIR](index.html#model/coat/totalinternalreflection) section, evaluation of the specular Fresnel factor may need to be further modified to model the refraction of the ray inside the coat). |
| 903 | +This ratio then determines the specular Fresnel factor, which may then be further modulated via **`specular_weight`** and **`specular_color`** as in equation [modulated_specular_fresnel_factor]. (Note that as discussed in the coat [TIR](index.html#model/coat/totalinternalreflection) section, evaluation of the specular Fresnel factor may need to be further modified to model the refraction of the ray inside the coat). |
914 | 904 |
|
915 | 905 | The absorption of the medium $V_\mathrm{coat}$ is parametrized by **`coat_color`**, which is assumed to specify the _square_ of the transmittance of the coat at normal incidence (i.e. $T_\mathrm{coat}$ = **`coat_color`** in the notation of equation [non-reciprocal-albedo-scaling-with-T]). Thus the observed tint color of the underlying base due to absorption in the coat is approximately given by **`coat_color`** due to the absorption along the incident and outgoing rays (note that the specular reflection from the coat itself is _not_ tinted). |
916 | 906 |
|
|
988 | 978 | \begin{equation} \label{base_roughness_estimate} |
989 | 979 | r_b = \mathrm{lerp}(r_d, r_m, \mathtt{M}) \ . |
990 | 980 | \end{equation} |
991 | | -The base dielectric roughness $r_d$ can reasonably be estimated as a mix between the high roughness of an assumed underlying base and the microfacet dielectric roughness $r$ = **`specular_roughness`**, according to the base dielectric Fresnel factor modulated via **`specular_weight`** $\xi_s$ (see equation [unmodulated_fresnel] and equation [modulated_ior]): |
| 981 | +The base dielectric roughness $r_d$ can reasonably be estimated as a mix between the high roughness of an assumed underlying base and the microfacet dielectric roughness $r$ = **`specular_roughness`**, according to the base dielectric Fresnel factor $F_s$: |
992 | 982 | \begin{equation} \label{dielectric_roughness_estimate} |
993 | | -r_d = \mathrm{lerp}(1, r, \xi_s F_s) |
| 983 | +r_d = \mathrm{lerp}(1, r, F_s) |
994 | 984 | \end{equation} |
995 | 985 | while the metallic roughness can be taken to be $r_m = r$. (Note that in this formula for $r_d$, a clamp must be applied to ensure that $\xi_s F_s \in [0, 1]$). |
996 | 986 |
|
|
0 commit comments