Skip to content

Commit

Permalink
Merge branch 'AcademySoftwareFoundation:main' into main
Browse files Browse the repository at this point in the history
  • Loading branch information
crydalch authored Jun 6, 2022
2 parents 4477cc8 + e05f7e9 commit 413feac
Show file tree
Hide file tree
Showing 261 changed files with 26,291 additions and 370,809 deletions.
104 changes: 68 additions & 36 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,26 +18,33 @@ jobs:
fail-fast: false
matrix:
include:
- name: Linux_GCC_7_Python27
- name: Linux_GCC_6_Python27
os: ubuntu-18.04
compiler: gcc
compiler_version: "7"
compiler_version: "6"
python: 2.7
cmake_config: -DMATERIALX_PYTHON_VERSION=2 -DMATERIALX_BUILD_SHARED_LIBS=ON
cmake_config: -DMATERIALX_PYTHON_VERSION=2 -DMATERIALX_BUILD_VIEWER=OFF

- name: Linux_GCC_10_Python37
os: ubuntu-20.04
- name: Linux_GCC_7_Python37
os: ubuntu-18.04
compiler: gcc
compiler_version: "10"
compiler_version: "7"
python: 3.7
upload_shaders: ON
cmake_config: -DMATERIALX_BUILD_SHARED_LIBS=ON

- name: Linux_GCC_11_Python39
os: ubuntu-20.04
compiler: gcc
compiler_version: "11"
python: 3.9
test_render: ON
build_javascript: ON

- name: Linux_GCC_12_Python39
os: ubuntu-22.04
compiler: gcc
compiler_version: "12"
python: 3.9
upload_shaders: ON

- name: Linux_Clang_9_Python27
os: ubuntu-18.04
Expand All @@ -46,18 +53,26 @@ jobs:
python: 2.7
cmake_config: -DMATERIALX_PYTHON_VERSION=2 -DMATERIALX_BUILD_SHARED_LIBS=ON

- name: Linux_Clang_11_Python37
- name: Linux_Clang_10_Python37
os: ubuntu-20.04
compiler: clang
compiler_version: "11"
compiler_version: "10"
python: 3.7
build_javascript: ON

- name: Linux_Clang_12_Python39
os: ubuntu-20.04
- name: Linux_Clang_13_Python39
os: ubuntu-22.04
compiler: clang
compiler_version: "12"
compiler_version: "13"
python: 3.9
test_render: ON

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

- name: MacOS_Xcode_10_Python27
os: macos-10.15
Expand All @@ -73,10 +88,11 @@ jobs:
python: 3.7

- name: MacOS_Xcode_13_Python39
os: macos-11
os: macos-12
compiler: xcode
compiler_version: "13.1"
compiler_version: "13.3"
python: 3.9
static_analysis: ON

- name: Windows_VS2019_Win32_Python27
os: windows-2019
Expand Down Expand Up @@ -172,7 +188,7 @@ jobs:
run: |
mkdir build
cd build
cmake -DMATERIALX_BUILD_PYTHON=ON -DMATERIALX_BUILD_VIEWER=ON -DMATERIALX_TEST_RENDER=OFF -DMATERIALX_WARNINGS_AS_ERRORS=ON ${{matrix.cmake_config}} ..
cmake -DMATERIALX_BUILD_PYTHON=ON -DMATERIALX_BUILD_VIEWER=ON -DMATERIALX_TEST_RENDER=OFF -DMATERIALX_WARNINGS_AS_ERRORS=ON -DCMAKE_EXPORT_COMPILE_COMMANDS=ON ${{matrix.cmake_config}} ..
- name: CMake Build
run: cmake --build . --target install --config Release --parallel 2
Expand All @@ -183,6 +199,7 @@ jobs:
working-directory: build

- name: Python Tests
if: matrix.dynamic_analysis != 'ON'
run: |
python MaterialXTest/main.py
python MaterialXTest/genshader.py
Expand All @@ -203,6 +220,12 @@ jobs:
python python/Scripts/generateshader.py resources/Materials/Examples/StandardSurface/standard_surface_marble_solid.mtlx --path . --target glsl --validator glslangValidator.exe --vulkanGlsl True --validatorArgs="-V --aml"
python python/Scripts/generateshader.py resources/Materials/Examples/StandardSurface/standard_surface_marble_solid.mtlx --path . --target essl --validator glslangValidator.exe
- name: Static Analysis Tests
if: matrix.static_analysis == 'ON' && runner.os == 'macOS'
run: |
brew install cppcheck
cppcheck --project=build/compile_commands.json --error-exitcode=1 --suppress=*:*/Catch/* --suppress=*:*/External/* --suppress=*:*/NanoGUI/* --suppress=*:*/PugiXML/*
- name: Initialize Virtual Framebuffer
if: matrix.test_render == 'ON' && runner.os == 'Linux'
run: |
Expand All @@ -222,10 +245,31 @@ jobs:
- name: Viewer Tests
if: matrix.test_render == 'ON'
run: |
../installed/bin/MaterialXView --material brass_average_baked.mtlx --mesh ../../resources/Geometry/sphere.obj --screenWidth 128 --screenHeight 128 --cameraZoom 1.4 --shadowMap false --captureFilename Viewer_BrassAverage.png
../installed/bin/MaterialXView --material usd_preview_surface_carpaint.mtlx --mesh ../../resources/Geometry/sphere.obj --screenWidth 128 --screenHeight 128 --cameraZoom 1.4 --shadowMap false --captureFilename Viewer_CarpaintTranslated.png
../installed/bin/MaterialXView --material brass_average_baked.mtlx --mesh ../../resources/Geometry/sphere.obj --screenWidth 48 --screenHeight 48 --cameraZoom 1.4 --shadowMap false --captureFilename Viewer_BrassAverage.png
../installed/bin/MaterialXView --material usd_preview_surface_carpaint.mtlx --mesh ../../resources/Geometry/sphere.obj --screenWidth 48 --screenHeight 48 --cameraZoom 1.4 --shadowMap false --captureFilename Viewer_CarpaintTranslated.png
working-directory: build/render

- name: Upload Installed Package
if: matrix.dynamic_analysis != 'ON'
uses: actions/upload-artifact@v2
with:
name: MaterialX_${{ matrix.name }}
path: build/installed/

- name: Upload Reference Shaders
uses: actions/upload-artifact@v2
if: matrix.upload_shaders == 'ON'
with:
name: Reference_Shaders_${{ matrix.name }}
path: build/bin/reference/

- name: Upload Renders
uses: actions/upload-artifact@v2
if: matrix.test_render == 'ON'
with:
name: Renders_${{ matrix.name }}
path: build/render/

- name: JavaScript CMake Generate
if: matrix.build_javascript == 'ON'
run: |
Expand Down Expand Up @@ -261,22 +305,10 @@ jobs:
folder: javascript/MaterialXView/dist
single-commit: true

- name: Upload Installed Package
uses: actions/upload-artifact@v2
with:
name: MaterialX_${{ matrix.name }}
path: build/installed/

- name: Upload Reference Shaders
uses: actions/upload-artifact@v2
if: matrix.upload_shaders == 'ON'
with:
name: Reference_Shaders_${{ matrix.name }}
path: build/bin/reference/

- name: Upload Renders
- name: Upload JavaScript Package
if: matrix.build_javascript == 'ON'
uses: actions/upload-artifact@v2
if: matrix.test_render == 'ON'
with:
name: Renders_${{ matrix.name }}
path: build/render/
name: MaterialX_JavaScript
path: javascript/build/installed/JavaScript/MaterialX
if-no-files-found: ignore
18 changes: 18 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,23 @@
# Change Log

## [1.38.5] - Development

### Added
- Added a [refraction approximation](https://github.com/AcademySoftwareFoundation/MaterialX/pull/918) for transmissive surfaces in GLSL, selected by the hwTransmissionRenderMethod generator option.
- Added support for generalized Schlick transmission in GLSL and OSL.
- Added static and dynamic analysis tests to GitHub Actions builds.

### Changed
- Switched to [relative shader includes](https://github.com/AcademySoftwareFoundation/MaterialX/pull/926) within the MaterialX data libraries, enabling custom folder names in distributions.
- Improved and extended the sample [Web Viewer](https://academysoftwarefoundation.github.io/MaterialX/).

### Fixed
- Fixed math for normalizing normal and tangent vectors in GLSL.
- Fixed math for transforming a vector4 by a matrix in OSL.
- Fixed compatibility of OSL Worley noise with OSL 1.9.10.
- Fixed layering of thin-film effects in the Standard Surface shading model.
- Fixed input default values in the glTF PBR shading model.

## [1.38.4] - 2022-04-06

### Added
Expand Down
22 changes: 16 additions & 6 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# MaterialX Version
set(MATERIALX_MAJOR_VERSION 1)
set(MATERIALX_MINOR_VERSION 38)
set(MATERIALX_BUILD_VERSION 4)
set(MATERIALX_BUILD_VERSION 5)
set(MATERIALX_LIBRARY_VERSION ${MATERIALX_MAJOR_VERSION}.${MATERIALX_MINOR_VERSION}.${MATERIALX_BUILD_VERSION})

# Cmake setup
Expand Down Expand Up @@ -49,6 +49,7 @@ option(MATERIALX_PYTHON_LTO "Enable link-time optimizations for MaterialX Python
option(MATERIALX_INSTALL_PYTHON "Install the MaterialX Python package as a third-party library when the install target is built." 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)

set(MATERIALX_PYTHON_VERSION "" CACHE STRING
"Python version to be used in building the MaterialX Python package (e.g. '2.7').")
Expand Down Expand Up @@ -112,6 +113,7 @@ mark_as_advanced(MATERIALX_PYTHON_LTO)
mark_as_advanced(MATERIALX_INSTALL_PYTHON)
mark_as_advanced(MATERIALX_TEST_RENDER)
mark_as_advanced(MATERIALX_WARNINGS_AS_ERRORS)
mark_as_advanced(MATERIALX_DYNAMIC_ANALYSIS)
mark_as_advanced(MATERIALX_PYTHON_VERSION)
mark_as_advanced(MATERIALX_PYTHON_EXECUTABLE)
mark_as_advanced(MATERIALX_PYTHON_OCIO_DIR)
Expand Down Expand Up @@ -176,6 +178,11 @@ else()
if(MATERIALX_WARNINGS_AS_ERRORS)
add_compile_options(-Werror)
endif()
if(MATERIALX_DYNAMIC_ANALYSIS)
set(DYNAMIC_ANALYSIS_OPTIONS -fsanitize=address -fsanitize=leak -fsanitize=undefined -fno-sanitize-recover=all)
add_compile_options(${DYNAMIC_ANALYSIS_OPTIONS})
add_link_options(${DYNAMIC_ANALYSIS_OPTIONS})
endif()
if(MATERIALX_BUILD_JS)
add_compile_options(-fexceptions)
endif()
Expand Down Expand Up @@ -207,8 +214,8 @@ add_subdirectory(source/MaterialXCore)
add_subdirectory(source/MaterialXFormat)

# Add shader generation subdirectories
add_subdirectory(source/MaterialXGenShader)
if(MATERIALX_BUILD_GEN_GLSL OR MATERIALX_BUILD_GEN_OSL OR MATERIALX_BUILD_GEN_MDL)
add_subdirectory(source/MaterialXGenShader)
if (MATERIALX_BUILD_GEN_GLSL)
add_definitions(-DMATERIALX_BUILD_GEN_GLSL)
add_subdirectory(source/MaterialXGenGlsl)
Expand All @@ -221,20 +228,23 @@ if(MATERIALX_BUILD_GEN_GLSL OR MATERIALX_BUILD_GEN_OSL OR MATERIALX_BUILD_GEN_MD
add_definitions(-DMATERIALX_BUILD_GEN_MDL)
add_subdirectory(source/MaterialXGenMdl)
endif()
# TODO: Add only those libraries that are required for enabled generators
add_subdirectory(libraries)
endif()

# Add rendering and viewer subdirectories
if(MATERIALX_BUILD_RENDER)
add_subdirectory(source/MaterialXRender)
add_subdirectory(source/MaterialXRenderOsl)
add_subdirectory(source/MaterialXRenderHw)
add_subdirectory(source/MaterialXRenderGlsl)
add_subdirectory(resources)
if (MATERIALX_BUILD_GEN_GLSL)
add_subdirectory(source/MaterialXRenderGlsl)
endif()
if (MATERIALX_BUILD_GEN_OSL)
add_subdirectory(source/MaterialXRenderOsl)
endif()
if(MATERIALX_BUILD_VIEWER)
add_subdirectory(source/MaterialXView)
endif()
add_subdirectory(resources)
endif()

# Add test subdirectory
Expand Down
114 changes: 114 additions & 0 deletions GOVERNANCE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,114 @@
# MaterialX Project Governance

MaterialX is a project of the
[Academy Software Foundation](https://www.aswf.io/) and relies on the ASWF
governance policies, supported by the Linux Foundation.

The MaterialX project maintains a Technical Steering Committee (TSC), which
has final authority over the project. As defined in the project charter,
TSC responsibilities include, but are not limited to:

- Discussions, seeking consensus, and where necessary, voting on technical
matters relating to MaterialX that affect multiple projects.
- Maintainance and administration of the MaterialX GitHub repository.
- Coordinating technical direction of the project.
- Coordinatng marketing, events, and communications regarding MaterialX.

Within the TSC there are two key subgroups: **Voting Members**, who take on
formal responsibiities for maintaining the MaterialX project and vote when
decisions are required; and **Stakeholders**, who represent specific teams and
companies in the industry and speak on their behalf in MaterialX discussions.

### Voting Members

These committee members are responsible for contributing actively to the
MaterialX project, whether it's in the form of developing code, improving the
specification and documentation, reviewing pull requests on GitHub, or
assisting teams with their MaterialX integrations. Although we expect most
decisions to be unanimous across the MaterialX TSC, for decisions where a
formal vote is required, a majority of voting members is required to move
forward with a change.

Within the voting members of the TSC are two elected leadership roles. Any
voting TSC member can express interest in serving in a role, or nominate
another member to serve. There are no term limits, and one person may hold
multiple roles simultaneously. Should a TSC member resign from a leadership
role before their term is complete, a successor shall be elected through the
standard nomination and voting process to complete the remainder of the term.
The leadership roles are:

- **Chair**: This position acts as the project manager, organizing meetings and
providing oversight to project administration.
- **TAC Representative**: This position represents the MaterialX project in meetings
of the Technical Advisory Council of the ASWF.

The current Voting Members of the MaterialX TSC are:

- Jonathan Stone - Lucasfilm ADG **(Chair and TAC Representative)**
- Doug Smythe - Industrial Light & Magic
- Niklas Harrysson - Lumiere Software
- Orn Gunnarsson - Autodesk
- David Larsson - Adobe

### Stakeholders

These committee members represent teams or companies that are closely aligned
with the MaterialX project, and have a strong interest in how it evolves going
forward. Stakeholders speak on behalf of their team or company in MaterialX
discussions, providing the breadth of perspectives that is required to guide
the project. Most new committee members start in this category, and it
doesn't require a commitment on their part to contribute to or maintain the
MaterialX project, though they are encouraged to do so.

The current Stakeholders of the MaterialX TSC are:

- Eric Bourque - Autodesk
- Rafal Jaroszkiewicz - SideFX
- Lee Kerley - Sony Pictures Imageworks
- Lutz Kettner - NVIDIA
- Philippe Leprince - Pixar RenderMan
- Jonathan Litt - Epic Games
- André Mazzone - ILM
- Magnus Pettersson - IKEA
- Brian Savery - AMD

### TSC Nomination and Succession

Any proposal for additional members of the TSC may be submitted by reaching
out to a current TSC member on Slack or raising the issue at a TSC meeting.
New TSC members are accepted or rejected by majority vote of the TSC.

If a TSC member is for an extended period not regularly participating or
performing the responsibilities expected of TSC members, the TSC may by
majority vote request an alternate TSC member be submitted by that
organization, or remove the inactive member from the TSC.

A member of the TSC may nominate a successor in the event that such member
decides to leave the TSC, and the TSC shall confirm or reject such nomination
by a vote. In the event that the departing member's nomination for successor
is rejected by vote of the TSC, the departing member shall be entitled to
continue nominating successors until one such successor is confirmed by vote
of the TSC. If the departing member fails or is unable to nominate a
successor, the TSC may nominate one on the departing member's behalf.

Voting TSC membership is presumed to be retained by the individual even if
they change employers. The TSC may take action to ensure that organizational
stakeholder representation not become severely disproportionate, for example by
urging an organization that loses its sole TSC representative to nominate a
new member, or to limit the total number of members from any one organization
if too many members all move to the same organization.

### TSC Meetings

All meetings of the TSC are intended to be open to the public, except where
there is a reasonable need for privacy. The TSC meets regularly in a video
conference call, at a cadence deemed appropriate by the TSC. The TSC Chair
moderates the meeting, or appoints another TSC member to moderate in his or
her absence. Scheduling and connection details may be found in the public
[ASWF Meeting Calendar](https://www.aswf.io/meeting-calendar/).

Prior to each TSC meeting, the meeting chair will share the agenda with
the TSC members and broader community on the MaterialX channel of the ASWF
Slack. TSC members can also add items to this agenda before the start of
each meeting. The meeting chair is responsible for ensuring that minutes
are taken and posted on Slack.
Loading

0 comments on commit 413feac

Please sign in to comment.