Skip to content

Commit

Permalink
Merge branch 'main' into adsk/bugfix/module_path_fix_python_3_8
Browse files Browse the repository at this point in the history
  • Loading branch information
jstone-lucasfilm committed Jul 1, 2024
2 parents b242d6b + 57163b5 commit 7b4ca3f
Show file tree
Hide file tree
Showing 309 changed files with 5,693 additions and 4,931 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,10 @@ jobs:
python: 3.11
build_javascript: ON

- name: Linux_GCC_13_Python312
- name: Linux_GCC_14_Python312
os: ubuntu-24.04
compiler: gcc
compiler_version: "13"
compiler_version: "14"
python: 3.12
static_analysis: ON
cmake_config: -DCMAKE_EXPORT_COMPILE_COMMANDS=ON
Expand Down Expand Up @@ -383,7 +383,7 @@ jobs:
fail-fast: false
matrix:
python-minor: ['7', '8', '9', '10', '11', '12']
os: ['ubuntu-latest', 'windows-latest', 'macos-13']
os: ['ubuntu-latest', 'windows-2022', 'macos-13']

steps:
- name: Sync Repository
Expand Down
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
- Added support for [Python 3.12](https://github.com/AcademySoftwareFoundation/MaterialX/pull/1802) in Python wheel generation.
- Added support for the [full set of shader generators](https://github.com/AcademySoftwareFoundation/MaterialX/pull/1771) in JavaScript.
- Added an example script to [generate a MaterialX document](https://github.com/AcademySoftwareFoundation/MaterialX/pull/1746) from a folder of textures.
- Added support for [frame timing](https://github.com/AcademySoftwareFoundation/MaterialX/pull/1739) in the MaterialX Viewer.
- Added unit tests for [core utilities](https://github.com/AcademySoftwareFoundation/MaterialX/pull/1768) and [ESSL shader generation](https://github.com/AcademySoftwareFoundation/MaterialX/pull/1781).

### Changed
Expand All @@ -20,6 +21,7 @@
- Extended the [switch node](https://github.com/AcademySoftwareFoundation/MaterialX/pull/1660) to ten inputs in MaterialX 1.39, with automatic upgrade logic for legacy documents.
- Renamed the inputs of the [atan2 node](https://github.com/AcademySoftwareFoundation/MaterialX/pull/1659) in MaterialX 1.39, with automatic upgrade logic for legacy documents.
- Renamed the [normalmap nodedef](https://github.com/AcademySoftwareFoundation/MaterialX/pull/1677) in MaterialX 1.39, with automatic upgrade logic for legacy documents.
- Optimized [Fresnel](https://github.com/AcademySoftwareFoundation/MaterialX/pull/1732) [computations](https://github.com/AcademySoftwareFoundation/MaterialX/pull/1733) in [GLSL](https://github.com/AcademySoftwareFoundation/MaterialX/pull/1736), improving the performance of physically based shading in real-time renders.
- Applied [lossless optimization](https://github.com/AcademySoftwareFoundation/MaterialX/pull/1738) to PNG and JPG textures in the MaterialX repository.

### Removed
Expand Down
18 changes: 14 additions & 4 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ option(MATERIALX_BUILD_BENCHMARK_TESTS "Build benchmark tests." OFF)

option(MATERIALX_BUILD_SHARED_LIBS "Build MaterialX libraries as shared rather than static." OFF)
option(MATERIALX_BUILD_MONOLITHIC "Build a single monolithic MaterialX library." OFF)
option(MATERIALX_BUILD_USE_CCACHE "Enable the use of ccache to speed up build time, if present." ON)
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)
Expand Down Expand Up @@ -137,6 +138,7 @@ mark_as_advanced(MATERIALX_BUILD_OIIO)
mark_as_advanced(MATERIALX_BUILD_BENCHMARK_TESTS)
mark_as_advanced(MATERIALX_BUILD_SHARED_LIBS)
mark_as_advanced(MATERIALX_BUILD_MONOLITHIC)
mark_as_advanced(MATERIALX_BUILD_USE_CCACHE)
mark_as_advanced(MATERIALX_NAMESPACE_SUFFIX)
mark_as_advanced(MATERIALX_LIBNAME_SUFFIX)
mark_as_advanced(MATERIALX_PYTHON_LTO)
Expand Down Expand Up @@ -169,6 +171,15 @@ if (MATERIALX_BUILD_GEN_MDL)
mark_as_advanced(MATERIALX_INSTALL_MDL_MODULE_PATH)
endif()

if (MATERIALX_BUILD_USE_CCACHE)
# Setup CCache for C/C++ compilation
find_program(CCACHE_PROGRAM ccache)
if(CCACHE_PROGRAM)
set(CMAKE_C_COMPILER_LAUNCHER "${CCACHE_PROGRAM}")
set(CMAKE_CXX_COMPILER_LAUNCHER "${CCACHE_PROGRAM}")
endif()
endif()

# Add global definitions
add_definitions(-DMATERIALX_OSL_BINARY_OSLC=\"${MATERIALX_OSL_BINARY_OSLC}\")
add_definitions(-DMATERIALX_OSL_BINARY_TESTRENDER=\"${MATERIALX_OSL_BINARY_TESTRENDER}\")
Expand Down Expand Up @@ -225,6 +236,9 @@ endif()
# Adjust compiler settings
if(MSVC)
add_compile_options(/MP)
if(MATERIALX_BUILD_MONOLITHIC)
add_compile_options(/bigobj)
endif()
if(CMAKE_CXX_FLAGS MATCHES "/W[0-4]")
string(REGEX REPLACE "/W[0-4]" "/W4" CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}")
else()
Expand Down Expand Up @@ -331,10 +345,6 @@ function(mx_add_library MATERIALX_MODULE_NAME)
set_property(GLOBAL APPEND PROPERTY MATERIALX_MODULES ${MATERIALX_MODULE_NAME})
endif()

target_include_directories(${TARGET_NAME} PUBLIC
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/../>
$<INSTALL_INTERFACE:${CMAKE_INSTALL_PREFIX}>)

target_compile_definitions(${TARGET_NAME} PRIVATE "-D${args_EXPORT_DEFINE}")

if(NOT SKBUILD)
Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,11 @@ MaterialX is an open standard for representing rich material and look-developmen

### Supported Platforms

The MaterialX codebase requires a compiler with support for C++14, and can be built with any of the following:
The MaterialX codebase requires a compiler with support for C++17, and can be built with any of the following:

- Microsoft Visual Studio 2017 or newer
- GCC 6 or newer
- Clang 6 or newer
- GCC 8 or newer
- Clang 5 or newer

The Python bindings for MaterialX are based on [PyBind11](https://github.com/pybind/pybind11), and support Python versions 3.6 and greater.

Expand Down
6 changes: 3 additions & 3 deletions documents/DeveloperGuide/MainPage.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,11 @@ MaterialX is an open standard for representing rich material and look-developmen

### Supported Platforms

The MaterialX codebase requires a compiler with support for C++14, and can be built with any of the following:
The MaterialX codebase requires a compiler with support for C++17, and can be built with any of the following:

- Microsoft Visual Studio 2017 or newer
- GCC 6 or newer
- Clang 6 or newer
- GCC 8 or newer
- Clang 5 or newer

The Python bindings for MaterialX are based on [PyBind11](https://github.com/pybind/pybind11), and support Python versions 3.6 and greater.

Expand Down
30 changes: 16 additions & 14 deletions documents/Specification/MaterialX.NPRSpec.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@ 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
**Version 1.39**
Doug Smythe - Industrial Light & Magic
Jonathan Stone - Lucasfilm Advanced Development Group
July 1, 2024

# Introduction

Expand All @@ -24,9 +24,10 @@ This document describes a number of MaterialX nodes primarily applicable to non-
[NPR Utility Nodes](#npr-utility-nodes)
[NPR Shading Nodes](#npr-shading-nodes)

**[References](#references)**


## MaterialX NPR Library
# MaterialX NPR Library


## NPR Application Nodes
Expand All @@ -35,13 +36,8 @@ This document describes a number of MaterialX nodes primarily applicable to non-

* **`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".
* `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
Expand All @@ -61,9 +57,15 @@ This document describes a number of MaterialX nodes primarily applicable to non-

<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.
* **`gooch_shade`**: Computes the single-pass shading portion of the Gooch[^Gooch1998] lighting model. 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).



# References

[^Gooch1998]: Gooch et al., **A Non-Photorealistic Lighting Model For Automatic Technical Illustration**, <https://users.cs.northwestern.edu/~ago820/SIG98/gooch98.pdf>, 1998.
Loading

0 comments on commit 7b4ca3f

Please sign in to comment.