Skip to content

Commit e5af8a0

Browse files
Merge branch 'main' into add-hextiling-nodes
Signed-off-by: Jonathan Stone <jstone@lucasfilm.com>
2 parents 2cad2a2 + bf2804d commit e5af8a0

62 files changed

Lines changed: 1084 additions & 606 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/main.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -68,10 +68,10 @@ jobs:
6868
cmake_config: -DMATERIALX_BUILD_SHARED_LIBS=ON
6969
python: 3.9
7070

71-
- name: MacOS_Xcode_14_Python311
71+
- name: MacOS_Xcode_15_Python311
7272
os: macos-14
7373
compiler: xcode
74-
compiler_version: "14.3"
74+
compiler_version: "15.1"
7575
python: 3.11
7676
static_analysis: ON
7777
cmake_config: -DCMAKE_EXPORT_COMPILE_COMMANDS=ON
@@ -389,7 +389,7 @@ jobs:
389389
fail-fast: false
390390
matrix:
391391
python-minor: ['7', '8', '9', '10', '11', '12']
392-
os: ['ubuntu-22.04', 'windows-2022', 'macos-13']
392+
os: ['ubuntu-22.04', 'windows-2022', 'macos-14-large']
393393

394394
steps:
395395
- name: Sync Repository

CHANGELOG.md

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,32 @@
22

33
## [1.39.2] - Development
44

5+
### Added
6+
- Added support for the [Chiang Hair BSDF](https://github.com/AcademySoftwareFoundation/MaterialX/pull/1968), with initial implementations in hardware shading languages and MDL.
7+
- Added support for the [Disney Principled](https://github.com/AcademySoftwareFoundation/MaterialX/pull/2004) shading model, implemented as a language-independent graph.
8+
- Added support for [data library referencing](https://github.com/AcademySoftwareFoundation/MaterialX/pull/2054), enabling improved performance in shader generation.
9+
- Added support for [custom structure types](https://github.com/AcademySoftwareFoundation/MaterialX/pull/1831) in MaterialX.
10+
- Added support for [functional equivalence](https://github.com/AcademySoftwareFoundation/MaterialX/pull/2003) tests between MaterialX elements.
11+
- Added support for [transmission effects](https://github.com/AcademySoftwareFoundation/MaterialX/pull/2027) in the translation graph from Standard Surface to glTF PBR.
12+
- Added support for [coated emission](https://github.com/AcademySoftwareFoundation/MaterialX/pull/2087) in the translation graph from Standard Surface to UsdPreviewSurface.
13+
- Added support for [Apple framework builds](https://github.com/AcademySoftwareFoundation/MaterialX/pull/2020).
14+
- Added support for [MDL 1.9](https://github.com/AcademySoftwareFoundation/MaterialX/pull/2102) in shader generation.
15+
- Added support for [viewdirection space](https://github.com/AcademySoftwareFoundation/MaterialX/pull/2036) in hardware shading languages.
16+
- Added a [combined version define](https://github.com/AcademySoftwareFoundation/MaterialX/pull/2031) to MaterialX C++.
17+
- Added a [release signing workflow](https://github.com/AcademySoftwareFoundation/MaterialX/pull/2009) to GitHub Actions.
18+
- Added documentation for [keyboard shortcuts](https://github.com/AcademySoftwareFoundation/MaterialX/pull/2026) in the MaterialX Viewer.
19+
20+
### Changed
21+
- Reduced duplication between the [MSL and GLSL implementations](https://github.com/AcademySoftwareFoundation/MaterialX/pull/2068) of nodes.
22+
23+
### Fixed
24+
- Fixed [unintentional camera orbiting](https://github.com/AcademySoftwareFoundation/MaterialX/pull/2032) in the render view of the MaterialX Graph Editor.
25+
- Fixed [banding artifacts](https://github.com/AcademySoftwareFoundation/MaterialX/pull/1977) in the MaterialX Viewer on MacOS.
26+
- Fixed a call to the [anisotropic_vdf closure](https://github.com/AcademySoftwareFoundation/MaterialX/pull/2016) in OSL shader generation.
27+
28+
### Removed
29+
- Removed support for the [legacy OSL closures](https://github.com/AcademySoftwareFoundation/MaterialX/pull/2121), focusing exclusively on the MaterialX-synchronized closures in OSL 1.12 and beyond.
30+
531
## [1.39.1] - 2024-09-03
632

733
### Added

CMakeLists.txt

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,6 @@ option(MATERIALX_TEST_RENDER "Run rendering tests for MaterialX Render module. G
5757
option(MATERIALX_WARNINGS_AS_ERRORS "Interpret all compiler warnings as errors." OFF)
5858
option(MATERIALX_COVERAGE_ANALYSIS "Build MaterialX libraries with coverage analysis on supporting platforms." OFF)
5959
option(MATERIALX_DYNAMIC_ANALYSIS "Build MaterialX libraries with dynamic analysis on supporting platforms." OFF)
60-
option(MATERIALX_OSL_LEGACY_CLOSURES "Build OSL shader generation supporting the legacy OSL closures." OFF)
6160

6261
option(MATERIALX_BUILD_IOS "Build MaterialX for iOS. (Deprecated. Set CMAKE_SYSTEM_NAME instead)" OFF)
6362
option(MATERIALX_BUILD_APPLE_FRAMEWORK "Build MaterialX as an Apple Framework" ${__build_apple_framework})
@@ -180,7 +179,6 @@ mark_as_advanced(MATERIALX_PYTHON_EXECUTABLE)
180179
mark_as_advanced(MATERIALX_PYTHON_OCIO_DIR)
181180
mark_as_advanced(MATERIALX_PYTHON_PYBIND11_DIR)
182181
mark_as_advanced(MATERIALX_OIIO_DIR)
183-
mark_as_advanced(MATERIALX_OSL_LEGACY_CLOSURES)
184182
mark_as_advanced(MATERIALX_OSL_BINARY_OSLC)
185183
mark_as_advanced(MATERIALX_OSL_BINARY_TESTRENDER)
186184
mark_as_advanced(MATERIALX_OSL_INCLUDE_PATH)
@@ -227,9 +225,6 @@ if(MATERIALX_BUILD_RENDER AND MATERIALX_BUILD_GEN_OSL AND MATERIALX_BUILD_TESTS)
227225
endif()
228226

229227
# Add global definitions
230-
if (MATERIALX_OSL_LEGACY_CLOSURES)
231-
add_definitions(-DMATERIALX_OSL_LEGACY_CLOSURES)
232-
endif()
233228
if(MATERIALX_BUILD_OIIO)
234229
add_definitions(-DMATERIALX_BUILD_OIIO)
235230
endif()

javascript/MaterialXView/source/viewer.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -90,14 +90,14 @@ export class Scene
9090
}
9191

9292
this.#_rootNode = null;
93-
const model = gltfData.scene;
93+
let model = gltfData.scene;
9494
if (!model)
9595
{
9696
const geometry = new THREE.BoxGeometry(1, 1, 1);
9797
const material = new THREE.MeshBasicMaterial({ color: 0xdddddd });
9898
const cube = new THREE.Mesh(geometry, material);
99-
obj = new Group();
100-
obj.add(geometry);
99+
model = new Group();
100+
model.add(cube);
101101
}
102102
else
103103
{

libraries/CMakeLists.txt

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,9 @@
1-
if (MATERIALX_OSL_LEGACY_CLOSURES)
2-
set(PBRLIB_SUFFIX "legacy")
3-
else()
4-
set(PBRLIB_SUFFIX "mtlx")
5-
endif()
6-
71
if(NOT SKBUILD)
82
install(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/
93
DESTINATION "${MATERIALX_INSTALL_STDLIB_PATH}"
104
PATTERN "CMakeLists.txt" EXCLUDE
115
PATTERN "pbrlib_genosl_impl.*" EXCLUDE)
12-
install(FILES "${CMAKE_CURRENT_SOURCE_DIR}/pbrlib/genosl/pbrlib_genosl_impl.${PBRLIB_SUFFIX}"
6+
install(FILES "${CMAKE_CURRENT_SOURCE_DIR}/pbrlib/genosl/pbrlib_genosl_impl.mtlx"
137
DESTINATION "${MATERIALX_INSTALL_STDLIB_PATH}/pbrlib/genosl/" RENAME pbrlib_genosl_impl.mtlx)
148
endif()
159

@@ -23,6 +17,6 @@ if(MATERIALX_BUILD_PYTHON)
2317
DESTINATION "${MATERIALX_PYTHON_LIBRARIES_PATH}"
2418
PATTERN "CMakeLists.txt" EXCLUDE
2519
PATTERN "pbrlib_genosl_impl.*" EXCLUDE)
26-
install(FILES "${CMAKE_CURRENT_SOURCE_DIR}/pbrlib/genosl/pbrlib_genosl_impl.${PBRLIB_SUFFIX}"
20+
install(FILES "${CMAKE_CURRENT_SOURCE_DIR}/pbrlib/genosl/pbrlib_genosl_impl.mtlx"
2721
DESTINATION "${MATERIALX_PYTHON_LIBRARIES_PATH}/pbrlib/genosl/" RENAME pbrlib_genosl_impl.mtlx)
2822
endif()

libraries/README.md

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,4 @@ This folder contains the standard data libraries for MaterialX, providing declar
7474
- Basic GLSL and MSL `lightshader` node definitions and implementations are provided for the following light types:
7575
- point, directional, spot
7676
- Shader generation does not currently support:
77-
- `ambientocclusion` node.
78-
- `arrayappend` node.
79-
- `curveadjust` node.
8077
- `displacementshader` and `volumeshader` nodes for hardware shading targets (GLSL, MSL).

libraries/bxdf/translation/standard_surface_to_usd.mtlx

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@
1212
<input name="coat" type="float" value="0" />
1313
<input name="coat_color" type="color3" value="1, 1, 1" />
1414
<input name="coat_roughness" type="float" value="0.1" />
15+
<input name="subsurface" type="float" value="0" />
16+
<input name="subsurface_color" type="color3" value="1, 1, 1" />
1517
<input name="emission" type="float" value="0" />
1618
<input name="emission_color" type="color3" value="1, 1, 1" />
1719
<input name="opacity" type="color3" value="1, 1, 1" />
@@ -47,13 +49,18 @@
4749
<input name="in1" type="color3" interfacename="base_color" />
4850
<input name="in2" type="float" interfacename="base" />
4951
</multiply>
52+
<mix name="albedoOpaqueDielectric" type="color3">
53+
<input name="fg" type="color3" interfacename="subsurface_color" />
54+
<input name="bg" type="color3" nodename="scaledBaseColor" />
55+
<input name="mix" type="float" interfacename="subsurface" />
56+
</mix>
5057
<mix name="coatAttenuation" type="color3">
5158
<input name="fg" type="color3" interfacename="coat_color" />
5259
<input name="bg" type="color3" value="1.0, 1.0, 1.0" />
5360
<input name="mix" type="float" interfacename="coat" />
5461
</mix>
5562
<multiply name="diffuseColor" type="color3">
56-
<input name="in1" type="color3" nodename="scaledBaseColor" />
63+
<input name="in1" type="color3" nodename="albedoOpaqueDielectric" />
5764
<input name="in2" type="color3" nodename="coatAttenuation" />
5865
</multiply>
5966
<dot name="roughness" type="float">

libraries/pbrlib/genmdl/pbrlib_genmdl_impl.mtlx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<materialx version="1.39">
33

44
<!-- <oren_nayar_diffuse_bsdf> -->
5-
<implementation name="IM_oren_nayar_diffuse_bsdf_genmdl" nodedef="ND_oren_nayar_diffuse_bsdf" sourcecode="materialx::pbrlib_{{MDL_VERSION_SUFFIX}}::mx_oren_nayar_diffuse_bsdf(mxp_weight:{{weight}}, mxp_color:{{color}}, mxp_roughness:{{roughness}}, mxp_normal:{{normal}})" target="genmdl" />
5+
<implementation name="IM_oren_nayar_diffuse_bsdf_genmdl" nodedef="ND_oren_nayar_diffuse_bsdf" sourcecode="materialx::pbrlib_{{MDL_VERSION_SUFFIX}}::mx_oren_nayar_diffuse_bsdf(mxp_weight:{{weight}}, mxp_color:{{color}}, mxp_roughness:{{roughness}}, mxp_normal:{{normal}}, mxp_energy_compensation:{{energy_compensation}})" target="genmdl" />
66

77
<!-- <burley_diffuse_bsdf> -->
88
<implementation name="IM_burley_diffuse_bsdf_genmdl" nodedef="ND_burley_diffuse_bsdf" sourcecode="materialx::pbrlib_{{MDL_VERSION_SUFFIX}}::mx_burley_diffuse_bsdf(mxp_weight:{{weight}}, mxp_color:{{color}}, mxp_roughness:{{roughness}}, mxp_normal:{{normal}})" target="genmdl" />
@@ -11,13 +11,13 @@
1111
<implementation name="IM_translucent_bsdf_genmdl" nodedef="ND_translucent_bsdf" sourcecode="materialx::pbrlib_{{MDL_VERSION_SUFFIX}}::mx_translucent_bsdf(mxp_weight:{{weight}}, mxp_color:{{color}}, mxp_normal:{{normal}})" target="genmdl" />
1212

1313
<!-- <dielectric_bsdf> -->
14-
<implementation name="IM_dielectric_bsdf_genmdl" nodedef="ND_dielectric_bsdf" sourcecode="materialx::pbrlib_{{MDL_VERSION_SUFFIX}}::mx_dielectric_bsdf(mxp_weight:{{weight}}, mxp_tint:{{tint}}, mxp_ior:{{ior}}, mxp_roughness:{{roughness}}, mxp_thinfilm_thickness:{{thinfilm_thickness}}, mxp_thinfilm_ior:{{thinfilm_ior}}, mxp_normal:{{normal}}, mxp_tangent:{{tangent}}, mxp_distribution:{{distribution}}, mxp_scatter_mode:{{scatter_mode}}, mxp_base:{{base}})" target="genmdl" />
14+
<implementation name="IM_dielectric_bsdf_genmdl" nodedef="ND_dielectric_bsdf" sourcecode="materialx::pbrlib_{{MDL_VERSION_SUFFIX}}::mx_dielectric_bsdf(mxp_weight:{{weight}}, mxp_tint:{{tint}}, mxp_ior:{{ior}}, mxp_roughness:{{roughness}}, mxp_thinfilm_thickness:{{thinfilm_thickness}}, mxp_thinfilm_ior:{{thinfilm_ior}}, mxp_normal:{{normal}}, mxp_tangent:{{tangent}}, mxp_distribution:{{distribution}}, mxp_scatter_mode:{{scatter_mode}}, mxp_base:{{base}}, mxp_top_weight:{{top_weight}})" target="genmdl" />
1515

1616
<!-- <conductor_bsdf> -->
1717
<implementation name="IM_conductor_bsdf_genmdl" nodedef="ND_conductor_bsdf" sourcecode="materialx::pbrlib_{{MDL_VERSION_SUFFIX}}::mx_conductor_bsdf(mxp_weight:{{weight}}, mxp_ior:{{ior}}, mxp_extinction:{{extinction}}, mxp_roughness:{{roughness}}, mxp_thinfilm_thickness:{{thinfilm_thickness}}, mxp_thinfilm_ior:{{thinfilm_ior}}, mxp_normal:{{normal}}, mxp_tangent:{{tangent}}, mxp_distribution:{{distribution}})" target="genmdl" />
1818

1919
<!-- <generalized_schlick_bsdf> -->
20-
<implementation name="IM_generalized_schlick_bsdf_genmdl" nodedef="ND_generalized_schlick_bsdf" sourcecode="materialx::pbrlib_{{MDL_VERSION_SUFFIX}}::mx_generalized_schlick_bsdf(mxp_weight:{{weight}}, mxp_color0:{{color0}}, mxp_color90:{{color90}}, mxp_exponent:{{exponent}},mxp_roughness:{{roughness}}, mxp_thinfilm_thickness:{{thinfilm_thickness}}, mxp_thinfilm_ior:{{thinfilm_ior}}, mxp_normal:{{normal}}, mxp_tangent:{{tangent}}, mxp_distribution:{{distribution}}, mxp_scatter_mode:{{scatter_mode}}, mxp_base:{{base}})" target="genmdl" />
20+
<implementation name="IM_generalized_schlick_bsdf_genmdl" nodedef="ND_generalized_schlick_bsdf" sourcecode="materialx::pbrlib_{{MDL_VERSION_SUFFIX}}::mx_generalized_schlick_bsdf(mxp_weight:{{weight}}, mxp_color0:{{color0}}, mxp_color82:{{color82}}, mxp_color90:{{color90}}, mxp_exponent:{{exponent}},mxp_roughness:{{roughness}}, mxp_thinfilm_thickness:{{thinfilm_thickness}}, mxp_thinfilm_ior:{{thinfilm_ior}}, mxp_normal:{{normal}}, mxp_tangent:{{tangent}}, mxp_distribution:{{distribution}}, mxp_scatter_mode:{{scatter_mode}}, mxp_base:{{base}}, mxp_top_weight:{{top_weight}})" target="genmdl" />
2121

2222
<!-- <subsurface_bsdf> -->
2323
<implementation name="IM_subsurface_bsdf_genmdl" nodedef="ND_subsurface_bsdf" sourcecode="materialx::pbrlib_{{MDL_VERSION_SUFFIX}}::mx_subsurface_bsdf(mxp_weight:{{weight}}, mxp_color:{{color}}, mxp_radius:{{radius}}, mxp_anisotropy:{{anisotropy}}, mxp_normal:{{normal}})" target="genmdl" />

libraries/pbrlib/genosl/legacy/mx_anisotropic_vdf.osl

Lines changed: 0 additions & 5 deletions
This file was deleted.

libraries/pbrlib/genosl/legacy/mx_burley_diffuse_bsdf.osl

Lines changed: 0 additions & 6 deletions
This file was deleted.

0 commit comments

Comments
 (0)