From 093b8195db3386f5d2f19dfdfee6eb9165116b09 Mon Sep 17 00:00:00 2001 From: Jonathan Stone Date: Fri, 6 Sep 2024 17:12:55 -0700 Subject: [PATCH] Initial implementation of Disney Principled (#2004) This changelist adds an initial MaterialX graph for the Disney Principled BSDF, as described in Brent Burley's 2012 and 2015 presentations. For simplicity, the original separated interfaces for `disney_brdf_2012` and `disney_bsdf_2015` have been merged into a single `disney_principled` interface, providing artists with a unified entry point for the shading model. Where possible, the original empirical approach of Disney Principled has been preserved, including the use of the `burley_diffuse_bsdf` and `generalized_schlick_bsdf` nodes, though a few simplifications have been employed, including the use of the `layer` node for physically based layering and the `sheen_bsdf` node for the sheen layer. --- documents/Specification/MaterialX.PBRSpec.md | 10 ++ .../Specification/MaterialX.Specification.md | 4 +- libraries/bxdf/disney_brdf_2015.mtlx | 25 ---- libraries/bxdf/disney_principled.mtlx | 140 ++++++++++++++++++ .../disney_principled_carpaint.mtlx | 12 ++ .../disney_principled_default.mtlx | 17 ++- .../disney_principled_glass.mtlx | 12 ++ .../disney_principled_gold.mtlx | 11 ++ .../disney_principled_plastic.mtlx | 10 ++ 9 files changed, 206 insertions(+), 35 deletions(-) delete mode 100644 libraries/bxdf/disney_brdf_2015.mtlx create mode 100644 libraries/bxdf/disney_principled.mtlx create mode 100644 resources/Materials/Examples/DisneyPrincipled/disney_principled_carpaint.mtlx rename libraries/bxdf/disney_brdf_2012.mtlx => resources/Materials/Examples/DisneyPrincipled/disney_principled_default.mtlx (60%) create mode 100644 resources/Materials/Examples/DisneyPrincipled/disney_principled_glass.mtlx create mode 100644 resources/Materials/Examples/DisneyPrincipled/disney_principled_gold.mtlx create mode 100644 resources/Materials/Examples/DisneyPrincipled/disney_principled_plastic.mtlx diff --git a/documents/Specification/MaterialX.PBRSpec.md b/documents/Specification/MaterialX.PBRSpec.md index 2e314d479d..298f0fb0b2 100644 --- a/documents/Specification/MaterialX.PBRSpec.md +++ b/documents/Specification/MaterialX.PBRSpec.md @@ -381,6 +381,14 @@ Note that the standard library includes definitions for [**`displacement`**](./M This section contains examples of shading model implementations using the MaterialX PBS library. For all examples, the shading model is defined via a <nodedef> interface plus a nodegraph implementation. The resulting nodes can be used as shaders by a MaterialX material definition. +## Disney Principled BSDF + +This shading model was presented by Brent Burley from Walt Disney Animation Studios in 2012[^Burley2012], with additional refinements presented in 2015[^Burley2015]. + +A MaterialX definition and nodegraph implementation of the Disney Principled BSDF can be found here: +[https://github.com/AcademySoftwareFoundation/MaterialX/blob/main/libraries/bxdf/disney_principled.mtlx](https://github.com/AcademySoftwareFoundation/MaterialX/blob/main/libraries/bxdf/disney_principled.mtlx) + + ## Autodesk Standard Surface This is a surface shading model used in Autodesk products created by the Solid Angle team for the Arnold renderer. It is an über shader built from ten different BSDF layers[^Georgiev2019]. @@ -430,6 +438,8 @@ The MaterialX PBS Library includes a number of nodegraphs that can be used to ap [^Burley2012]: Brent Burley, **Physically-Based Shading at Disney**, , 2012 +[^Burley2015]: Brent Burley, **Extending the Disney BRDF to a BSDF with Integrated Subsurface Scattering**, , 2015 + [^Christensen2015]: Per H. Christensen, Brent Burley, **Approximate Reflectance Profiles for Efficient Subsurface Scattering**, 2015 [^Conty2017]: Alejandro Conty, Christopher Kulla, **Production Friendly Microfacet Sheen BRDF**, , 2017 diff --git a/documents/Specification/MaterialX.Specification.md b/documents/Specification/MaterialX.Specification.md index 60e62d9ce2..29b480f7cb 100644 --- a/documents/Specification/MaterialX.Specification.md +++ b/documents/Specification/MaterialX.Specification.md @@ -2387,7 +2387,7 @@ Custom nodes that output data types with a "shader" semantic are referred to in The attributes for <nodedef> elements as they pertain to the declaration of shaders are: * `name` (string, required): a user-chosen name for this shader node definition element. -* `node` (string, required): the name of the shader node being defined, which typically matches the name of an associated shader function such as “blinn_phong”, “Disney_BRDF_2012”, “volumecloud_vol”. Just as for custom nodes, this shading program may be defined precisely through an <implementation> or <nodegraph>, or left to the application to locate by name using any shader definition method that it chooses. +* `node` (string, required): the name of the shader node being defined, which typically matches the name of an associated shader function such as “blinn_phong”, “disney_principled”, “volumecloud_vol”. Just as for custom nodes, this shading program may be defined precisely through an <implementation> or <nodegraph>, or left to the application to locate by name using any shader definition method that it chooses. The child <output> element within the <nodedef> defines the "data type" of the output for this shader, which must have been defined with a "shader" semantic; see the [Custom Data Types](#custom-data-types) section above and discussion below for details. @@ -2707,8 +2707,6 @@ Example uses for variants include defining a number of allowable colors and text Variants and variantsets are not intrinsically associated with any particular material; they merely state a number of values for a number of named inputs/tokens. However, variantsets may state that they are associated with specific shader-semantic nodes and/or <nodedef> declarations by providing stringarray-type `node` and/or `nodedef` attributes: ```xml - - ... ... ``` diff --git a/libraries/bxdf/disney_brdf_2015.mtlx b/libraries/bxdf/disney_brdf_2015.mtlx deleted file mode 100644 index 916c7d55af..0000000000 --- a/libraries/bxdf/disney_brdf_2015.mtlx +++ /dev/null @@ -1,25 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/libraries/bxdf/disney_principled.mtlx b/libraries/bxdf/disney_principled.mtlx new file mode 100644 index 0000000000..72394cb84f --- /dev/null +++ b/libraries/bxdf/disney_principled.mtlx @@ -0,0 +1,140 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/resources/Materials/Examples/DisneyPrincipled/disney_principled_carpaint.mtlx b/resources/Materials/Examples/DisneyPrincipled/disney_principled_carpaint.mtlx new file mode 100644 index 0000000000..7c5a0ae94f --- /dev/null +++ b/resources/Materials/Examples/DisneyPrincipled/disney_principled_carpaint.mtlx @@ -0,0 +1,12 @@ + + + + + + + + + + + + diff --git a/libraries/bxdf/disney_brdf_2012.mtlx b/resources/Materials/Examples/DisneyPrincipled/disney_principled_default.mtlx similarity index 60% rename from libraries/bxdf/disney_brdf_2012.mtlx rename to resources/Materials/Examples/DisneyPrincipled/disney_principled_default.mtlx index d65e7dbc55..717d769870 100644 --- a/libraries/bxdf/disney_brdf_2012.mtlx +++ b/resources/Materials/Examples/DisneyPrincipled/disney_principled_default.mtlx @@ -1,18 +1,21 @@ - + - - - + - - - + + + + + + + + diff --git a/resources/Materials/Examples/DisneyPrincipled/disney_principled_glass.mtlx b/resources/Materials/Examples/DisneyPrincipled/disney_principled_glass.mtlx new file mode 100644 index 0000000000..dfb1fab67d --- /dev/null +++ b/resources/Materials/Examples/DisneyPrincipled/disney_principled_glass.mtlx @@ -0,0 +1,12 @@ + + + + + + + + + + + + diff --git a/resources/Materials/Examples/DisneyPrincipled/disney_principled_gold.mtlx b/resources/Materials/Examples/DisneyPrincipled/disney_principled_gold.mtlx new file mode 100644 index 0000000000..f0dde69049 --- /dev/null +++ b/resources/Materials/Examples/DisneyPrincipled/disney_principled_gold.mtlx @@ -0,0 +1,11 @@ + + + + + + + + + + + diff --git a/resources/Materials/Examples/DisneyPrincipled/disney_principled_plastic.mtlx b/resources/Materials/Examples/DisneyPrincipled/disney_principled_plastic.mtlx new file mode 100644 index 0000000000..7b2561b5ec --- /dev/null +++ b/resources/Materials/Examples/DisneyPrincipled/disney_principled_plastic.mtlx @@ -0,0 +1,10 @@ + + + + + + + + + +