Skip to content

Support concurrent node definition in the same document#2883

Draft
AdrienHerubel wants to merge 1 commit intoAcademySoftwareFoundation:mainfrom
autodesk-forks:concurrent_nodedef_versions
Draft

Support concurrent node definition in the same document#2883
AdrienHerubel wants to merge 1 commit intoAcademySoftwareFoundation:mainfrom
autodesk-forks:concurrent_nodedef_versions

Conversation

@AdrienHerubel
Copy link
Copy Markdown

This PR adds support for having nodes pointing at multiple versions of the same node definition using different node graphs in the same document. This also adds the draft version of OpenPBR 1.2 as a practical example.

@AdrienHerubel AdrienHerubel marked this pull request as draft May 5, 2026 16:58
@kwokcb
Copy link
Copy Markdown
Contributor

kwokcb commented May 6, 2026

Can the requirement to have identical nodedef names with different versions be explained? Feels like this should not be required as the existing mechanisms will support multiple versions.

I put this into Slack as reply to the question on identifiers (


For nodedef versioning, seems like what's in the PR breaks the unique name requirement for nodedefs (and any node in general) in the spec. Unsure why the same names are being used ?  (*) -- with additional patching to try and auto create unique names, which is also not something defined in the spec, and looks like it could break USD shader registration.

Custom Node Declaration NodeDef Elements

Each custom node must be explicitly declared with a element, with child , and elements specifying the expected names and types of the node’s ports.
Attributes for elements:
name(string, required): a unique name for this
There can also be implications of support duplicate names on document read -- which currently has the convention of ignoring duplicates.

(*) If this is to try and make things work with the existing shader translation logic, then I'd suggest that that logic be extended to support versions.


As a further note, standard surface already has 2 versions and both can be instantiated without any addition logic changes. There is a USD/MTLX Slack thread with a note on this as well.

<!-- OpenPBR Surface v1.1.1 -->
<!-- ============================================================ -->

<nodedef name="ND_open_pbr_surface_surfaceshader" node="open_pbr_surface" nodegroup="pbr" version="1.1.1" isdefaultversion="false"
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I think we just want to call this ND_open_pbr_surface_surfaceshader_111 or maybe ND_open_pbr_surface_surfaceshader_1_1_1

So we have unique node def names - as we were discussing at the TSC - my hope would be if you do that - then you wouldn't need any changes in MaterialXCore or MaterialXFormat at all - this really boils down to a new version of the node, and some code changes on the application side (MaterialXGraphEditor)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I'd vote for that. If we follow what was done for std surface than it's ND_open_pbr_surface_surfaceshader_111, but not sure if this should be the recommended "convention" -- I don't recall the discussion anymore on why we chose this.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

I'll revisit the PR to use different nodedef names as discussed at the TSC. Though for backward compatibility with USD where we explicitly use a nodedef name and no nodedef versioning, should we not keep the current name for the 1.1.1 version to maintain the look ?

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.

3 participants