Autodesk/standard-surface

Clearcoat layering lerp

Da-Krunch opened this issue · 1 comments

I have seen a few people getting stomped on the clearcoat layering logic.

Here are a few thougths:

  1. This regards the doc only: lerp(t, a, b) is not typical. Osl's mix(), glsl's mix(), MDL's lerp all have the syntax as lerp(a, b, t). It's a small change in the doc but might help simplify a bit.

  2. if coat_affect_color default to 0.0 and is "optional", then coat_color should be optional too, because in the simplified model it will have no effect at all and confuse users.

  3. I realize it might be late for this, but the name coat_color is a bit misleading as most of the time a color associated to a lobe should affect the lobe, while here it's affecting everything BUT the lobe. "coat_filter_color" or something more intuitive could have helped.

Good finds, thanks!

  1. This regards the doc only: lerp(t, a, b) is not typical. Osl's mix(), glsl's mix(), MDL's lerp all have the syntax as lerp(a, b, t). It's a small change in the doc but might help simplify a bit.

Fixed.

  1. if coat_affect_color default to 0.0 and is "optional", then coat_color should be optional too, because in the simplified model it will have no effect at all and confuse users.

The spec wasn't absolutely clear that all layers below the coat are indeed tinted by coat_color and that the coat_affect_color parameter applies additional modulation to the diffuse reflection and subsurface scattering color saturation. So coat_color is independent of coat_affect_color. Fixed the spec to be more clear about this. Perhaps coat_affect_color is not the best name, we'll consider renaming it.

  1. I realize it might be late for this, but the name coat_color is a bit misleading as most of the time a color associated to a lobe should affect the lobe, while here it's affecting everything BUT the lobe. "coat_filter_color" or something more intuitive could have helped.

Indeed, coat_filter_color or something like that would be more clear. Thanks, we will consider renaming it.