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
OCIO base support #840
Closed
bernardkwok
wants to merge
4
commits into
AcademySoftwareFoundation:main
from
autodesk-forks:adsk_contrib/ocio_to_main
Closed
OCIO base support #840
Changes from all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
58 changes: 58 additions & 0 deletions
58
resources/Materials/TestSuite/stdlib/color_management/ocio_color_management.mtlx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
<?xml version="1.0"?> | ||
<!-- OCIO example tests | ||
- Test of color4 | ||
- Test of color3 where no conversion from color3->color4->color3 is required | ||
- Test reuse single update node with a given color transform | ||
- Test us of multiple upstrea nodes using the same color transform code but different inputs / outputs | ||
--> | ||
<materialx version="1.38" cms="ocio" cmsconfig="config.ocio" colorspace="lin_rec709"> | ||
<!-- non-LUT color4 input test --> | ||
<nodegraph name="color4_acescg_nodegraph"> | ||
<!-- The transform will be generated once. The node will rout to multiple downstream inputs --> | ||
<constant name="color4_acescg" type="color4"> | ||
<input name="value" type="color4" value="0.5, 0.0, 0.0, 1.0" colorspace="acescg" /> | ||
</constant> | ||
<standard_surface name="color4_acescg_shader" type="surfaceshader"> | ||
<input name="base_color" type="color3" value="1, 1, 1" nodename="color4_acescg" channels="rgb" /> | ||
</standard_surface> | ||
<output name="color4_acescg_output" type="surfaceshader" nodename="color4_acescg_shader" /> | ||
<standard_surface name="color4_acescg_shader2" type="surfaceshader"> | ||
<input name="base_color" type="color3" value="1, 1, 1" nodename="color4_acescg" channels="rgb" /> | ||
</standard_surface> | ||
<output name="color4_acescg_output" type="surfaceshader" nodename="color4_acescg_shader" /> | ||
<output name="color4_acescg_output2" type="surfaceshader" nodename="color4_acescg_shader2" /> | ||
</nodegraph> | ||
|
||
<!-- non-LUT color3 --> | ||
<nodegraph name="color3_acescg_nodegraph"> | ||
<constant name="color3_acescg" type="color3"> | ||
<input name="value" type="color3" value="0.5, 0.0, 0.0" colorspace="acescg" /> | ||
</constant> | ||
<standard_surface name="color3_acescg_shader" type="surfaceshader"> | ||
<input name="base_color" type="color3" value="1, 1, 1" nodename="color3_acescg" /> | ||
</standard_surface> | ||
<output name="color3_acescg_output" type="surfaceshader" nodename="color3_acescg_shader" /> | ||
|
||
<!-- This node will reuse the same transform code as color3_acescg --> | ||
<constant name="color3_acescg2" type="color3"> | ||
<input name="value" type="color3" value="0.0, 0.5, 0.0" colorspace="acescg" /> | ||
</constant> | ||
<add name="add_acescg" type="color3"> | ||
<input name="in1" type="color3" nodename="color3_acescg"/> | ||
<input name="in2" type="color3" nodename="color3_acescg2" /> | ||
</add> | ||
<standard_surface name="color3_acescg_shader_add" type="surfaceshader"> | ||
<input name="base_color" type="color3" value="1, 1, 1" nodename="add_acescg" /> | ||
</standard_surface> | ||
<output name="color3_acescg_output_add" type="surfaceshader" nodename="color3_acescg_shader_add" /> | ||
</nodegraph> | ||
|
||
<!-- Basic image input to test appending transform after image read --> | ||
<nodegraph name="image3_acescg_nodegraph"> | ||
<image name="image3_acescg" type="color3"> | ||
<input name="file" type="filename" value="resources/Images/grid.png" colorspace="acescg" /> | ||
</image> | ||
<output name="out_image3_acescg" type="color3" nodename="image3_acescg" /> | ||
</nodegraph> | ||
|
||
</materialx> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pulled out from ShaderGraph code into CM system where these utilities should belong.
They allow for insert on CM transforms on inputs and outputs. If need be a conversion from color3 to color4
can be performed as well as OCIO requires color4.