Skip to content

Align MaterialX to ASWF Color Interop Forum recommendation - #3042

Open
doug-walker wants to merge 5 commits into
AcademySoftwareFoundation:mainfrom
autodesk-forks:adsk/color_interop_naming
Open

Align MaterialX to ASWF Color Interop Forum recommendation#3042
doug-walker wants to merge 5 commits into
AcademySoftwareFoundation:mainfrom
autodesk-forks:adsk/color_interop_naming

Conversation

@doug-walker

@doug-walker doug-walker commented Aug 17, 2026

Copy link
Copy Markdown
Contributor

As proposed at the August 11th TSC meeting, this PR brings to MaterialX full support for the ASWF Color Interop Forum recommendation Color Space Encodings for Texture Assets and CG Rendering that is used in other ASWF projects and OpenUSD. It supersedes PR #2514.

Support has been retained for all existing colorspace names and cmlib nodes.

Per the discussion at the TSC meeting, this PR does not upgrade existing documents when reading them to use the new names, however, that is still recommended as a follow-on step. Converting to the new names would likely simplify loading of MaterialX documents into OpenUSD. As things stand with this PR, the earlier MtlX names persist into the USD representation of the material, where they won't be recognized.

PR contents:

  • Adds color spaces and nodegraph implementations for "Linear Rec.2020", "ACES2065-1", "CIE XYZ-D65 - Scene-referred", and "sRGB Encoded AP1".
  • Since these are public-facing, existing stdlib nodedefs have been retained without changing their signature to the new name. The nodedefs for the new color spaces use the new names.
  • Improves the accuracy of the matrix converting P3 D65 to Rec.709 primaries.
  • Adds support for the Color Interop Forum "data" colorspace designation (equivalent to the earlier "none").
  • Adds ColorManagementSystem::isNoOpColorSpace to manage what colorspaces are no-ops (includes unit test). Note: this will break ABI-compatibility with the current release.
  • Adds ColorManagementSystem::getUserFacingName to convert the colorspace's color interop ID into a name suitable for use in a user interface.
  • Updates all documentation. Clarified that the rendering space is not guaranteed to be the document's working color space.
  • Adds new mtlx test files in resources/Materials/TestSuite/stdlib/color_management. All colorspace names (new and old) are tested. I validated the resulting renders against OCIO's built-in CG config for ACES.
  • Fixes the texture mapping in existing color management tests so that renders may be properly evaluated. Previously, some parts of the tests were not visible in the image because of where they were mapped onto the sphere.
  • Changes usage of "lin_rec709" to "lin_rec709_scene" in various .cpp modules that call targetColorSpaceOverride.

Notes:

  • All unit tests pass with MATERIALX_BUILD_OCIO both off and on.

Open questions:

  • I don't think the nodedefs/nodegraphs in libraries/cmlib should be public. They should more properly be considered part of the implementation of the DefaultColorManagementSystem. The fact that they only convert into Linear Rec.709 makes them fairly useless for people to use in MaterialX documents. In MaterialX.Proposals.md there is a proposed transformcolor node which potentially could be useful in documents, unlike the existing cmlib nodes.
  • I did not update references to the earlier color space names in the other .mtlx files in the repo, outside of the color_management test directory, but I'm open to doing so, just let me know.

Signed-off-by: Doug Walker <doug.walker@autodesk.com>
<?xml version="1.0"?>
<!--
Test that a colorspace on an image and on a color4 value work.
-->

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is actually a trimmed-down version of color_management.mtlx. I did a git mv on that file, so I'm surprised this is showing as a new file rather than as a rename of the existing one. The original "color_management" name was effectively meaningless and so I wanted to make it more precise.

I trimmed the test down to just a few values since the new all_colorspace_names.mtlx test is where we now test that all color space names are supported.

Signed-off-by: Doug Walker <doug.walker@autodesk.com>
Signed-off-by: Doug Walker <doug.walker@autodesk.com>
Signed-off-by: Doug Walker <doug.walker@autodesk.com>
Signed-off-by: Doug Walker <doug.walker@autodesk.com>
@doug-walker

Copy link
Copy Markdown
Contributor Author

@jstone-lucasfilm, I've made the changes to the nodedefs we discussed in the Nanocolor meeting. I updated the PR description accordingly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant