Skip to content

Commit e0963af

Browse files
committed
Make clamp of F82 explicit in spec
1 parent f6b49e6 commit e0963af

1 file changed

Lines changed: 6 additions & 2 deletions

File tree

index.html

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -553,11 +553,15 @@
553553
\end{equation}
554554
The final metallic Fresnel term we employ is then given by an overall multiplication by $\xi_s = \mathtt{specular\_weight}$, ensuring that entire metallic lobe is suppressed as the weight goes to zero:
555555
\begin{equation}
556-
\mathbf{F}_{\mathrm{metal}}(\mu) = \xi_s \, \mathbf{F}_{82}(\mu) \ .
556+
\mathbf{F}_{\mathrm{metal}}(\mu) = \xi_s \, \max \big( 0, \mathbf{F}_{82}(\mu) \big) \ .
557557
\end{equation}
558+
Note that the clamp is applied since $\mathbf{F}_{82}(\mu)$ can become negative for some values of $\mu$, which is not physically meaningful [#Hoffman2019].
559+
558560
This formulation has the useful property that it reduces to the regular Schlick reflectivity at the default values of **`specular_weight`** and **`base_weight`** * **`base_color`**.
559561
Note that the edge cannot be brighter than the standard Schlick term, but this is generally true in real metals. We consider this a benefit of this parametrization, as it makes it impossible to produce physically implausible metals with excessively bright edges.
560562

563+
564+
561565
Metal params | Label | Type | Range | Default | Description
562566
------------------------------------|------------|----------|:------------:|:-------------------:|----------------------------------------------
563567
**`base_weight`** | Weight | `float` | $ [0, 1] $ | $ 1 $ | Scalar multiplier to **`base_color`**
@@ -1601,7 +1605,7 @@
16011605
\begin{equation}
16021606
\mathbf{E}_\mathrm{avg} = \mathbf{F}_0 + (\mathbf{1} - \mathbf{F}_0)/21 - \mathbf{b}/126 \ .
16031607
\end{equation}
1604-
where $\mathbf{b}$ is defined in equation [f82_b_coeff]. Note that if both $\mathbf{F}_0$ = **`base_weight`** * **`base_color`** and $\mathbf{C}_s = \mathtt{specular\_color}$ are white, then $\mathbf{F}_0 = \mathbf{1}$ and $\mathbf{b}= \mathbf{0}$ reducing to $\mathbf{E}_\mathrm{avg} = \mathbf{1}$, thus the metal satisfies the furnace test in this case.
1608+
where $\mathbf{b}$ is defined in equation [f82_b_coeff]. If both $\mathbf{F}_0$ = **`base_weight`** * **`base_color`** and $\mathbf{C}_s = \mathtt{specular\_color}$ are white, then $\mathbf{F}_0 = \mathbf{1}$ and $\mathbf{b}= \mathbf{0}$ reducing to $\mathbf{E}_\mathrm{avg} = \mathbf{1}$, thus the metal satisfies the furnace test in this case. Note however that $\mathbf{F}_{82}(\mu)$ can be slightly negative (for very dark metals), thus it is necessary to clamp it. The albedo of the clamped Fresnel is not exactly given by clamping the formula above, but it is very close (never more than 0.01 incorrect in absolute albedo).
16051609

16061610
[^Oren_Nayar_formula]: The $s$ term is given by (with normal $\mathbf{n}$):
16071611
\begin{eqnarray*}

0 commit comments

Comments
 (0)