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

Adsk Contrib - Add Built-in Transform and ociomakeclf app #1006

Conversation

hodoulp
Copy link
Member

@hodoulp hodoulp commented Apr 29, 2020

Signed-off-by: Patrick Hodoul [email protected]

The pull request mainly adds the "Built-in Transform" feature as explained by issue #980.

  • For a config author the use of a built-in transform is like using a transform. For example - !<BuiltinTransform> {style: ACEScct_to_ACES2065-1} adds a transform to convert from ACEScct to ACES2065-1. Like any other transform the direction is supported.

  • The implementation of the built-in transforms are implemented using existing transforms (i.e. built using Ops) so optimizations & finalizations are all done. For example, the ACEScct_to_ACES2065-1 is built here in the file src/OpenColorIO/transforms/builtins/ACES.cpp, and the implementation only uses a LogTransform and a MatrixTransform.

  • Some camera built-in transforms are already available (but could be disabled with the cmake option -DOCIO_ADD_EXTRA_BUILTINS=OFF). For example, the SONY_SLOG3-SGAMUT3_to_ACES2065-1 is built here in the file src/OpenColorIO/transforms/builtins/SonyCameras.cpp.

  • The new app ociomakeclf converts from any supported LUT file format to the ACES CLF file format and optionally adds conversions from/to ACES2065-1 to make it an LMT. Note that OCIO currently supports the Academy/ASC Common LUT Format v3 (refer to Build error on Ubuntu 18.04 (Bionic Beaver). #709 ).
    Some usages are:

    • ./src/apps/ociomakeclf/ociomakeclf ./testdata/lut1d_1.spi1d ./res.clf converts from spi1d to the CLF file format.
    • ./src/apps/ociomakeclf/ociomakeclf --list lists the ACES Color Space Conversion transforms (all of which convert to ACES2065-1) usable for building an ACES LMT.
    • ./src/apps/ociomakeclf/ociomakeclf ./testdata/discreet-3d-lut.3dl ./res.clf --csc ACEScct creates a CLF file containing three blocks: the conversion from ACES2065-1 to ACEScct, the input LUT file content and finally, the conversion from ACEScct to ACES-2065-1. All the blocks could be comprised of one or several transforms. The result is an ACES LMT file usable with an ACES Metadata File (AMF).

The pull request currently supports a starter set built-in transforms, including all of the ACES CSC transforms. From the public API, the class BuiltinTransformRegistry gets access to all the existing styles (i.e. built-in transform names) with a short description.

This PR puts the foundation mechanism in place for built-in transforms and it should now be straight-forward to add more additional transform instances over time. The initial set in this PR is intended as an example (which are also useful for building LMTs), not as the complete set.

Signed-off-by: Patrick Hodoul <[email protected]>
@doug-walker doug-walker changed the title Adsk Contrib - Add Built-in Transform support Adsk Contrib - Add Built-in Transform and ociomakeclf app Apr 29, 2020
Signed-off-by: Patrick Hodoul <[email protected]>
Signed-off-by: Patrick Hodoul <[email protected]>
@hodoulp hodoulp force-pushed the adsk_contrib/builtin_transform branch from 7ac22f9 to 3ea6dc2 Compare April 30, 2020 21:54
hodoulp and others added 20 commits April 30, 2020 17:55
Signed-off-by: Patrick Hodoul <[email protected]>
Copy link
Collaborator

@michdolan michdolan left a comment

Choose a reason for hiding this comment

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

Excellent work! Super excited about this.

CMakeLists.txt Show resolved Hide resolved
src/OpenColorIO/transforms/builtins/ACES.cpp Show resolved Hide resolved
src/bindings/python/PyBuiltinTransform.cpp Show resolved Hide resolved
@hodoulp
Copy link
Member Author

hodoulp commented May 11, 2020

Following the two-weeks rule, here is a friendly reminder that the branch can now be merged this week unless there are new comments.

Signed-off-by: Patrick Hodoul <[email protected]>
@hodoulp hodoulp merged commit 406bae3 into AcademySoftwareFoundation:master May 12, 2020
@hodoulp hodoulp deleted the adsk_contrib/builtin_transform branch May 12, 2020 19:37
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