AcademySoftwareFoundation / OpenPBR

Specification and reference implementation for the OpenPBR Surface shading model
Apache License 2.0
425 stars 18 forks source link

Give concrete formula for coat layering model. #103

Closed portsmouth closed 11 months ago

portsmouth commented 11 months ago

This adds a specific recommendation for the coat layering implementation, which is exactly equivalent to what we do in standard surface. This ties in nicely with the discussion in the layering/mixing section (and the "Reduction to a mixture of lobes" section) where we describe this approximation:

image

Earlier, I added a line in the introduction that says:

We generally suggest a recommended baseline implementation that tries to strike a balance between ease of implementation and physical correctness. But ultimately it is up to the developer to choose the appropriate implementation for their use case, based on their practical constraints and the level of visual quality they are aiming for.

So we're saying we give some baseline recommendation, but we're not strict about deviations from it. I'm not sure this is logically clear enough though, e.g. do we consider implementations to conform to the spec if they don't use the recommended approximation, but "respect the physical intent"?

portsmouth commented 11 months ago

Note that in the spec we say:

The absorption of the medium is parametrized by the observed tint color of the underlying base at normal incidence, coat_color. In the full light transport this observed color includes contributions due to multiple bounces back and forth inside the coat layer, so a calculation would be needed to map the final observed tint color to the absorption coefficient which achieves this.

So this is saying that coat_color is the final tint after the physical darkening effect of the bounces, since that is the observed color that the artist sees, if the bounces are taken into account.

Alternatively, we could say that the artist dials the color that would be observed if the bounces were not taken into account, but that is harder to define (what exactly do you ignore when doing the calculation, etc.).

peterkutz commented 11 months ago

@portsmouth

So this is saying that coat_color is the final tint after the physical darkening effect of the bounces, since that is the observed color that the artist sees, if the bounces are taken into account.

This seems reasonable to me.

By "tint", do you mean the observed color at normal incidence relative to the observed color at normal incidence when coat_color is set to white?

I'm asking because the observed color at normal incidence might be darker than white even when coat_color is white (due to absorption at the base surface and internal reflections from the inside of the top surface of the coat).

portsmouth commented 11 months ago

Closing as instead we agreed to make the ground truth be the physically correct layering, given the unambiguous material specified by the BSDFs/media.