-
Notifications
You must be signed in to change notification settings - Fork 606
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
[FEATURE REQUEST] Add an inverse modifier to oiiotool's --ociodisplay option #3648
Comments
Proposed fix in #3650 I'm hoping that maybe somebody could apply this patch on their end and test it by hand, verifying that it appears to work to make the inverse display transform (and also doesn't break the forward transform in any way). To be honest, I don't really have a test for this in this PR. I noticed recently (to my embarrassment) that the current OIIO testsuite does not contain a test that directly exercises --ociodisplay (though it does for --ociolook and --colorconvert). I haven't had a chance to fix that yet, so of course it also doesn't test the inverse. At my facility, The main impediment to my adding these tests is that the OCIO config that I ship in the testsuite itself, which is the nuke-default, doesn't actually contain any "displays." I think that the solution is going to be to shift the tests to using the new OCIO 2.2 "built-in" configs, which do contain displays. That gives me more testing fodder, as well as knowing that the testsuite doesn't need to come with its own sample config (and, for that matter, allowing oiiotool to rely on the built-in configs in cases where the user doesn't have their own full config). But that's a separate task. |
To that end, @doug-walker, I was just poking around the ocio docs and... is there anyplace that directly addresses how to use the built-in configs? Are there any new API calls? Or do you just ask for a config as always, and use the name of the built-ins? I had trouble finding anyplace that really spelled it out in the docs, but it's possible I just wasn't looking in the right place. |
@lgritz , I have some documentation in progress for the new features in OCIO 2.2. I'm still writing it, but here is what I have for the built-in configs section so far: Built-in ConfigsFor users The OCIO Configs Working Group has put a lot of effort building new ACES configs that take advantage of the features of OCIO v2. These configs are available separately from the project's GitHub repo: To make them more accessible, they are built in to the library itself and may be accessed directly from within applications that incorporate the OCIO 2.2 library. Wherever you are able to provide a file path to a config, you may now provide a URI-type string to instead use one of the built-in configs. For example you may use these strings for the OCIO environment variable. To use the ACES CG config, use this string for the config path: To use the ACES Studio config, use this string for the config path: This string will give you the current default config, which is currently the CG config: In future releases, it is expected that updated versions of these configs will be added, each with a unique name string. However, the previous strings will continue to be supported for backwards compatibility. For developers The new URI-type strings may be passed into the existing APIs such as CreateFromEnv and CreateFromFile. This is also a new CreateFromBuiltinConfig. If you'd like to offer the built-in configs from your user interface, there is an API to access them through the new BuiltinConfigRegistry. Here is basic Python code to access the registry and print the strings to present in a UI:
Prints: If your application saves the path to a config and the user enters "ocio://default", it is recommended that you don't save that. Instead, call getDefaultBuiltinConfigName to get the name of the current default. This is guaranteed to give the same results, whereas the default config could change somewhat between releases. Prepend "ocio://" in order to save it as a valid config path. Here's the Python code:
|
Oh, thanks, this is very helpful. |
Problem Description
The oiiotool --ociodisplay option is very useful for applying an OCIO DisplayViewTransform. This takes an image in a "src" color space and then applies a "view" transform for a specific "display". For example, one might take a source image in ACEScg space and apply the "ACES 1.0 - SDR Video" view for the "sRGB - Display", using either of the following:
However, it is often useful to be able to apply the DisplayViewTransform in the inverse direction. For example, to convert sRGB back to ACEScg, inverting a specific view transform. The ocioconvert tool (one of the OCIO command-line tools) is already able to do this, as follows:
Inverting a DisplayViewTransform is easily possible via the OCIO v2 API. Simply set the direction of the DisplayViewTransform to TRANSFORM_DIR_INVERSE.
Proposed solution
The --ociofiletransform option in oiiotool already has an "inverse" modifier. So the proposed solution is to add an "inverse" modifier to --ociodisplay.
The text was updated successfully, but these errors were encountered: