Skip to content

Commit

Permalink
Merge branch 'dev_1.39' into validation_updates
Browse files Browse the repository at this point in the history
  • Loading branch information
jstone-lucasfilm authored May 23, 2024
2 parents 1214d9c + d3637cd commit 533a053
Show file tree
Hide file tree
Showing 130 changed files with 5,912 additions and 4,861 deletions.
27 changes: 13 additions & 14 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,22 +26,22 @@ jobs:
cmake_config: -DMATERIALX_BUILD_SHARED_LIBS=ON

- name: Linux_GCC_12_Python311
os: ubuntu-22.04
os: ubuntu-24.04
compiler: gcc
compiler_version: "12"
python: 3.11
build_javascript: ON

- name: Linux_GCC_13_Python312
os: ubuntu-22.04
os: ubuntu-24.04
compiler: gcc
compiler_version: "13"
python: 3.12
static_analysis: ON
cmake_config: -DCMAKE_EXPORT_COMPILE_COMMANDS=ON

- name: Linux_GCC_CoverageAnalysis
os: ubuntu-22.04
os: ubuntu-24.04
compiler: gcc
compiler_version: "None"
python: None
Expand All @@ -55,10 +55,10 @@ jobs:
python: 3.7
cmake_config: -DMATERIALX_BUILD_SHARED_LIBS=ON

- name: Linux_Clang_15_Python312
os: ubuntu-22.04
- name: Linux_Clang_18_Python312
os: ubuntu-24.04
compiler: clang
compiler_version: "15"
compiler_version: "18"
python: 3.12
test_render: ON
clang_format: ON
Expand All @@ -71,7 +71,7 @@ jobs:
python: 3.7

- name: MacOS_Xcode_14_Python311
os: macos-13
os: macos-14
compiler: xcode
compiler_version: "14.3"
python: 3.11
Expand Down Expand Up @@ -128,7 +128,7 @@ jobs:
if: runner.os == 'Linux'
run: |
sudo apt-get update
sudo apt-get install xorg-dev mesa-utils
sudo apt-get install xorg-dev
if [ "${{ matrix.compiler_version }}" != 'None' ]; then
if [ "${{ matrix.compiler }}" = "gcc" ]; then
sudo apt-get install -y g++-${{ matrix.compiler_version }} g++-${{ matrix.compiler_version }}-multilib
Expand Down Expand Up @@ -212,6 +212,8 @@ jobs:
run: |
python MaterialXTest/main.py
python MaterialXTest/genshader.py
python Scripts/creatematerial.py ../resources/Materials/Examples/StandardSurface/chess_set --texturePrefix chessboard --shadingModel standard_surface
python Scripts/creatematerial.py ../resources/Materials/Examples/GltfPbr/boombox --shadingModel gltf_pbr
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
Expand Down Expand Up @@ -255,7 +257,6 @@ jobs:
Xvfb :1 -screen 0 1280x960x24 &
echo "DISPLAY=:1" >> $GITHUB_ENV
echo "LIBGL_ALWAYS_SOFTWARE=1" >> $GITHUB_ENV
echo "GALLIUM_DRIVER=llvmpipe" >> $GITHUB_ENV
- name: Render Script Tests
if: matrix.test_render == 'ON'
Expand Down Expand Up @@ -344,7 +345,6 @@ jobs:
with:
name: MaterialX_JavaScript
path: javascript/build/installed/JavaScript/MaterialX
if-no-files-found: ignore

sdist:
name: Python SDist
Expand Down Expand Up @@ -383,8 +383,8 @@ jobs:
strategy:
fail-fast: false
matrix:
python-minor: ['7', '8', '9', '10', '11']
os: ['ubuntu-latest', 'macos-latest', 'windows-latest']
python-minor: ['7', '8', '9', '10', '11', '12']
os: ['ubuntu-latest', 'windows-latest', 'macos-13']

steps:
- name: Sync Repository
Expand All @@ -402,7 +402,7 @@ jobs:
path: sdist

- name: Build Wheel
uses: pypa/cibuildwheel@v2.16.5
uses: pypa/cibuildwheel@v2.17.0
with:
package-dir: ${{ github.workspace }}/sdist/${{ needs.sdist.outputs.sdist_filename }}
env:
Expand All @@ -413,7 +413,6 @@ jobs:
# manylinux2014 is CentOS 7 based. Which means GCC 10 and glibc 2.17.
CIBW_MANYLINUX_X86_64_IMAGE: manylinux2014
CIBW_BEFORE_ALL_LINUX: yum install -y libXt-devel
CIBW_BEFORE_ALL_MACOS: sudo xcode-select -switch /Applications/Xcode_13.4.app
CIBW_BUILD_VERBOSITY: 1
CIBW_ENVIRONMENT: CMAKE_BUILD_PARALLEL_LEVEL=2
# CIBW_BUILD_FRONTEND: build # https://github.com/pypa/build
Expand Down
19 changes: 19 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,25 @@

## [1.39.0] - Development

## [1.38.10] - 2024-04-12

### Added

- Added support for [environment light intensity](https://github.com/AcademySoftwareFoundation/MaterialX/pull/1737) in generated GLSL shaders.

### Changed

- Removed an [extra suffix](https://github.com/AcademySoftwareFoundation/MaterialX/pull/1744) from element names in texture baking.

### Fixed

- Moved environment prefilter functions to their [referencing GLSL files](https://github.com/AcademySoftwareFoundation/MaterialX/pull/1748), addressing shader compilation errors in USD.
- Enabled color and unit transforms on [root nodes](https://github.com/AcademySoftwareFoundation/MaterialX/pull/1757) in shader generation, addressing missing color transforms in USD.
- Updated [document caches](https://github.com/AcademySoftwareFoundation/MaterialX/pull/1753) to store elements in declaration order, addressing compiler-dependent behavior in nodedef lookups.
- Switched to [framework linkage](https://github.com/AcademySoftwareFoundation/MaterialX/pull/1752) for OpenGL libraries on MacOS, addressing build issues in downstream projects.
- Switched to [legacy OpenGL libraries](https://github.com/AcademySoftwareFoundation/MaterialX/pull/1766) for Python wheels on Linux, addressing missing OpenGL functionality in Python wheels.
- Added a [missing vertex data prefix](https://github.com/AcademySoftwareFoundation/MaterialX/pull/1762) in Vulkan GLSL shader generation.

## [1.38.9] - 2024-02-26

### Added
Expand Down
3 changes: 0 additions & 3 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -71,9 +71,6 @@ if (MATERIALX_BUILD_IOS)
endif()

if (MATERIALX_BUILD_JS)
set(MATERIALX_BUILD_GEN_OSL OFF)
set(MATERIALX_BUILD_GEN_MSL OFF)
set(MATERIALX_BUILD_GEN_MDL OFF)
set(MATERIALX_BUILD_RENDER OFF)
set(MATERIALX_BUILD_TESTS OFF)
endif()
Expand Down
69 changes: 69 additions & 0 deletions documents/Specification/MaterialX.NPRSpec.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
<!-----
MaterialX NPR Shading Nodes v1.39
----->


# MaterialX NPR Shading Nodes

**Version 1.39**
Doug Smythe - Industrial Light & Magic
Jonathan Stone - Lucasfilm Advanced Development Group
May 1, 2024

# Introduction

The MaterialX Specification and MaterialX Physically Based Shading Nodes documents describe a number of standard pattern and shading nodes that may be used to construct nodegraph-based shaders for physically based rendering in a variety of applications. However, there are certain operations that are desirable in non-photorealistic shading styles but which cannot be implemented within certain rendering constructs. It is also helpful conceptually to separate nodes primarily useful for photorealistic and non-photorealistic shading styles into separate libraries.

This document describes a number of MaterialX nodes primarily applicable to non-photorealistic, or NPR, rendering. Rendering applications whose architecture cannot support these operations are not required to support these nodes.


## Table of Contents

**[MaterialX NPR Library](#materialx-npr-library)**
[NPR Application Nodes](#npr-application-nodes)
[NPR Utility Nodes](#npr-utility-nodes)
[NPR Shading Nodes](#npr-shading-nodes)



## MaterialX NPR Library


## NPR Application Nodes

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

* **`viewdirection`**: the current scene view direction (e.g. from the viewing/camera position to the current shading position). If `viewdirection` is used in a PBR shading context, it should be noted that this would be the same as the incident ray direction for primary ("camera") rays but **not** for secondary/reflection rays. This node must be of type vector3.

* `space` (uniform string): the space in which to return the view vector direction, defaults to "world".

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

* **`lightdirection`**: the predominant incoming light direction, as defined by the shading environment. This node must be of type vector3.

* `space` (uniform string): the space in which to return the lighting vector direction, defaults to "world".


## NPR Utility Nodes

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

* **`facingratio`**: returns the geometric facing ratio, computed as the dot product between the view direction and geometric normal. Output is a float between 0.0 and 1.0.

* `viewdirection` (vector3): the viewing direction, defaults to the value of the "Vworld" (world space view direction) geometric property.
* `normal` (vector3): the surface normal vector, defaults to the value of the "Nworld" (world space view direction) geometric property. This vector is expected to be prenormalized to length 1.0.
* `faceforward` (boolean): description needed; default is false.
* `invert` (boolean): description needed; default is false.



## NPR Shading Nodes

<a id="node-gooch-shade"> </a>

* **`gooch_shade`**: Compute Gooch Shading ([https://en.wikipedia.org/wiki/Gooch_shading](https://en.wikipedia.org/wiki/Gooch_shading) [https://users.cs.northwestern.edu/~ago820/SIG98/gooch98.pdf](https://users.cs.northwestern.edu/~ago820/SIG98/gooch98.pdf)). Output type "surfaceshader".
* `warm_color` (color3): the "warm" color for shading, defaults to (0.8, 0.8, 0.7) in the "lin_rec709" colorspace.
* `cool_color` (color3): the "cool" color for shading, defaults to (0.3, 0.3, 0.8) in the "lin_rec709" colorspace.
* `specular_intensity` (float): the intensity of the specular component. Defaults to 1.0.
* `shininess` (float): the specular power typically ranging from 1 to 256, defaults to 64.
* `light_direction` (vector3): the incoming predominant lighting direction in world space, defaults to (1.0, -0.5, -0.5).
Loading

0 comments on commit 533a053

Please sign in to comment.