OpenPBR icon indicating copy to clipboard operation
OpenPBR copied to clipboard

MaterialX: support thin-walled dielectric

Open portsmouth opened this issue 1 year ago • 1 comments

In OpenPBR's thin walled mode, we describe the behavior of the base dielectric as follows:

The translucent-base slab can be considered an infinitesimally thin sheet of dielectric (absorbing but non-scattering), with the BSDF fdielectric on both sides. A ladder of inter-reflections occurs inside this slab producing a reflected lobe and un-deflected refracted lobe. The transmission_color can be assumed to give the transmittance through the thin sheet at normal incidence (due to absorption). In the smooth case the BRDF and BTDF of this sheet can be solved exactly by summing over a geometrical series of terms containing Fresnel and absorption factors, and this can be extended to a good approximation of the rough case by appropriately roughening the transmission lobe (as described in [Kulla2017]). This model of thin-walled glass is a cheaper, much more convenient way to render windows than a finite thickness non-thin-walled mesh.

The "Revisiting Physically Based Shading at Imageworks" notes from Kulla and Conty describe their implementation of this:

image image

This is implemented natively in Arnold.

It is not currently available in MaterialX it seems. So thin-walled glass is a missing feature currently in the MaterialX implementation.

portsmouth avatar Sep 04 '24 13:09 portsmouth

Following up on this issue, here's a good overview of the status of thin-walled dielectric support in MaterialX:

https://github.com/AcademySoftwareFoundation/MaterialX/issues/864

As a quick summary, the thin_walled flag is available on surface nodes in MaterialX 1.39, but as of today it only has an MDL implementation, and not yet OSL or GLSL implementations.

Here's a related proposal to use the new thin_walled feature in the glTF PBR shading model:

https://github.com/AcademySoftwareFoundation/MaterialX/pull/1937

jstone-lucasfilm avatar Sep 07 '24 23:09 jstone-lucasfilm