Skip to content

Commit 2fc4f3f

Browse files
committed
Expanded the description of the coat_affect_color parameter (#2)
1 parent e2f8b22 commit 2fc4f3f

File tree

1 file changed

+19
-12
lines changed

1 file changed

+19
-12
lines changed

index.html

Lines changed: 19 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -132,18 +132,25 @@
132132
133133
In the above closure formula, `white` denotes a constant white color. The coat layer is then effectively a statistical mix between a "no-op" passthrough (when the `coat` parameter goes to zero) and a dielectric slab with an embedded absorbing medium.
134134
135-
In a real physical material, light scattered by underlying layers is tinted/blurred when transmitted through a colored/rough coating. Capturing these effects accurately in a renderer requires simulating the light interactions between the individual layers in order. Since our model is a simple linear combination of closures that are evaluated independently, we emulate these two effects:
135+
In a real physical material, light scattered by underlying layers is tinted and blurred when transmitted through a colored/rough coating. Capturing these effects accurately in a renderer requires simulating the light interactions between the individual layers in order. Since our model is a simple linear combination of closures that are evaluated independently, we emulate these effects:
136136
137137
<ul>
138-
<li>
139-
Tinting all layers below the coating is achieved by scaling their closures by the **`coat_color`** parameter, which can be interpreted as the absorption effect within the coat medium tinting the reflection from the underlying layers (i.e. energy is absorbed by a tinted coat layer).
140-
</li>
141-
<li>
142-
We provide an option for the coating roughness to increase the roughness of the other GGX BSDFs, namely `metal_brdf`, `specular_brdf`, and `specular_btdf`. The remaining BSDFs are not modulated as they are already rough. The formula for modulating a given **`roughness`** is
143-
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ C
144-
roughness = lerp(roughness, 1, coat * coat_affect_roughness * coat_roughness)
145-
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
146-
</li>
138+
<li>
139+
Tinting all layers below the coating is achieved by scaling their closures by the **`coat_color`** parameter, which can be interpreted as the absorption effect within the coat medium tinting the reflection from the underlying layers (i.e. energy is absorbed by a tinted coat layer).
140+
</li>
141+
<li>
142+
With a dielectric coating on top of a substrate, a fraction of the light exhibits internal reflection inside the coating and goes back down to the substrate to reflect again, becoming darker and more saturated. This effect can be emulated via the **`coat_affect_color`** parameter, which is used as an exponent to the substrate color, currently limited to diffuse reflection and sub-surface scattering:
143+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ C
144+
base_color = pow(base_color, 1.0 + (coat * coat_affect_color))
145+
subsurface_color = pow(subsurface_color, 1.0 + (coat * coat_affect_color))
146+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
147+
</li>
148+
<li>
149+
We also provide an option for the coating roughness to increase the roughness of the other GGX BSDFs, namely `metal_brdf`, `specular_brdf`, and `specular_btdf`. The remaining BSDFs are not modulated as they are already rough. The formula for modulating a given **`roughness`** is
150+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ C
151+
roughness = lerp(roughness, 1, coat * coat_affect_roughness * coat_roughness)
152+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
153+
</li>
147154
</ul>
148155
149156
@@ -152,13 +159,13 @@
152159
Name | Type | Default | Description
153160
-----------------------------|-------|----------|------------
154161
**`coat`** | float | `0` | reflection weight (reflection color is fixed to white)
155-
**`coat_color`** | color | `1,1,1` | tint color for the light coming from the layers below
162+
**`coat_color`** | color | `1,1,1` | tint color for the light coming from all layers below
156163
**`coat_roughness`** | float | `0.1` | coat reflection roughness; squared internally before passed to the BSDF to achieve a more linear perceptual response [#Burley2012]
157164
**`coat_anisotropy`*** | float | `0` | reflection anisotropy of `coat_brdf`; range `[0,1]`
158165
**`coat_rotation`*** | float | `0` | orientation of anisotropy; range `[0,1]` (where `1` means 180 degrees)
159166
**`coat_IOR`** | float | `1.5` | refractive index of `coat_brdf`
160167
**`coat_normal`** | vector | `0,0,0` | shading normal for the coating reflections; optional, overrides the default shading normal; has no effect on the closure combination weights
161-
**`coat_affect_color`*** | float | `0` | how much to affect the color of the diffuse and subsurface scattering layers below; range `[0,1]`
168+
**`coat_affect_color`*** | float | `0` | how much to additionally modulate diffuse reflection and subsurface scattering saturation; range `[0,1]`
162169
**`coat_affect_roughness`*** | float | `0` | how much to affect the roughness of the specular reflection layers below; range `[0,1]`
163170
164171
![](images/coat1.jpg width=70%) ![](images/coat2.jpg width=70%) ![](images/coat3.jpg width=70%)

0 commit comments

Comments
 (0)