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

Should non-physical tinting affect lower layers? #81

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

Should non-physical tinting affect lower layers? #81

lukasstockner opened this issue Aug 8, 2023 · 3 comments

Comments

@lukasstockner
Copy link

The spec currently mentions that if specular_color is used to affect the color of the specular reflection, he underlying layers (diffuse/SSS/transmission) should be tinted according to the complementary color to preserve energy.

This makes sense from a physical perspective. However, from what I can tell, these parameters are intended for artistic control rather than physically motivated. Therefore, I'd argue that affecting the lower layers is unintuitive and unexpected - for example, if a user wants to achieve a white object with a green specular highlight, they'd need to set the base_color to something like (0.96, 1.0, 0.96). Instead, I'd suggest to scale the lower layer's intensity according to the maximum value across components, in order to preserve energy without tinting it.

@portsmouth
Copy link
Contributor

There isn't an easy way to express this in a physically-based manner though, without dropping down to some specific approximation (like albedo scaling with some ad-hoc modification).

In the spec currently we say that the specular_color modulates the dielectric Fresnel factor, and thus:

The light transmitted through the dielectric will be compensated accordingly to preserve the energy balance (thus generating a complementary color if specular_color is not white).

Even that doesn't really make sense physically, because the IOR of the dielectric is inconsistent with this modulated Fresnel factor (as noted).

Perhaps the most physical thing would be to say that specular_color (or specular_tint) is effectively modelling an extra, thin-film of purely absorbing index-matched material.. so the specular_color just multiplies the highlight and the base.

Though then one couldn't produce a green specular lobe with an un-tinted (e.g. white) base lobe. That seems rather unphysical though, so do we really want to support it?

@portsmouth
Copy link
Contributor

portsmouth commented Feb 12, 2024

@lukasstockner Just to note, the changes we propose in #157 explicitly decouple the underlying layers from the specular_color tint.

We now say:

image

This eliminates any complementary color due to the specular_color tint.

This is still unphysical (we are artificially tinting a Fresnel factor so losing energy), but in a really clear, minimal way that is easy to account for theoretically.

@portsmouth
Copy link
Contributor

.Addressed in #157, can be closed.

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