Skip to content

Commit

Permalink
Merge pull request #1397 from autodesk-forks/adsk_v1388_main_sync
Browse files Browse the repository at this point in the history
Merge ASWF upstream `main` @ 1.38.8 to adsk_contrib/dev
  • Loading branch information
nicolassavva-autodesk authored Sep 13, 2023
2 parents f6fdb68 + f3bc2cd commit cf3306e
Show file tree
Hide file tree
Showing 317 changed files with 18,742 additions and 10,523 deletions.
147 changes: 119 additions & 28 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,11 @@ jobs:
python: 3.9
build_javascript: ON

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

- name: Linux_Clang_10_Python37
Expand All @@ -47,20 +47,20 @@ jobs:
cmake_config: -DMATERIALX_BUILD_SHARED_LIBS=ON
static_analysis: ON

- name: Linux_Clang_13_Python39
- name: Linux_Clang_14_Python311
os: ubuntu-22.04
compiler: clang
compiler_version: "13"
python: 3.9
compiler_version: "14"
python: 3.11
test_render: ON
clang_format: ON

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

- name: MacOS_Xcode_11_Python37
Expand All @@ -76,30 +76,37 @@ jobs:
compiler_version: "13.4"
python: 3.9

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

- name: Windows_VS2019_Win32_Python27
- name: iOS_Xcode_15
os: macos-13
compiler: xcode
compiler_version: "15.0"
python: None
cmake_config: -DMATERIALX_BUILD_IOS=ON -DCMAKE_OSX_SYSROOT=`xcrun --sdk iphoneos --show-sdk-path` -DCMAKE_OSX_ARCHITECTURES=arm64

- name: Windows_VS2019_Win32_Python37
os: windows-2019
architecture: x86
python: 2.7
python: 3.7
cmake_config: -G "Visual Studio 16 2019" -A "Win32" -DMATERIALX_BUILD_SHARED_LIBS=ON

- name: Windows_VS2019_x64_Python38
os: windows-2019
architecture: x64
python: 3.8
cmake_config: -G "Visual Studio 16 2019" -A "x64"

- name: Windows_VS2022_x64_Python39
os: windows-2022
architecture: x64
python: 3.9
cmake_config: -G "Visual Studio 17 2022" -A "x64"

- name: Windows_VS2022_x64_Python311
os: windows-2022
architecture: x64
python: 3.11
cmake_config: -G "Visual Studio 17 2022" -A "x64"
test_shaders: ON

steps:
Expand Down Expand Up @@ -147,16 +154,12 @@ 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 }}
architecture: ${{ matrix.architecture }}

- name: Install OpenImageIO
if: matrix.install_oiio == 'ON' && runner.os == 'Windows'
run: |
vcpkg/vcpkg install openimageio --triplet=x64-windows
- name: Install Emscripten
if: matrix.build_javascript == 'ON'
run: |
Expand Down Expand Up @@ -192,11 +195,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 +252,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 Expand Up @@ -318,3 +321,91 @@ jobs:
name: MaterialX_JavaScript
path: javascript/build/installed/JavaScript/MaterialX
if-no-files-found: ignore

sdist:
name: Python SDist
runs-on: ubuntu-latest
if: github.repository == 'AcademySoftwareFoundation/MaterialX'
outputs:
sdist_filename: ${{ steps.generate.outputs.filename }}

steps:
- name: Sync Repository
uses: actions/checkout@v3

- name: Install Python
uses: actions/setup-python@v4
with:
python-version: 3.11

- name: Build SDist
id: generate
run: |
python -m pip install build
python -m build -s . --outdir dist
echo "filename=$(ls dist)" >> "$GITHUB_OUTPUT"
- name: Upload SDist
uses: actions/upload-artifact@v3
with:
name: MaterialX_Python_SDist
path: dist/*.tar.gz

wheels:
name: Python Wheels
runs-on: ${{ matrix.os }}
needs: ['sdist']
if: github.repository == 'AcademySoftwareFoundation/MaterialX'
strategy:
fail-fast: false
matrix:
python-minor: ['7', '8', '9', '10', '11']
os: ['ubuntu-latest', 'macos-latest', 'windows-latest']

steps:
- name: Sync Repository
uses: actions/checkout@v3

- name: Install Python 3.${{ matrix.python-minor }}
uses: actions/setup-python@v4
with:
python-version: 3.${{ matrix.python-minor }}

- name: Download Sdist
uses: actions/download-artifact@v3
with:
name: MaterialX_Python_SDist
path: sdist

- name: Build Wheel
uses: pypa/[email protected]
with:
package-dir: ${{ github.workspace }}/sdist/${{ needs.sdist.outputs.sdist_filename }}
env:
CIBW_BUILD: 'cp3${{ matrix.python-minor }}-*'
CIBW_SKIP: '*musllinux*'
CIBW_ARCHS: 'auto64'
# https://github.com/pypa/manylinux
# 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
MACOSX_DEPLOYMENT_TARGET: '10.15'

- name: Install Wheel
run: python -m pip install MaterialX --find-links wheelhouse --no-index

- name: Python Tests
run: |
python MaterialXTest/main.py
python MaterialXTest/genshader.py
working-directory: python

- name: Upload Wheel
uses: actions/upload-artifact@v3
with:
name: MaterialX_Python_Wheels
path: wheelhouse/*.whl
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
build
dist
36 changes: 36 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,41 @@
# Change Log

## [1.38.8] - 2023-09-08

### Added
- Added a broad set of new pattern nodes to MaterialX, including [Circle, Hexagon, Cloverleaf, Line, Grid, Crosshatch](https://github.com/AcademySoftwareFoundation/MaterialX/pull/1411), [Checkerboard](https://github.com/AcademySoftwareFoundation/MaterialX/pull/1328), [Random Color, Random Float](https://github.com/AcademySoftwareFoundation/MaterialX/pull/1330), [Triangle Wave](https://github.com/AcademySoftwareFoundation/MaterialX/pull/1334), [Integer Floor, Integer Ceiling](https://github.com/AcademySoftwareFoundation/MaterialX/pull/1362), and [Distance](https://github.com/AcademySoftwareFoundation/MaterialX/pull/1333).
- Added support for [MaterialX builds on iOS](https://github.com/AcademySoftwareFoundation/MaterialX/pull/1435).
- Added support for [drag-and-drop import](https://github.com/AcademySoftwareFoundation/MaterialX/pull/1482) of MaterialX files in the [Web Viewer](https://academysoftwarefoundation.github.io/MaterialX/).
- Added generation of [MaterialX Python wheels](https://github.com/AcademySoftwareFoundation/MaterialX/pull/1317) in GitHub Actions, enabling the distribution of MaterialX Python packages through PyPI.
- Added support for the [lin_displayp3 and srgb_displayp3](https://github.com/AcademySoftwareFoundation/MaterialX/pull/1368) colorspaces in shader generation.
- Added support for the [blackbody PBR node](https://github.com/AcademySoftwareFoundation/MaterialX/pull/1367) in shader generation.
- Added support for [displacement](https://github.com/AcademySoftwareFoundation/MaterialX/pull/1396) in MDL generation.
- Added [blend](https://github.com/AcademySoftwareFoundation/MaterialX/pull/1350) and [up-axis](https://github.com/AcademySoftwareFoundation/MaterialX/pull/1489) controls to the triplanar projection node.
- Added version details to [shared libraries](https://github.com/AcademySoftwareFoundation/MaterialX/pull/1447) on Windows.
- Added a [MacOS 13](https://github.com/AcademySoftwareFoundation/MaterialX/pull/1375) build to GitHub Actions.

### Changed
- Raised the minimum C++ version for MaterialX builds to [C++14](https://github.com/AcademySoftwareFoundation/MaterialX/pull/1340).
- Upgraded the [PyBind11 library](https://github.com/AcademySoftwareFoundation/MaterialX/pull/1343) to version 2.10.4, raising the minimum Python version to 3.6, and enabling support for Python versions 3.11 and beyond.
- Improved the performance and convergence of [GGX importance sampling](https://github.com/AcademySoftwareFoundation/MaterialX/pull/1390) in GLSL generation, leveraging insights from the HPG 2023 paper by Jonathan Dupuy and Anis Benyoub.
- Improved [property panel display](https://github.com/AcademySoftwareFoundation/MaterialX/pull/1346) in the MaterialX Graph Editor.
- Improved [node spacing](https://github.com/AcademySoftwareFoundation/MaterialX/pull/1476) in the MaterialX Graph Editor.
- Improved the robustness of [MaterialX unit tests](https://github.com/AcademySoftwareFoundation/MaterialX/pull/1370) with respect to the current working directory.
- Simplified the handling of [default colors](https://github.com/AcademySoftwareFoundation/MaterialX/pull/1452) in GLSL generation, removing dynamic branches on texture size.
- Simplified the definitions of the [default color transforms](https://github.com/AcademySoftwareFoundation/MaterialX/pull/1352), implementing them as language-independent MaterialX graphs.
- Simplified the interface of [ShaderGenerator::emitFunctionCall](https://github.com/AcademySoftwareFoundation/MaterialX/pull/1344), marking its original interface as deprecated.
- Marked legacy interfaces for [findRenderableElements and findRenderableMaterialNodes](https://github.com/AcademySoftwareFoundation/MaterialX/pull/1340) as deprecated, making their usage visible to clients as compiler warnings.
- Moved the MaterialX specification to [public Markdown files in GitHub](https://github.com/AcademySoftwareFoundation/MaterialX/tree/main/documents/Specification), enabling direct contributions from the community.

### Fixed
- Fixed brightness artifacts in the [triplanar projection node](https://github.com/AcademySoftwareFoundation/MaterialX/pull/1350).
- Aligned default values for [conductor_bsdf](https://github.com/AcademySoftwareFoundation/MaterialX/pull/1379) with the MaterialX specification.
- Fixed [volume mixing](https://github.com/AcademySoftwareFoundation/MaterialX/pull/1395) in MDL generation.
- Fixed a bug to improve [shader generation determinism](https://github.com/AcademySoftwareFoundation/MaterialX/pull/1376).
- Fixed a bug to improve the [consistency of auto layout](https://github.com/AcademySoftwareFoundation/MaterialX/pull/1389) in the MaterialX Graph Editor.
- Fixed a bug to enable [multi-output connection edits](https://github.com/AcademySoftwareFoundation/MaterialX/pull/1506) in the MaterialX Graph Editor.
- Fixed a bug in [dot node optimizations](https://github.com/AcademySoftwareFoundation/MaterialX/pull/1522) for shader generation.

## [1.38.7] - 2023-04-21

### Added
Expand Down
Loading

0 comments on commit cf3306e

Please sign in to comment.