Open progschj opened 1 year ago
After today's WG discussion, this is what I would propose:
material
behaves normally as a 2-sided material like it does nowmaterialFront
or materialBack
are present and are used instead of material
materialFront
and materialBack
behave where viewing the surface from the front or back uses the respective material, and remains true for any effect that may "see" the surface (e.g. shadow rays)materialFront
or materialBack
are present, then the side without a material behaves as-if the material is 100% transparentmaterial
for compability with devices which do not implement the sided materials extension@johguenther There was reasonable consensus on today's call with the formulation of the extension listed above. Unless you have any other dissenting opinions, we can change the status to ready for proposal
. I'm planning to implement it anyway in VisRTX to get some initial experience.
I would really like to not intertwine the extension "backface culling" with the feature to have two different (solid) materials front and back. Just focusing on the latter, that request can be solved by e.g. keeping the material
mandatory and optionally add a materialBack
(or materialInside
) parameter plus stating that "handling of transparency is implementation defined" (or stronger defining that material are treated opaque). The "Physically Based" material already implicitly treats a surface as inside/outside via properties ior
and attenuation. This has the benefit that more implementations can support this extension. For example, backface culling is hard to impossible to implement for photonmapping, or BiDir path tracing.
materialFront and materialBack behave where viewing the surface from the front or back uses the respective material, and remains true for any effect that may "see" the surface (e.g. shadow rays)
There is no defined direction for shadow rays (from light to surface or vice versa).
Inspired by this: https://github.com/NVIDIA/VisRTX/issues/63
To accomodate face culling an extension could add additional material parameters
materialFront
,materialBack
for surface objects. They would override the stockmaterial
parameter for that side of the surface.Back/front face culling would then be achieved by setting a fully transparent material on that side. Additionally the extension could specify that setting no material is valid and define the behavior to transparency.