Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change subsurface_bsdf radius from vector3 to color3 #1834

Merged

Conversation

pablode
Copy link
Contributor

@pablode pablode commented May 24, 2024

This was changed in the 1.39 spec, but is not reflected in the code yet.

@jstone-lucasfilm
Copy link
Member

@pablode We've now merged development work on MaterialX 1.39 back to the main branch of MaterialX, in preparation for the final weeks of development on the 1.39.0 release. When you have a chance, could you retarget this pull request back to the main branch as well?

@pablode pablode changed the base branch from dev_1.39 to main May 31, 2024 06:06
@pablode pablode changed the base branch from main to dev_1.39 May 31, 2024 06:07
@jstone-lucasfilm jstone-lucasfilm changed the base branch from dev_1.39 to main May 31, 2024 18:10
@jstone-lucasfilm jstone-lucasfilm changed the base branch from main to dev_1.39 May 31, 2024 18:10
@jstone-lucasfilm jstone-lucasfilm changed the base branch from dev_1.39 to main May 31, 2024 18:16
@jstone-lucasfilm jstone-lucasfilm changed the base branch from main to dev_1.39 May 31, 2024 18:17
@pablode pablode changed the base branch from dev_1.39 to main June 1, 2024 08:46
@pablode
Copy link
Contributor Author

pablode commented Jun 1, 2024

Not sure why the CI is not running -- it should still fail. @jstone-lucasfilm @kwokcb any idea what's wrong with the implementation?

PS: I noticed that stdlib/pbrlib_defs.xml & co. still use 1.38 in their MaterialX version tags. Should they be updated?

@jstone-lucasfilm
Copy link
Member

Thanks for updating the branch to main, @pablode, and I'll go ahead and start a new CI build with this latest work. We had some issues with GitHub Actions stability last week that required us to delete unsuccessful CI logs, but I believe everything is back up and running now.

For the version strings in the standard libraries, we usually leave these unmodified (i.e. at 1.38) until we're nearly ready to mark a new release, so that we get the maximum amount of testing for the upgrade path. For that reason, I'd recommend leaving all of the version strings in your PR at 1.38, and letting the document upgrade path handle any changes that need to occur.

Let me know if you need an assist in resolving the remaining build issues for your PR, and I'd be happy to take a closer look.

@pablode
Copy link
Contributor Author

pablode commented Jun 2, 2024

Thanks, I’ll revert the version string change in the test case then.

I’d appreciate it if you could have a look at the failures. I’ve already verified the upgrade logic, and it looks like all documents (including the Standard Surface node graph) are correctly upgraded.

- Update subsurface_bsdf nodes in shading models that have already been migrated to 1.39.
- Restore test suite examples to 1.38.
- Additional work is still needed to correctly handle subsurface_bsdf nodes in shader translation.
- Add support for interface connections.
- Add support for nested documents.
@pablode
Copy link
Contributor Author

pablode commented Jun 3, 2024

Awesome! Thank you for catching these two cases in the upgrade logic 🙂

@jstone-lucasfilm
Copy link
Member

Thanks for putting this change together, @pablode, and it should help to bring the specification and codebase into alignment for MaterialX 1.39.

I'm CC'ing @niklasharrysson and @portsmouth for their thoughts, to make sure the proposed change from vector3 to color3 radius matches the very latest discussions around the subsurface_bsdf node in MaterialX.

@niklasharrysson
Copy link
Contributor

I'm not sure about this type change.. Looking at the 1.39 spec it's indeed a color3 now, and in the Standard Surface spec it's also a color3. However in the OpenPBR spec it's a vector3. @portsmouth is it correct to assume that a vector3 type is what you prefer for the subsurface radius / mfp parameter?

@jstone-lucasfilm
Copy link
Member

@niklasharrysson @pablode This relates to the topic of physical versus perceptual colors in MaterialX, and I think it's a deep enough subject that it's worthwhile to discuss more broadly, so I've started a new thread on the MaterialX Slack:

https://academysoftwarefdn.slack.com/archives/C0230LWBE2X/p1719188320479269

@jstone-lucasfilm
Copy link
Member

@niklasharrysson @pablode Summing up the MaterialX Slack thread, it sounds like representing physical colors as color3 values is preferred, as it provides better visual parity than using vector3 values. In the former case, physical colors are transformed imperfectly when rendering an asset in a different scene color space, but this is still better than not transforming them at all.

Given that additional context, I'm leaning towards including Pablo's change in MaterialX 1.39, and I'd be interested in your thoughts!

Copy link
Member

@jstone-lucasfilm jstone-lucasfilm left a comment

Choose a reason for hiding this comment

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

Let's move forward with this change for MaterialX 1.39, since it aligns with our latest discussions around physical color representation. Thanks @pablode!

@jstone-lucasfilm jstone-lucasfilm merged commit 47c68d9 into AcademySoftwareFoundation:main Jun 25, 2024
34 checks passed
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