Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clearcoat layering lerp #2

Open
Da-Krunch opened this issue Jun 13, 2019 · 1 comment
Open

Clearcoat layering lerp #2

Da-Krunch opened this issue Jun 13, 2019 · 1 comment

Comments

@Da-Krunch
Copy link

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.

iliyang added a commit that referenced this issue Jul 15, 2019
@iliyang
Copy link
Contributor

iliyang commented Jul 15, 2019

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants