Define layer pass-through semantics - #3017
Conversation
|
Thanks for this thoughtful analysis, @tdavidovicNV, and I agree with the core distinction you're drawing here. Deriving base attenuation from the complete directional albedo of the top conflates energy absorbed by the top layer with energy passed through to the base, and your tinted-dielectric example demonstrates this clearly. As you note, the existing GLSL and OSL implementations already follow the semantics you propose, keeping artistic tint out of the pass-through term, so this change would align the specification with shipped behavior. You may have seen that #3022, proposed shortly after this changelist, rewrites the same section of the specification from a complementary angle, defining a vertical-layering transmittance for every BSDF in the PBS library, extending layerability to opaque BSDFs through statistical coverage, and adding composition rules for the Rather than reconciling the two proposals sequentially, I'd propose that we merge your improvements into the transmittance framework of #3022, which I believe would incorporate:
As in #3015, I'd suggest omitting the Implementation notes section from the specification text itself, since the PBR Specification intentionally avoids target-specific implementation details, and your per-target analysis will remain permanently accessible in the description and discussion of this PR. If this plan sounds reasonable to you, I'd be glad to integrate these refinements into #3022 with credit to you as a co-author, or alternatively we could merge #3022 first and rebase this changelist on the new transmittance framework, whichever you'd prefer. Either way, I want to make sure the distinctions you've drawn between reflection, absorption, and pass-through are preserved in the final specification text. |
This changelist integrates the layer pass-through semantics proposed by @tdavidovicNV in AcademySoftwareFoundation#3017 into the vertical-layering transmittance framework, preserving the distinctions drawn there between reflection, absorption, and pass-through. The following specific changes are included: - Evaluate the transmittance of an interface BSDF with its physical Fresnel reflectance alone, classifying the energy removed by non-physical color inputs such as the `tint` of `dielectric_bsdf` as absorption within the interface, matching the behavior of existing implementations. - Present the bidirectional pass-through factor of Weidlich and Wilkie as the ideal quantity underlying vertical layering, with the fixed-exitant-direction transmittance serving as its reference approximation. - Restructure the `layer` node section into parallel "Layering over a BSDF" and "Layering over a VDF" subsections, clarifying that a VDF base represents a surface boundary bound to an interior medium, with medium entry governed by the Fresnel transmittance of the surface interface.
|
@tdavidovicNV Following up on the plan above, I've now integrated the refinements from this changelist into the transmittance framework of #3022, and I wanted to note how each of the distinctions you've drawn is preserved in the merged text:
Your per-channel definition survives as well, with the transmittance defined as a color quantity taking values in I'd welcome your review of the new specification text in #3022, to validate that it faithfully preserves the distinctions between reflection, absorption, and pass-through that you've drawn here. If you're happy with the integrated version, I'd propose that we continue the discussion there, and this changelist can be closed in its favor. |
While reviewing the
layerequation added in #2964, I found that deriving base attenuation as1 - E_topconflates two different outcomes: energy absorbed by the top layer and energy passed toward the base.This is visible with a colored reflection-only dielectric. For untinted Fresnel albedo
F = 0.04and tintc = (1, 0.25, 0.05), the complete top albedo is:The current specification therefore gives base attenuation
(0.96, 0.99, 0.998). The existing GLSL and OSLtestrenderimplementations instead use the untinted unreflected share(1 - F) = (0.96, 0.96, 0.96), treating the tint-removed energy as absorption rather than returning it to the base.This PR introduces an explicit color-valued pass-through factor that may depend on both incident and outgoing directions:
This follows the two-leg construction in Weidlich and Wilkie 2007, section 3.2, where the lower-layer BRDF is attenuated by entry transmission, absorption over the incident and outgoing paths, and return transmission.
For nested layers, the pass-through factors multiply recursively. The PR also separates BSDF-over-BSDF composition from a BSDF bound to a VDF: a lossless transmissive interface has complete directional albedo near one, but that should not prevent transmitted light from entering the medium.
The current implementations are not changed:
BSDF.throughput, and multiplies it inlayer. Reflection-only dielectric and sheen keep artistic color out of pass-through, while generalized Schlick reduces its color-valued albedo to an RGB average.testrender): Also approximates pass-through using only the outgoing direction. It computes top opacity fromfilter_oand scales the base by one minus that value. Dielectric uses untinted pass-through, sheen uses a scalar estimate based on the maximum color component, and generalized Schlick uses a scalar energy estimate.