Skip to content

Remove layer_vdf node and add vdf input to surface node #2959

@HardCoreCodin

Description

@HardCoreCodin

BSDFs describe a surface as an interface between media.
VDFs describe a volume that implicitly fills up the full internals of surface geometry.
It thus makes sense for any vdf to be situated below the bottom-most bsdf describing the interface between media, so that it can fulfill its role of describing the internal medium.
A way of guaranteeing this vdf placement for arbitrary material graphs would be for the actual surface to have a vdf input.

The node layer_vdf layers a bsdf over a vdf - yielding a bsdf that has the vdf "embedded" under it, thus essentially describing a media interface. The resulting "vdf-embedded" bsdf can then be layered arbitrarily, including over other such "vdf-embedded" bsdfs. Such layering effectively describes multiple media interfaces for a single surface material.
Material graphs topologies of this kind are considered "valid" despite making no conceptual sense and being ill-defined.
The fundamental conceptual framework for surface materials with an underlying volume can thus be trivially violated in valid MaterialX graphs, simply by having the layer_vdf node defined in the specification.
It should therefore be deprecated and removed from the next major version of MaterialX (2.0).

A surface node with a vdf input can still represent any mix of vdf, as well as any additive blend or a scaling by a float/color.
With a careful graph topology, it can also represent a mixing of vdfs that explicitly aligns with the mixing of bsdfs at the surface interface, by using mix_bsdf and mix_vdf nodes that are "paired" by sharing their mix amount input upstream.

One example of that is the mixing between subsurface and transmission in OpenPBR:
The base substrate effectively mixes 2 pairs of bsdf/vdf each using a different anisotropic_vdf.
This pairing can be represented using a surface with a vdf input by having the transmission_weight driving the mix amount inputs of both the mix_bsdf and mix_vdf nodes.
This follows from how:
Layer(<top-BSDFs>, Mix(SSS-BSDF, Layer(T-BSDF, T-VDF), T))
is equivalent to:
Layer(Layer(<top-BSDFs>, Mix(SSS-BSDF, T-BSDF, T)), Mix(<embedded-SSS-VDF>, T-VDF), T)
with the outer-most layering being implicit in the presence of bsdf and vdf inputs in the surface node.
This proposal effectively "hoists" this bsdf over vdf layering downstream all the way to the surface node.

This kind of transformation should be able to be procedurally applied retroactively as a backward compatibility conversion when a MaterialX document authored with a layer_vdf node is loaded in a newer version of MaterialX with this proposal implemented.

Image

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions