OpenPBR icon indicating copy to clipboard operation
OpenPBR copied to clipboard

Should non-physical tinting affect lower layers?

Open lukasstockner opened this issue 2 years ago • 3 comments

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.

lukasstockner avatar Aug 08 '23 23:08 lukasstockner

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 avatar Sep 04 '23 18:09 portsmouth

@lukasstockner Just to note, the changes we propose in https://github.com/AcademySoftwareFoundation/OpenPBR/pull/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 avatar Feb 12 '24 19:02 portsmouth

.Addressed in https://github.com/AcademySoftwareFoundation/OpenPBR/pull/157, can be closed.

portsmouth avatar Feb 20 '24 17:02 portsmouth