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

Autodesk: Set Target Colorspace on context #3482

Open
wants to merge 1 commit into
base: dev
Choose a base branch
from

Conversation

erikaharrison-adsk
Copy link
Contributor

Description of Change(s)

We found a Color Space diff in testUsdImagingGLMaterialXCustomNodes_customMaterial.
The issue is that target colorspace should be set on the generator context instead of the document.

Link to proposal (if applicable)

  • N/A

Fixes Issue(s)

  • N/A

Checklist

Setting the colorspace on the context establishes the target color space for shader generation as lin_rec709, while setting the colorspace on the document potentially modifies the source color spaces without intending to.
@meshula
Copy link
Member

meshula commented Jan 9, 2025

@ashwinbhat This looks right, I think, but could explain what error you encountered? Was it something like the document color space was acescg, but the colors got interpreted as lin_rec709? How did you detect the problem? is it possible to catch the issue in a unit test to accompany the fix?

@ashwinbhat
Copy link
Contributor

@ashwinbhat This looks right, I think, but could explain what error you encountered? Was it something like the document color space was acescg, but the colors got interpreted as lin_rec709? How did you detect the problem? is it possible to catch the issue in a unit test to accompany the fix?

@meshula I have been trying to integrate the material datalibrary referencing concept that was introduced in MaterialX. See PR 2054
In our internal testing this has shown improvements in document load time. Datalibrary referencing is not a required change for USD-Mtlx 1.39.x integration, the import based based workflow is still available in MaterialX.
We started seeing glimaging mtlx unit test failures with Colorspace issues. The root cause is that the datalibrary is referenced and not imported. It highlighted how we were incorrectly setting up the target colorspace for shader generation. Setting the colorspace on the context establishes the target color space for shader generation, while setting the colorspace on the document potentially modifies the source color spaces without intending to.

@jesschimein
Copy link
Collaborator

Filed as internal issue #USD-10561

(This is an automated message. See here for more information.)

@jesschimein
Copy link
Collaborator

/AzurePipelines run

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

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.

4 participants