Skip to content

Commit

Permalink
Update the coat_darkening parameter to default to 1 (#193)
Browse files Browse the repository at this point in the history
  • Loading branch information
portsmouth authored May 14, 2024
1 parent 0a76007 commit b7f3e98
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 5 deletions.
5 changes: 2 additions & 3 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -881,7 +881,7 @@
**`coat_roughness`** | Roughness | `float` | $ [0, 1] $ | | $ 0 $ | Roughness of NDF of coat BSDF $f_\mathrm{coat}$
**`coat_roughness_anisotropy`** | Anisotropy | `float` | $ [0, 1] $ | | $ 0 $ | Anisotropy of NDF of coat BSDF $f_\mathrm{coat}$
**`coat_ior`** | IOR | `float` | $ (0, \infty) $ | $ [1, 3] $ | $ 1.6 $ | Refractive index of $V_\mathrm{coat}$
**`coat_darkening`** | Darkening | `float` | $ [0, 1] $ | | $ 0 $ | Modulates the physical coat [darkening](index.html#model/coat/darkening) effect.
**`coat_darkening`** | Darkening | `float` | $ [0, 1] $ | | $ 1 $ | Modulates the physical coat [darkening](index.html#model/coat/darkening) effect.

![](images/coat_0.png width=90% align=right) ![](images/coat_1.png width=90% align=left)
<div class="shifted-caption">
Expand All @@ -904,14 +904,13 @@
where $r_\mathrm{B}=$ **`specular_roughness`** and $r_\mathrm{C}=$ **`coat_roughness`**.



### Darkening

Figure [coat_darkening_grid] shows the physically-correct change in appearance (at normal incidence) of a textured diffuse base with a wood texture and smooth clear-coat as the IOR of the clear-coat is varied, exhibiting darkening of the base -- due to the internal reflections in the coat -- which increases as IOR increases.

![Figure [coat_darkening_grid]: Diffuse base with a clear-coat, for coats of different relative IOR $\eta_c$](images/coat_darkening_grid.png width="60%")

However this darkening may not always be desirable artistically, as in some applications it is beneficial for the observed color of the coated color to "match" the input base color (in a sense defined more precisely below in equation [undarkened_coat_albedo]). We allow for this by introducing a **`coat_darkening`** parameter, $\delta$. In the case **`coat_darkening`** $\delta$ = $1$, the physically correct darkening effect due to internal reflections occurs as normal. In the case **`coat_darkening`** $\delta$ = $0$ (the default), the base albedo is instead _boosted_ uniformly by just enough to counteract the darkening effect. The boost factor is reduced to 1 linearly as $\delta \rightarrow 1$.
However this darkening may not always be desirable artistically, as in some applications it is beneficial for the observed color of the coated color to "match" the input base color (in a sense defined more precisely below in equation [undarkened_coat_albedo]). We allow for this by introducing a **`coat_darkening`** parameter, $\delta$. By default $\delta$ = $1$, in which case the physically correct darkening effect due to internal reflections occurs as normal. In the case $\delta$ = $0$ however, the base albedo is instead _boosted_ uniformly by just enough to counteract the darkening effect. The boost factor is reduced to 1 linearly as $\delta \rightarrow 1$.

What we mean by "counteract the darkening" is defined as the albedo of the coated base viewed at normal incidence, $E_c$, being equal to the "un-darkened" albedo
\begin{equation} \label{undarkened_coat_albedo}
Expand Down
2 changes: 1 addition & 1 deletion parametrization.md.html
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@
| `coat_roughness` | Roughness | `float` | $ [0, 1] $ | | $ 0 $ | |
| `coat_roughness_anisotropy` | Anisotropy | `float` | $ [0, 1] $ | | $ 0 $ | |
| `coat_ior` | IOR | `float` | $ (0, \infty) $ | $ [1, 3] $ | $ 1.6 $ | |
| `coat_darkening` | Darkening | `float` | $ [0, 1] $ | | $ 0.0 $ | |
| `coat_darkening` | Darkening | `float` | $ [0, 1] $ | | $ 1 $ | |
| **Fuzz** |
| `fuzz_weight` | Weight | `float` | $ [0, 1] $ | | $ 0 $ | |
| `fuzz_color` | Color | `color3` | $ [0, 1]^3 $ | | $ (1, 1, 1) $ | |
Expand Down
2 changes: 1 addition & 1 deletion reference/open_pbr_surface.mtlx
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@
doc="The directional bias of the roughness of the clear-coat layer, resulting in increasingly stretched highlights along the coat tangent direction." />
<input name="coat_ior" type="float" value="1.6" uimin="0.0" uisoftmin="1.0" uisoftmax="3.0" uiname="Coat Index of Refraction" uifolder="Coat"
doc="The index of refraction of the clear-coat layer." />
<input name="coat_darkening" type="float" value="0.0" uimin="0.0" uimax="1.0" uiname="Coat Darkening" uifolder="Coat"
<input name="coat_darkening" type="float" value="1.0" uimin="0.0" uimax="1.0" uiname="Coat Darkening" uifolder="Coat"
doc="Modulates the physical coat darkening effect." />
<input name="thin_film_weight" type="float" value="0" uimin="0.0" uimax="1.0" uiname="Thin Film Weight" uifolder="Thin Film" uiadvanced="true"
doc="Coverage weight of the thin-film. Use for materials such as multi-tone car paint or soap bubbles." />
Expand Down

0 comments on commit b7f3e98

Please sign in to comment.