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

Splitting specular_color between dielectric tint and metallic edge color #78

Open
lukasstockner opened this issue Aug 8, 2023 · 2 comments

Comments

@lukasstockner
Copy link

Currently, the specular_color parameter serves two purposes: It acts as a multiplier on top of the Fresnel term for the dielectric reflection, and it acts as the F82 parameter for the metallic component.

I'm not sure if this is a good idea, since these two purposes seem quite different to me:

  • The Fresnel multiplier is a non-physical tweak, while the metallic parameter models a physical effect
  • The Fresnel multiplier affects all angles, while the metallic parameter only affects near-grazing angles
  • Sharing the parameter makes it impossible to create a half-metallic material which matches a real metal, but doesn't tint the dielectric reflection (of course, this sort of half-metallic half-dielectric material is not really physical, but users will do it anyways)
@portsmouth
Copy link
Contributor

portsmouth commented Aug 27, 2023

The Fresnel multiplier affects all angles, while the metallic parameter only affects near-grazing angles

Sharing the parameter makes it impossible to create a half-metallic material which matches a real metal, but doesn't tint the dielectric reflection (of course, this sort of half-metallic half-dielectric material is not really physical, but users will do it anyways)

That sharing is a legacy of Standard Surface. I guess the idea was that the base substrate is a mixture of metal and dielectric, both of which produce a specular lobe (due to the metallic or dielectric Fresnel, respectively).

I do agree that it's potentially confusing that specular_color specifies the F82 grazing edge tint of the metallic lobe (with F0 specified by base_color), while specular_color specifies the tint of the dielectric lobe applied at all angles.

Arguably this overloading of meaning is reasonable to sacrifice some precision/expressivity for simplification of the parameter set. We also do this overloading for base_color, which controls the diffuse lobe albedo and the metal F0.

Your example of a mix of metal and dielectric would come up practically in cases where one is blending from a metallic region to a dielectric region, e.g. modelling flaky metallic paint on shiny plastic. Then if the plastic has the default white specular_color but the metal doesn't, currently artists would need to manually blend the specular_color using the metalness weight otherwise the plastic areas would look wrong with non-white highlights.

The Fresnel multiplier is a non-physical tweak, while the metallic parameter models a physical effect

In #66, Brecht notes that these more non-physical / artist-driven effects are referred to as "tints" in Blender, to distinguish from physical parameters.


So a tentative proposal is to have:
  • metallic_edge_tint (or some other appropriate name) specifically for metals, controlling the F82-tint model

  • specular_tint/specular_edge_tint (where specular_color is replaced with specular_tint) remapping the resulting Fresnel curve (for both the metallic and dielectric Fresnel) non-physically, to interpolate between the specified F0/F90 colors (as per your suggestion in Ability to tint specular highlights without affecting grazing angles #77). We would need to decide on the specific remapping math though.

This then:

  • decouples the metallic edge tint from the dielectric Fresnel, with a parameter specifically to control only that metal-specific physical effect.
  • provides more artistic control over the Fresnel factor of both metals and dielectrics, via two colors explicitly named "tints" indicating they are non-physical/advanced/atypical.

but at the expense of adding two new parameters.

Though note the F0 of metals will depend on both base_color and specular_tint (probably just the product of the two, depending on how this is implemented).

@portsmouth
Copy link
Contributor

Probably not doing this, suggest to close.

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