Skip to content

Commit

Permalink
Merge branch 'main' into gamaj/add_ui_names
Browse files Browse the repository at this point in the history
  • Loading branch information
jstone-lucasfilm authored Sep 6, 2024
2 parents 816bb3e + 81e3e24 commit f528f94
Show file tree
Hide file tree
Showing 56 changed files with 538 additions and 283 deletions.
7 changes: 7 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,13 @@ jobs:
python: 3.11
build_javascript: ON

- name: Linux_GCC_12_Python311_Static_Monolithic
os: ubuntu-22.04
compiler: gcc
compiler_version: "12"
python: 3.11
cmake_config: -DMATERIALX_BUILD_SHARED_LIBS=ON -DMATERIALX_BUILD_MONOLITHIC=ON

- name: Linux_GCC_14_Python312
os: ubuntu-24.04
compiler: gcc
Expand Down
25 changes: 24 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,29 @@
# Change Log

## [1.39.1] - Development
## [1.39.2] - Development

## [1.39.1] - 2024-09-03

### Added
- Added initial shader translation graphs between [Standard Surface](https://github.com/AcademySoftwareFoundation/MaterialX/pull/1934) and [OpenPBR Surface](https://github.com/AcademySoftwareFoundation/MaterialX/pull/1949).
- Added initial support for [code generation hints](https://github.com/AcademySoftwareFoundation/MaterialX/pull/1954).

### Changed
- Raised the minimum CMake version to [CMake 3.24](https://github.com/AcademySoftwareFoundation/MaterialX/pull/1929).
- Moved feature proposals from the main specification to a new [MaterialX Proposals](https://github.com/AcademySoftwareFoundation/MaterialX/pull/1953) document.
- Updated the open definitions of the [MaterialX Lama nodes](https://github.com/AcademySoftwareFoundation/MaterialX/pull/1955) to improve alignment with RenderMan.

### Fixed
- Fixed errors in the [installation steps](https://github.com/AcademySoftwareFoundation/MaterialX/pull/1923) for CMake builds.
- Fixed the computation of [Fresnel transmission](https://github.com/AcademySoftwareFoundation/MaterialX/pull/1962) in GLSL.
- Fixed an implementation of the [combine2 node](https://github.com/AcademySoftwareFoundation/MaterialX/pull/1975) in MDL.
- Fixed transposed matrices in color transforms for the [displayp3 space](https://github.com/AcademySoftwareFoundation/MaterialX/pull/1960).
- Fixed edge cases in the version upgrade process for [swizzle](https://github.com/AcademySoftwareFoundation/MaterialX/pull/1945) [nodes](https://github.com/AcademySoftwareFoundation/MaterialX/pull/1957).
- Fixed a crash in the Graph Editor when [renaming a node graph](https://github.com/AcademySoftwareFoundation/MaterialX/pull/1930).
- Fixed the exporting of [PugiXML symbols](https://github.com/AcademySoftwareFoundation/MaterialX/pull/1944) in MaterialXFormat.

### Removed
- Removed an extra installation of the [resources folder](https://github.com/AcademySoftwareFoundation/MaterialX/pull/1927) in MaterialXGenShader.

## [1.39.0] - 2024-07-05

Expand Down
13 changes: 5 additions & 8 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 39)
set(MATERIALX_BUILD_VERSION 1)
set(MATERIALX_BUILD_VERSION 2)
set(MATERIALX_LIBRARY_VERSION ${MATERIALX_MAJOR_VERSION}.${MATERIALX_MINOR_VERSION}.${MATERIALX_BUILD_VERSION})

# Cmake setup
Expand Down Expand Up @@ -193,6 +193,8 @@ if(MATERIALX_BUILD_RENDER AND MATERIALX_BUILD_GEN_OSL AND MATERIALX_BUILD_TESTS)
# currently OSL does not export a cmake target for testrender, but once that's added this can be simplified.
set(MATERIALX_OSL_BINARY_TESTRENDER $<TARGET_FILE_DIR:OSL::oslc>/testrender)
endif()
# NOTE : we do not derive a value for MATERIALX_OSL_INCLUDE_PATH here, as a a cmake installed OSL package
# should have the shader includes in the expected location.
endif()
endif()

Expand Down Expand Up @@ -300,8 +302,7 @@ function(mx_add_library MATERIALX_MODULE_NAME)
SOURCE_FILES
HEADER_FILES
INLINED_FILES
LIBRARIES
PRIVATE_LIBRARIES)
MTLX_MODULES)
cmake_parse_arguments(args
"${options}"
"${oneValueArgs}"
Expand Down Expand Up @@ -331,13 +332,9 @@ function(mx_add_library MATERIALX_MODULE_NAME)

target_link_libraries(${TARGET_NAME}
PUBLIC
${args_LIBRARIES}
${args_MTLX_MODULES}
${CMAKE_DL_LIBS})

target_link_libraries(${TARGET_NAME}
PRIVATE
${args_PRIVATE_LIBRARIES})

target_include_directories(${TARGET_NAME}
PUBLIC
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/../>
Expand Down
4 changes: 2 additions & 2 deletions GOVERNANCE.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,9 +64,9 @@ The current Stakeholders of the MaterialX TSC are:

- Henrik Edstrom - Autodesk
- Fran González García - Pixar RenderMan
- Dhruv Govil - Apple
- Rafal Jaroszkiewicz - SideFX
- Ole Gulbrandsen - Sony Pictures Imageworks
- Rafal Jaroszkiewicz - SideFX
- Lee Kerley - Apple
- Lutz Kettner - NVIDIA
- Chris Kulla - Epic Games
- Bernard Kwok - Khronos Group
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -69,4 +69,4 @@ The following packages contain pre-built binaries for the latest release, includ
- The [Developer Guide](http://www.materialx.org/docs/api/index.html) contains a developer-oriented overview of MaterialX with API documentation.
- The [Python Scripts](python/Scripts) folder contains standalone examples of MaterialX Python code.
- The [JavaScript](javascript) folder contains details on building JavaScript bindings for MaterialX.
- Presentations at [ASWF Open Source Days](https://materialx.org/assets/ASWF_OSD2023_MaterialX_Final.pdf) and the [SIGGRAPH Physically Based Shading Course](https://blog.selfshadow.com/publications/s2020-shading-course/#materialx) provide details on the roadmap for MaterialX development.
- Presentations at [ASWF Open Source Days](https://materialx.org/assets/ASWF_OSD2024_MaterialX_Final.pdf) and the [SIGGRAPH Physically Based Shading Course](https://blog.selfshadow.com/publications/s2020-shading-course/#materialx) provide details on the roadmap for MaterialX development.
2 changes: 1 addition & 1 deletion documents/Specification/MaterialX.Specification.md
Original file line number Diff line number Diff line change
Expand Up @@ -1124,7 +1124,7 @@ Application nodes are used to reference application-defined properties within a

```xml
<frame name="f1" type="float"/>
<updirection name="updir1" type="vector3"/>
<time name="t1" type="float"/>
```

Standard Application nodes:
Expand Down
4 changes: 3 additions & 1 deletion libraries/bxdf/translation/open_pbr_to_standard_surface.mtlx
Original file line number Diff line number Diff line change
Expand Up @@ -198,6 +198,7 @@
<dot name="specColor" type="color3">
<input name="in" type="color3" interfacename="specular_color" />
</dot>
<!--Allows override of specular_roughness by coat_roughness for materials with coat, but not for simpler materials that don't leverage coat at all.-->
<mix name="specRoughness" type="float">
<input name="fg" type="float" interfacename="coat_roughness" />
<input name="bg" type="float" interfacename="specular_roughness" />
Expand All @@ -206,7 +207,7 @@
<dot name="specIOR" type="float">
<input name="in" type="float" interfacename="specular_ior" />
</dot>
<!-- logic for anisotropic specular is noticeably different between Standard Surface and OpenPBR, so the translation between these concepts will take more thought-->
<!--The logic for anisotropic specular is noticeably different between Standard Surface and OpenPBR, so the translation between these concepts will take more thought.-->
<dot name="specAnisotropy" type="float">
<input name="in" type="float" interfacename="specular_roughness_anisotropy" />
</dot>
Expand Down Expand Up @@ -256,6 +257,7 @@
<dot name="sheenColor" type="color3">
<input name="in" type="color3" interfacename="fuzz_color" />
</dot>
<!--Sheen roughness translation is approximated by eye, and could potentially be improved with an analytic or ML-based solution.-->
<power name="sheenRoughness" type="float">
<input name="in1" type="float" interfacename="fuzz_roughness" />
<input name="in2" type="float" value="2.5" />
Expand Down
5 changes: 4 additions & 1 deletion libraries/bxdf/translation/standard_surface_to_open_pbr.mtlx
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,7 @@
</dot>

<!--Specular-->
<!--In OpenPBR Surface, specular_weight controls the strength of the metallic layer, while it Standard Surface it has no effect on the metallic layer.-->
<ifgreater name="specWeight" type="float">
<input name="value1" type="float" interfacename="metalness" />
<input name="value2" type="float" value="0.0" />
Expand All @@ -129,7 +130,7 @@
<input name="in1" type="vector3" nodename="specVector" />
<input name="in2" type="vector3" value="1.0, 1.0, 1.0" />
</dotproduct>
<!--intentionally ignoring the original specular_color input for metals, since the translation between these concepts will take more thought-->
<!--Intentionally ignoring the original specular_color input for metals, since the translation between these concepts will take more thought.-->
<ifequal name="specColor" type="color3">
<input name="value1" type="float" value="0.0" />
<input name="value2" type="float" nodename="dotProd" />
Expand Down Expand Up @@ -190,12 +191,14 @@
<dot name="fuzzColor" type="color3">
<input name="in" type="color3" interfacename="sheen_color" />
</dot>
<!--Fuzz roughness translation is approximated by eye, and could potentially be improved with an analytic or ML-based solution.-->
<power name="fuzzRoughness" type="float">
<input name="in1" type="float" interfacename="sheen_roughness" />
<input name="in2" type="float" value="0.4" />
</power>

<!--Coat-->
<!--Standard Surface takes the approach of tinting the surface underneath by the color of this clearcoat, and that technique is how artists often create colored metals in Standard Surface. If this approach was taken, then coat_weight is set to 0 so that the color is not added redundantly.-->
<multiply name="coatMetallic" type="float">
<input name="in1" type="float" interfacename="coat" />
<input name="in2" type="float" interfacename="metalness" />
Expand Down
2 changes: 1 addition & 1 deletion libraries/pbrlib/genglsl/lib/mx_microfacet_sheen.glsl
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#include "mx_microfacet.glsl"

// http://www.aconty.com/pdf/s2017_pbs_imageworks_sheen.pdf
// https://fpsunflower.github.io/ckulla/data/s2017_pbs_imageworks_sheen.pdf
// Equation 2
float mx_imageworks_sheen_NDF(float NdotH, float roughness)
{
Expand Down
6 changes: 3 additions & 3 deletions libraries/stdlib/genglsl/mx_smoothstep_float.glsl
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
void mx_smoothstep_float(float val, float low, float high, out float result)
{
if (val <= low)
result = 0.0;
else if (val >= high)
if (val >= high)
result = 1.0;
else if (val <= low)
result = 0.0;
else
result = smoothstep(low, high, val);
}
7 changes: 0 additions & 7 deletions libraries/stdlib/genglsl/mx_smoothstep_vector2.glsl

This file was deleted.

8 changes: 0 additions & 8 deletions libraries/stdlib/genglsl/mx_smoothstep_vector3.glsl

This file was deleted.

9 changes: 0 additions & 9 deletions libraries/stdlib/genglsl/mx_smoothstep_vector4.glsl

This file was deleted.

3 changes: 0 additions & 3 deletions libraries/stdlib/genglsl/stdlib_genglsl_impl.mtlx
Original file line number Diff line number Diff line change
Expand Up @@ -488,9 +488,6 @@

<!-- <smoothstep> -->
<implementation name="IM_smoothstep_float_genglsl" nodedef="ND_smoothstep_float" file="mx_smoothstep_float.glsl" function="mx_smoothstep_float" target="genglsl" />
<implementation name="IM_smoothstep_vector2_genglsl" nodedef="ND_smoothstep_vector2" file="mx_smoothstep_vector2.glsl" function="mx_smoothstep_vector2" target="genglsl" />
<implementation name="IM_smoothstep_vector3_genglsl" nodedef="ND_smoothstep_vector3" file="mx_smoothstep_vector3.glsl" function="mx_smoothstep_vector3" target="genglsl" />
<implementation name="IM_smoothstep_vector4_genglsl" nodedef="ND_smoothstep_vector4" file="mx_smoothstep_vector4.glsl" function="mx_smoothstep_vector4" target="genglsl" />

<!-- <luminance> -->
<implementation name="IM_luminance_color3_genglsl" nodedef="ND_luminance_color3" file="mx_luminance_color3.glsl" function="mx_luminance_color3" target="genglsl" />
Expand Down
2 changes: 1 addition & 1 deletion libraries/stdlib/genmdl/stdlib_genmdl_impl.mtlx
Original file line number Diff line number Diff line change
Expand Up @@ -686,7 +686,7 @@

<!-- <combine2> -->
<implementation name="IM_combine2_vector2_genmdl" nodedef="ND_combine2_vector2" target="genmdl" sourcecode="float2( {{in1}},{{in2}} )" />
<implementation name="IM_combine2_color4CF_genmdl" nodedef="ND_combine2_color4CF" target="genmdl" sourcecode="color4( {{in1}}[0],{{in1}}[1],{{in1}}[2],{{in2}} )" />
<implementation name="IM_combine2_color4CF_genmdl" nodedef="ND_combine2_color4CF" target="genmdl" sourcecode="materialx::stdlib_{{MDL_VERSION_SUFFIX}}::mx_combine2_color4CF({{in1}}, {{in2}})" />
<implementation name="IM_combine2_vector4VF_genmdl" nodedef="ND_combine2_vector4VF" target="genmdl" sourcecode="float4( {{in1}}[0],{{in1}}[1],{{in1}}[2],{{in2}} )" />
<implementation name="IM_combine2_vector4VV_genmdl" nodedef="ND_combine2_vector4VV" target="genmdl" sourcecode="float4( {{in1}}[0],{{in1}}[1],{{in2}}[0],{{in2}}[1] )" />

Expand Down
8 changes: 0 additions & 8 deletions libraries/stdlib/genmsl/mx_smoothstep_vector2.metal

This file was deleted.

9 changes: 0 additions & 9 deletions libraries/stdlib/genmsl/mx_smoothstep_vector3.metal

This file was deleted.

10 changes: 0 additions & 10 deletions libraries/stdlib/genmsl/mx_smoothstep_vector4.metal

This file was deleted.

3 changes: 0 additions & 3 deletions libraries/stdlib/genmsl/stdlib_genmsl_impl.mtlx
Original file line number Diff line number Diff line change
Expand Up @@ -489,9 +489,6 @@

<!-- <smoothstep> -->
<implementation name="IM_smoothstep_float_genmsl" nodedef="ND_smoothstep_float" file="mx_smoothstep_float.metal" function="mx_smoothstep_float" target="genmsl" />
<implementation name="IM_smoothstep_vector2_genmsl" nodedef="ND_smoothstep_vector2" file="mx_smoothstep_vector2.metal" function="mx_smoothstep_vector2" target="genmsl" />
<implementation name="IM_smoothstep_vector3_genmsl" nodedef="ND_smoothstep_vector3" file="mx_smoothstep_vector3.metal" function="mx_smoothstep_vector3" target="genmsl" />
<implementation name="IM_smoothstep_vector4_genmsl" nodedef="ND_smoothstep_vector4" file="mx_smoothstep_vector4.metal" function="mx_smoothstep_vector4" target="genmsl" />

<!-- <luminance> -->
<implementation name="IM_luminance_color3_genmsl" nodedef="ND_luminance_color3" file="../genglsl/mx_luminance_color3.glsl" function="mx_luminance_color3" target="genmsl" />
Expand Down
Loading

0 comments on commit f528f94

Please sign in to comment.