Skip to content

Commit

Permalink
Update behavior of specular_weight, specular_ior_level, coat_ior_level (
Browse files Browse the repository at this point in the history
#157)

The `specular_ior_level` param is removed, and replaced by `specular_weight` which works in the same way. I incorporated the facility to increase the `specular_weight` to values >1, though with a soft-max at 1 -- retaining the facility we had before, though actually more flexible since it doesn't get capped at an arbitrary maximum value of 2 (it just gets capped by the requirement that the Fresnel factor cannot exceed 1). This seems reasonable and potentially convenient (though we may want to verify that it behaves OK in practice).

The `specular_weight` is now no longer involved in the Fresnel factor multiplier, only `specular_color`. We state that this is applied only to one specific scattering mode (the initial Fresnel reflection from above), and call it out explicitly as an unphysical convenience.
  • Loading branch information
portsmouth authored Apr 28, 2024
1 parent c7af677 commit 0f3eea8
Show file tree
Hide file tree
Showing 4 changed files with 87 additions and 148 deletions.
4 changes: 1 addition & 3 deletions examples/open_pbr_surface_default.mtlx
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,12 @@
<open_pbr_surface name="open_pbr_surface_surfaceshader" type="surfaceshader">
<input name="base_weight" type="float" value="1.0" />
<input name="base_color" type="color3" value="0.8, 0.8, 0.8" />
<input name="base_roughness" type="float" value="0.0" />
<input name="base_diffuse_roughness" type="float" value="0.0" />
<input name="base_metalness" type="float" value="0.0" />
<input name="specular_weight" type="float" value="1.0" />
<input name="specular_color" type="color3" value="1, 1, 1" />
<input name="specular_roughness" type="float" value="0.3" />
<input name="specular_ior" type="float" value="1.5" />
<input name="specular_ior_level" type="float" value="0.5" />
<input name="specular_anisotropy" type="float" value="0.0" />
<input name="specular_rotation" type="float" value="0.0" />
<input name="transmission_weight" type="float" value="0.0" />
Expand All @@ -37,7 +36,6 @@
<input name="coat_anisotropy" type="float" value="0.0" />
<input name="coat_rotation" type="float" value="0.0" />
<input name="coat_ior" type="float" value="1.6" />
<input name="coat_ior_level" type="float" value="0.5" />
<input name="thin_film_thickness" type="float" value="0" />
<input name="thin_film_ior" type="float" value="1.5" />
<input name="emission_luminance" type="float" value="0.0" />
Expand Down
Loading

0 comments on commit 0f3eea8

Please sign in to comment.