Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/main' into nikelsm/materialx_dev
Browse files Browse the repository at this point in the history
  • Loading branch information
mnikelsky committed Jul 26, 2023
2 parents fe225fe + 6bdec4e commit fdfaada
Show file tree
Hide file tree
Showing 186 changed files with 4,428 additions and 3,878 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/mxupdate.py ../resources/Materials/TestSuite/stdlib/upgrade --yes
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
5 changes: 4 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ option(MATERIALX_BUILD_TESTS "Build unit tests." ON)
option(MATERIALX_BUILD_SHARED_LIBS "Build MaterialX libraries as shared rather than static." OFF)
option(MATERIALX_PYTHON_LTO "Enable link-time optimizations for MaterialX Python." ON)
option(MATERIALX_INSTALL_PYTHON "Install the MaterialX Python package as a third-party library when the install target is built." ON)
option(MATERIALX_INSTALL_RESOURCES "Install the resources folder when building render modules." ON)
option(MATERIALX_TEST_RENDER "Run rendering tests for MaterialX Render module. GPU required for graphics validation." ON)
option(MATERIALX_WARNINGS_AS_ERRORS "Interpret all compiler warnings as errors." OFF)
option(MATERIALX_DYNAMIC_ANALYSIS "Build MaterialX libraries with dynamic analysis on supporting platforms." OFF)
Expand Down Expand Up @@ -276,7 +277,9 @@ if(MATERIALX_BUILD_RENDER)
if(MATERIALX_BUILD_GRAPH_EDITOR)
add_subdirectory(source/MaterialXGraphEditor)
endif()
add_subdirectory(resources)
if(MATERIALX_INSTALL_RESOURCES)
add_subdirectory(resources)
endif()
endif()

# Add test subdirectory
Expand Down
16 changes: 8 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,27 +34,27 @@ The [MaterialX Viewer](documents/DeveloperGuide/Viewer.md) leverages shader gene

**Figure 1:** Procedural and uniform materials in the MaterialX viewer
<p float="left">
<img src="/documents/Images/MaterialXView_Marble.png" width="204" />
<img src="/documents/Images/MaterialXView_Copper.png" width="204" />
<img src="/documents/Images/MaterialXView_Plastic.png" width="204" />
<img src="/documents/Images/MaterialXView_Carpaint.png" width="204" />
<img src="documents/Images/MaterialXView_Marble.png" width="204" />
<img src="documents/Images/MaterialXView_Copper.png" width="204" />
<img src="documents/Images/MaterialXView_Plastic.png" width="204" />
<img src="documents/Images/MaterialXView_Carpaint.png" width="204" />
</p>

**Figure 2:** Textured, color-space-managed materials in the MaterialX viewer
<p float="left">
<img src="/documents/Images/MaterialXView_TiledBrass.png" width="412" />
<img src="/documents/Images/MaterialXView_TiledWood.png" width="412" />
<img src="documents/Images/MaterialXView_TiledBrass.png" width="412" />
<img src="documents/Images/MaterialXView_TiledWood.png" width="412" />
</p>

### Open Chess Set

The Open Chess Set is an open reference asset, consisting of a [MaterialX file](resources/Materials/Examples/StandardSurface/standard_surface_chess_set.mtlx) in the Standard Surface shading model and a [geometry file](resources/Geometry) in the glTF format. It was authored by Moeen Sayed and Mujtaba Sayed, and was contributed to the MaterialX project by Side Effects.

**Figure 3:** The Open Chess Set, rendered in Arnold for Maya
<img src="/documents/Images/OpenChessSet_Arnold_01.png" />
<img src="documents/Images/OpenChessSet_Arnold_01.png" />

**Figure 4:** The Open Chess Set, rendered in Karma XPU for Houdini
<img src="/documents/Images/OpenChessSet_Karma_01.png" />
<img src="documents/Images/OpenChessSet_Karma_01.png" />

### Pre-Built Binaries

Expand Down
4 changes: 3 additions & 1 deletion cmake/modules/MaterialXConfig.cmake.in
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@ set_and_check(MATERIALX_STDLIB_DIR "@PACKAGE_CMAKE_INSTALL_PREFIX@/libraries")
if(@MATERIALX_BUILD_PYTHON@ AND @MATERIALX_INSTALL_PYTHON@)
set_and_check(MATERIALX_PYTHON_DIR "@PACKAGE_CMAKE_INSTALL_PREFIX@/python")
endif()
set_and_check(MATERIALX_RESOURCES_DIR "@PACKAGE_CMAKE_INSTALL_PREFIX@/resources")
if(@MATERIALX_BUILD_RENDER@ AND @MATERIALX_INSTALL_RESOURCES@)
set_and_check(MATERIALX_RESOURCES_DIR "@PACKAGE_CMAKE_INSTALL_PREFIX@/resources")
endif()

check_required_components(@CMAKE_PROJECT_NAME@)
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
Loading

0 comments on commit fdfaada

Please sign in to comment.