-
Notifications
You must be signed in to change notification settings - Fork 36
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
Add remaining CG config transforms #34
Add remaining CG config transforms #34
Conversation
Generated CG config: https://gist.github.com/michdolan/215b894a145eb7e5133904fb0dfa25c3 |
Excellent and thanks @michdolan, I will take a look tonight.
Any traceback, |
Traceback when trying to serialize a
|
Signed-off-by: Michael Dolan <michdolan@gmail.com>
d41d075
to
1e8376e
Compare
Signed-off-by: Michael Dolan <michdolan@gmail.com>
Thanks for moving this forward Michael! Here are some comments:
|
Signed-off-by: Michael Dolan <michdolan@gmail.com>
Signed-off-by: Michael Dolan <michdolan@gmail.com>
Updated to 2.0, and added support for major and minor version to config generator
I moved them all to a Utilities directory and namespace, since that's what they are labeled with in the config. Open for discussion of course.
Good point. Let's discuss tomorrow.
Updated (also in the reference config)
I think it's worth keeping both for ease of use. It will be easier to use color spaces for handling textures, etc. vs. having to use an inverse display view transform.
I changed this to Utility, which matches naming in existing ACES configs.
Good point. Let's discuss tomorrow.
I updated the config generator to pull strings from CLF input and output descriptors to build a more detailed color space description, which includes white point.
This is also solved by the updated description mentioned above.
For discussion tomorrow. Updated config: https://gist.github.com/michdolan/215b894a145eb7e5133904fb0dfa25c3 |
Signed-off-by: Michael Dolan <michdolan@gmail.com>
Signed-off-by: Michael Dolan <michdolan@gmail.com>
Signed-off-by: Michael Dolan <michdolan@gmail.com>
Hey @michdolan, In 08e0061, I generalised the embedding process for CLF transforms, I basically made it a special case of the
A few benefits:
Example of how it is serialised now: {
"name": "Utility - sRGB - Texture",
"description": "Convert ACES2065-1 to sRGB\n\nCLFtransformID: urn:aswf:ocio:transformId:1.0:OCIO:Utility:AP0_to_Rec709-sRGB:1.0",
"from_reference": {
"name": "FileTransform",
"src": "/Users/kelsolaar/Documents/Development/colour-science/ampas/OpenColorIO-Config-ACES/opencolorio_config_aces/clf/transforms/builtins/utility/AP0_to_Rec709-sRGB.clf",
"clf_transform_to_group_transform": true
},
"encoding": "sdr-video",
"categories": "file-io"
}, |
@KelSolaar do you want to make a PR into my branch or a PR into the main repo following merging this one? |
Signed-off-by: Michael Dolan <michdolan@gmail.com>
Updated config: https://gist.github.com/michdolan/215b894a145eb7e5133904fb0dfa25c3 Based on config working group discussion, the following changes were made:
|
Signed-off-by: Michael Dolan <michdolan@gmail.com>
Signed-off-by: Michael Dolan <michdolan@gmail.com>
Signed-off-by: Thomas Mansencal <thomas.mansencal@gmail.com>
Signed-off-by: Thomas Mansencal <thomas.mansencal@gmail.com>
Signed-off-by: Thomas Mansencal <thomas.mansencal@gmail.com>
My PR is up at michdolan#1. I had to move my code on my fork because I could not force-push into the |
PR: Refactor the "factories".
I am locked out of the settings for this repo too. I'll talk to LF about getting admin permissions. |
|
||
Other Parameters | ||
---------------- | ||
name : unicode |
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.
I don't suppose I could convince you guys to rename "name" kwarg used for transform_factory_default
to something more descriptive, like "transform_type" or "transform_class"? Compared to how "name" is used with the other factory methods, the term feels kind of overloaded; especially because there's a canonical "name" format metadata attribute that manifests in serialized yaml as an attribute called "name":
!<LogAffineTransform> {name: Log3G10 to Linear, log_side_slope: 0.224282, lin_side_slope: 155.975327, lin_side_offset: 2.55975327, direction: inverse}
I was thinking, maybe we could reserve "name", "id", "description", "input_descriptor" and "output_descriptor" for slapping format metadata on freshly-birthed transform instances. It's pretty nice having a way to bundle and deal with the transform parameter data and format metadata at the same points in time and space.
(I know you guys are already using "name" in a bunch of places, but I figured I should say something now if ever)
feel free to snag this method for certain format metadata to supported transforms (or to group transforms wrapping unsupported transforms):
https://gist.github.com/zachlewis/39a121d07025e2727527d0446b2b5da5
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.
Good point, when I looked back then, I did not see any collisions and went for shorter is better but seems like I missed the one highlighted (and possibly others). I'll fix that.
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.
Should be fixed in michdolan#2
|
||
import PyOpenColorIO as ocio | ||
|
||
transform = getattr(ocio, kwargs.pop('name'))() |
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.
This is gonna fail for "LogCameraTransform"; possibly others. The constructor requires a linSideBreak
value.
On the other hand, the "LogAffineTransform" doesn't accept an initial value for base
during instantiation -- you have to use the setBase
instance method afterwards.
Damned if you do, damned if you don't.
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.
That's fine, we can handle those special cases one-by-one.
@michdolan : I noticed that the CLF classification code now breaks because of the changes in the URN:
|
I also noted that the
Could be unrelated and I haven't checked as to why, about to hit the sack! |
@KelSolaar we changed the URN format away from |
Yeah I know, I guess I was pointing out that we did not change the code accordingly! |
I updated the classification code, but the error in that case is failing because the CLF being classified has the old naming, which is no longer valid. michdolan#2 reintroduced the placeholder CLF files which I had removed in an earlier commit, which are causing the CI failure. |
No worries, there is a point not too far in the future where we should write unit tests for the generator. |
Signed-off-by: Thomas Mansencal <thomas.mansencal@gmail.com>
Rename various transform factory keyword arguments.
100,ACES - ACEScg,urn:ampas:aces:transformId:v1.5:ACEScsc.Academy.ACEScg_to_ACES.a1.0.3,,,ColorSpace,scene-linear,"file-io,working-space" | ||
100,Input - Generic - sRGB - Texture,,urn:aswf:ocio:transformId:v1.0:ACES.OCIO.AP0_to_Rec709-sRGB.c1.v1,,ColorSpace,sdr-video,file-io | ||
100,Input - Generic - sRGB - Texture,,urn:aswf:ocio:transformId:1.0:OCIO:Utility:AP0_to_Rec709-sRGB:1.0,,ColorSpace,sdr-video,file-io | ||
100,Output - P3-D65 ST2084 (1000 nits),urn:ampas:aces:transformId:v1.5:RRTODT.Academy.P3D65_1000nits_15nits_ST2084.a1.1.0,,DISPLAY - CIE-XYZ-D65_to_ST2084-P3-D65,ViewTransform,hdr-video,file-io |
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.
In the Gist of the config, the ST2084-P3-D65 colorspace has an encoding of sdr-video, which is wrong. Although here it says hdr-video, which is correct. So maybe the Gist is out of date?
The CLFs in this PR, and the method for converting them to
GroupTransform
were provided by @doug-walkerIn addition to adding the remaining CLFs for the CG config, this PR modifies the CG config generation code to convert those CLFs into native OCIO transforms rather than reference the external files. So in this case the CLFs are being used as a template for colorspace creation, but the resulting config is 100% self-contained.
Other updates:
Note: I removed the code which generates a JSON file alongside the OCIO config. Because this update is putting OCIO objects into ConfigData in some cases, they fail to serialize. We should discuss whether this is ok (do we need the JSON file in addition to the config?), and if not, possible solutions.
Signed-off-by: Michael Dolan michdolan@gmail.com