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

Add a C++ implementation for ACES Metadata File (AMF) support #1927

Open
doug-walker opened this issue Jan 9, 2024 · 4 comments
Open

Add a C++ implementation for ACES Metadata File (AMF) support #1927

doug-walker opened this issue Jan 9, 2024 · 4 comments
Labels
Feature Request New addition to OCIO functionality.
Milestone

Comments

@doug-walker
Copy link
Collaborator

OCIO has a Python script (pyocioamf) that converts an AMF file into a CTF that implements the parts of the processing pipeline that the AMF file indicates still need to be applied. This has been useful for the community as a fairly complete open source implementation of AMF. However, this script does not fully meet the potential needs of AMF implementers for several reasons, including:

  1. It may be difficult to call the Python script from a conventional C++ application program.
  2. The script does not give any flexibility in terms of applying arbitrary parts of the AMF pipeline.

The next steps have been a topic of conversation at OCIO TSC meetings in recent months and the group felt that the best and most flexible approach would be to convert the AMF into an OCIO config rather than a CTF. The config would then allow implementers to apply any steps in the pipeline as desired. For example, they could explore advanced use-cases such as inverting steps that had already been applied or omitting steps (e.g. certain looks) that may no longer be desired.

The meeting discussions suggested the following mapping from AMF to OCIO config:

  1. Each AMF look should become an OCIO Look, that may be applied independently (or reversed), if desired.
  2. The AMF output transform should become the default display and view.
  3. The implementation should draw on the latest built-in ACES Studio config in OCIO 2.3 which contains ACES transform IDs.
  4. If the input is a digital camera log color space, the corresponding linear space should also be added, for use in VFX.
  5. The resulting config should be compatible with config merge workflows (e.g., names should be unique).

I'm attaching to this issue an example AMF file and a corresponding OCIO config that's in line with the discussions. There are a few details worth calling out:

  1. A role has been added (amf_clip_a001a020) to indicate the color space of the associated media.
  2. The active_display and active_view are configured based on the AMF output transform.
  3. A look has been added to the active_view that implements the unapplied looks (in this case, all the looks still need to be applied, but in general that may not be the case).
  4. There is an OCIO Look for each AMF look plus another one that has all of the unapplied looks.
  5. The design of the looks allows a user to create a DisplayViewTransform that uses the clip color space role as the source and the active display/view as the destination and it will convert the clip into the output color space in accordance with the full AMF pipeline.
  6. The search_path in the example is set to '.', which would be fine if the config were written to the same directory as the AMF, but we're looking for input on how to handle file paths from the AMF. Should the search_path be set to the absolute directory of the AMF file?

We have a contributor that has kindly offered to implement this in OCIO, so we would appreciate timely feedback on the proposed approach.
amf-example.zip

@phil-man-git-hub
Copy link

phil-man-git-hub commented Jan 9, 2024 via email

@doug-walker
Copy link
Collaborator Author

Hi Phil, there is no script to convert a CTF to an AMF. In order to write something like that, there would need to be a way to define which operators apply to which steps in the AMF. The XML could contain this extra metadata but it would be a big task to define how it should work.

The script for the AMF to CTF direction is located along with the other tools in the repo here.

@phil-man-git-hub
Copy link

phil-man-git-hub commented Jan 9, 2024 via email

@remia
Copy link
Collaborator

remia commented Jan 22, 2024

Thanks for the thorough description @doug-walker, just as an illustration I'm attaching an archive showing what I was thinking when mentioning the applied / un-applied looks categorisation might be unneeded. Note that I changed the AMF to apply the IDT and first 2 looks. The AMF CLIP colour space invert those 2 looks then the output transform always apply all looks for the shot using the SHOT_LOOKS environment variable. It is possible I overlooked some workflows / use case that would not work with this scheme, please let me know.

amf-example2.zip

@carolalynn carolalynn added the Feature Request New addition to OCIO functionality. label Feb 7, 2024
@carolalynn carolalynn added this to the OCIO 2.4.0 milestone Feb 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature Request New addition to OCIO functionality.
Projects
None yet
Development

No branches or pull requests

4 participants