Skip to content

Commit

Permalink
Merge branch 'main' into pingpog-node
Browse files Browse the repository at this point in the history
Signed-off-by: Jonathan Stone <[email protected]>
  • Loading branch information
jstone-lucasfilm committed Jul 6, 2023
2 parents 0a72507 + cdd53d2 commit 270e4f7
Show file tree
Hide file tree
Showing 62 changed files with 1,431 additions and 1,096 deletions.
19 changes: 13 additions & 6 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,14 @@ jobs:
compiler: clang
compiler_version: "14"
python: 3.11
cmake_config: -DMATERIALX_DYNAMIC_ANALYSIS=ON
clang_format: ON

- name: Linux_Clang_14_DynamicAnalysis
os: ubuntu-22.04
compiler: clang
compiler_version: "14"
python: None
cmake_config: -DMATERIALX_DYNAMIC_ANALYSIS=ON
dynamic_analysis: ON

- name: MacOS_Xcode_11_Python37
Expand All @@ -77,9 +83,9 @@ jobs:
python: 3.9

- name: MacOS_Xcode_14_Python311
os: macos-12
os: macos-13
compiler: xcode
compiler_version: "14.2"
compiler_version: "14.3"
python: 3.11
test_shaders: ON

Expand Down Expand Up @@ -147,6 +153,7 @@ jobs:
Add-Content $env:GITHUB_PATH "$PWD/vcpkg/installed/x64-windows/tools"
- name: Install Python ${{ matrix.python }}
if: matrix.python != 'None'
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python }}
Expand Down Expand Up @@ -192,11 +199,11 @@ jobs:
working-directory: build

- name: Python Tests
if: matrix.dynamic_analysis != 'ON'
if: matrix.python != 'None'
run: |
python MaterialXTest/main.py
python MaterialXTest/genshader.py
python Scripts/mxformat.py ../resources/Materials/TestSuite/stdlib/upgrade --yes --upgradeVersion True
python Scripts/mxformat.py ../resources/Materials/TestSuite/stdlib/upgrade --yes --upgrade
python Scripts/mxvalidate.py ../resources/Materials/Examples/StandardSurface/standard_surface_marble_solid.mtlx --stdlib --verbose
python Scripts/mxdoc.py --docType md ../libraries/pbrlib/pbrlib_defs.mtlx
python Scripts/mxdoc.py --docType html ../libraries/bxdf/standard_surface.mtlx
Expand Down Expand Up @@ -249,7 +256,7 @@ jobs:
working-directory: build/render

- name: Upload Installed Package
if: matrix.dynamic_analysis != 'ON'
if: matrix.python != 'None'
uses: actions/upload-artifact@v3
with:
name: MaterialX_${{ matrix.name }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ This document describes a number of shader-semantic nodes implementing widely-us
[BSDF Nodes](#bsdf-nodes)
[EDF Nodes](#edf-nodes)
[VDF Nodes](#vdf-nodes)
[Shader Nodes](#shader-nodes)
[PBR Shader Nodes](#pbr-shader-nodes)
[Utility Nodes](#utility-nodes)

**[Shading Model Examples](#shading-model-examples)**
Expand Down Expand Up @@ -303,7 +303,7 @@ The PBS nodes also make use of the following standard MaterialX types:
* `anisotropy` (float): Anisotropy factor, controlling the scattering direction, range [-1.0, 1.0]. Negative values give backwards scattering, positive values give forward scattering, and a value of 0.0 (the default) gives uniform scattering.


## Shader Nodes
## PBR Shader Nodes

<a id="node-surface"> </a>

Expand Down Expand Up @@ -334,6 +334,9 @@ The PBS nodes also make use of the following standard MaterialX types:
* `intensity` (color3): Intensity multiplier for the light's emittance. Defaults to (1.0, 1.0, 1.0).
* `exposure` (float): Exposure control for the light's emittance. Defaults to 0.0.

Note that the standard library includes definitions for [**`displacement`**](./MaterialX.Specification.md#node-displacement) and [**`surface_unlit`**](./MaterialX.Specification.md#node-surfaceunlit) shader nodes.



## Utility Nodes

Expand Down

Large diffs are not rendered by default.

261 changes: 261 additions & 0 deletions documents/Specification/MaterialX.Supplement.md

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ The documents in this folder comprise the complete MaterialX Specification, vers
* [**MaterialX Specification**](./MaterialX.Specification.md) - the main Specification, describing definitions, core functionality and the standard node library
* [**MaterialX Physically Based Shading Nodes**](./MaterialX.PBRSpec.md) - describes BSDF and other shading function nodes useful in constructing complex layered rendering shaders using node graphs
* [**MaterialX Geometry Extensions**](./MaterialX.GeomExts.md) - additional MaterialX elements to define geometry-related information such as collections, properties and material assignments
* [**MaterialX Supplemental Notes**](./MaterialX.Supplement.md) - describes a number of additional node types built from the standard nodes as well as recommended naming and structuring conventions for libraries of custom node definitions
* [**MaterialX Supplemental Notes**](./MaterialX.Supplement.md) - describes recommended naming and structuring conventions for libraries of custom node definitions

<p>

Expand All @@ -33,7 +33,7 @@ Previously, MaterialX used custom types with a structure of output variables to

**Array Types Now Uniform and Static Length**

Many shading languages do not support dynamic array types with a variable length, so MaterialX now only supports arrays with a fixed maximum length, and all array-type node inputs must be uniform; nodes are no longer permitted to output an array type. Array-type inputs may be accompanied by a uniform integer input declaring the number of array elements actually used in the array. Because of this change, the unimplemented &lt;arrayappend> node has been removed.
Many shading languages do not support dynamic array types with a variable length, so MaterialX now only supports arrays with a fixed maximum length, and all array-type node inputs must be uniform; nodes are no longer permitted to output an array type. Array-type inputs may be accompanied by a uniform integer input declaring the number of array elements actually used in the array (the &lt;curveadjust> node has been updated in this way). Because of this change, the unimplemented &lt;arrayappend> node has been removed.


**Connectable Uniform Inputs and New Tokenvalue Node**
Expand All @@ -45,7 +45,7 @@ Similarly, &lt;token>s in materials and other node instances may now be connecte

**Standardized Color Space Names**

The [standard colorspace names](./MaterialX.Specification.md#color-spaces-and-color-management-systems) in MaterialX have now been defined explicitly in the Specification, and are aligned to their definitions in the ACES 1.2 OCIO config file. With this change, there is no need for a definition of "cms" or "cmsconfig" in MaterialX documents, so those two attributes have been deprecated.
The [standard colorspace names](./MaterialX.Specification.md#color-spaces-and-color-management-systems) in MaterialX have now been defined explicitly in the Specification, and are aligned to their definitions in the ACES 1.2 OCIO config file. With this change, there is no need for a definition of "cms" or "cmsconfig" in MaterialX documents, so those two attributes have been deprecated. Additionally, two new colorspaces, "srgb_displayp3" and "lin_displayp3" have been added as standard colorspaces.


**Disambiguated Nodedef and Nodegraph References**
Expand All @@ -62,7 +62,7 @@ The standard &lt;swizzle> node using a string of channel names and allowing arbi

**New Unlit Surface Shader and Standard Materials**

A new standard &lt;surface> constructor node for unlit surfaces has been added to the standard library.
A new &lt;surface_unlit> node for unlit surfaces has been added to the standard library.

Additionally, the standard &lt;surfacematerial> material now supports both single- or double-sided surfaces with the addition of a separate `backsurface` input.

Expand All @@ -72,23 +72,18 @@ Additionally, the standard &lt;surfacematerial> material now supports both singl
Typedefs may now inherit from other types, including built-in types, and may provide hints about their values such as floating-point precision. These new "inherit" and "hint" attributes are themselves merely metadata hints about the types; applications and code generators are still expected to provide their own precise definitions for all custom types.


**New Nodes**
**New and Updated Standard Library Nodes**

The following new standard operator nodes have been added:
In 1.39, we are removing the distinction between "standard nodes" and "supplemental nodes", and descriptions of both can now be found in the main Specification document. Nodes that are implemented in the standard distribution using nodegraphs are annotated with "(NG)" in the Spec to differentiate them from nodes implemented in each rendering target's native shading language.

* [Procedural nodes](./MaterialX.Specification.md#procedural-nodes): **tokenvalue**, **fractal2d**, **cellnoise1d**
Additionally, the following new operator nodes have been added to the standard library:

* [Procedural nodes](./MaterialX.Specification.md#procedural-nodes): **tokenvalue**, **checkerboard**, **fractal2d**, **cellnoise1d**, **unifiednoise2d**, **unifiednoise3d**
* [Geometric nodes](./MaterialX.Specification.md#geometric-nodes): **bump**, **geompropvalueuniform**
* [Math nodes](./MaterialX.Specification.md#math-nodes): boolean **and**, **or**, **not**; **transformcolor**, **creatematrix**
* [Adjustment nodes](./MaterialX.Specification.md#adjustment-nodes): **curveinversecubic**, **curveuniformlinear** and **curveuniformcubic**
* [Math nodes](./MaterialX.Specification.md#math-nodes): boolean **and**, **or**, **not**; **distance**, **transformcolor**, **creatematrix** and **triplanarblend**, as well as integer-output variants of **floor** and **ceil**
* [Adjustment nodes](./MaterialX.Specification.md#adjustment-nodes): **curveinversecubic**, **curveuniformlinear**, **curveuniformcubic** and **colorcorrect**
* [Conditional nodes](./MaterialX.Specification.md#conditional-nodes): boolean-output variants of **ifgreater**, **ifgreatereq** and **ifequal**; new **ifelse** node
* [Channel nodes](./MaterialX.Specification.md#channel-nodes): **extractrowvector**

Additionally, the following new supplemental nodes have been added:

* [Procedural nodes](./MaterialX.Supplement.md#supplemental-procedural-nodes): **unifiednoise2d**, **unifiednoise3d**
* [Math nodes](./MaterialX.Supplement.md#supplemental-math-nodes): **triplanarblend**
* [Adjustment nodes](./MaterialX.Supplement.md#supplemental-adjustment-nodes): **colorcorrect**
* [Channel nodes](./MaterialX.Supplement.md#supplemental-channel-nodes): **separatecolor4**
* [Channel nodes](./MaterialX.Specification.md#channel-nodes): **extractrowvector** and **separatecolor4**


**New Physically Based Shading Nodes**
Expand All @@ -103,10 +98,13 @@ The following new standard physically based shading nodes have been added:

* The &lt;member> element for &lt;typedef>s and the "member" attribute for inputs have been removed from the Specification, as they had never been implemented and it was not clear how they could be implemented generally.
* The "valuerange" and "valuecurve" attributes describing expressions and function curves have been removed, in favor of using the new &lt;curveinversecubic> / &lt;curveuniformcubic> / etc. nodes.
* The &lt;geomcolor>, &lt;geompropvalue> and &lt;geompropvalueuniform> nodes for color3/4-type values can now take a "colorspace" attribute to declare the colorspace of the property value.
* The &lt;cellnoise2d> and &lt;cellnoise3d> nodes now support vector<em>N</em> output types in addition to float output.
* The &lt;noise2d/3d>, &lt;fractal2d/3d>, &lt;cellnoise2d/3d> and &lt;worleynoise2d/3d> nodes now support a "period" input.
* The &lt;worleynoise2d> and &lt;worleynoise3d> nodes now support a number of different distance metrics.
* The &lt;time> node no longer has a "frames per second" input: the application is now always expected to generate the "current time in seconds" using an appropriate method. "Fps" was removed because varible-rate real-time applications have no static "fps", and it's generally not good to bake a situation-dependent value like fps into a shading network.
* The &lt;time> node no longer has a "frames per second" input: the application is now always expected to generate the "current time in seconds" using an appropriate method. The "fps" input was removed because variable-rate real-time applications have no static "fps", and it's generally not good to bake a situation-dependent value like fps into a shading network.
* A standard "tangent" space is now defined in addition to "model", "object" and "world" spaces, and the &lt;heighttonormal> node now accepts a uniform "space" input to define the space of the output normal vector.
* The &lt;switch> node now supports 10 inputs instead of just 5.
* The &lt;surface> and &lt;displacement> nodes are now part of the main Specification rather than being Physically Based Shading nodes.
* &lt;Token> elements are now explicitly allowed to be children of compound nodegraphs, and token values may now have defined enum/enumvalues.
* Inputs in &lt;nodedef>s may now supply "hints" to code generators as to their intended interpretation, e.g. "transparency" or "opacity".
Expand Down
Loading

0 comments on commit 270e4f7

Please sign in to comment.