ayon-core icon indicating copy to clipboard operation
ayon-core copied to clipboard

Colormanagement improvements

Open jakubjezek001 opened this issue 2 months ago • 1 comments

Is there an existing issue for this?

  • [x] I have searched the existing issues.

Please describe the feature you have in mind and explain what the current shortcomings are?

The current state of AYON color management is confusing, mostly regarding Display and View settings at the DCC level, as well as transcoding and metadata storage.

How would you imagine the implementation of the feature?

  • [ ] Enhance OCIO Config Profiles to include:
    • DCC Display & View (for unified settings across DCCs).
    • Video colorspace (default target for OIIO web review transcoding).
  • [ ] Implement DCC-level acceptance for new OCIO Config Profiles with Display & View.
    • Remove equivalent settings from host-level configurations.
  • [ ] ExtractOIIOTranscode: Define target output Colorspace or Display & View inheritance/override.
    • Inherit from core preset OR override with explicit values and only use override if toggled ON (like ayon+settings://nuke/imageio/baking_target). Image
  • [ ] Fix CG Rendering Bug: AOV EXRs must use scene_linear or data roles.
    • Stop adding display/view keys to colorspaceData. (Reference: GH Issue 1500).
  • [ ] Remove Nuke Monitor preset; allow users to define it.
  • [ ] Map use cases for ExtractOIIOTranscode using Display & View as source keys in colorspaceData (Current known use: Batch Delivery / Simple Template processing).
  • [ ] Standardize colorspaceData in representation entities:
    • Only include the colorspace key to reflect the source colorspace (e.g., acescg, p3), not roles.

Are there any labels you wish to add?

  • [x] I have added the relevant labels to the enhancement request.

Describe alternatives you've considered:

No response

Additional context:

No response

jakubjezek001 avatar Oct 27 '25 13:10 jakubjezek001

For information, I'm adding a summary for this and #1500 from an internal discussion:

Expected Data Keys During Publishing

These keys represents suggested state:

# These keys are expected by `create_instances_for_aov` and `ExtractOIIOTranscode`
instance.data["colorspaceConfig"]  # Current (Source) colorspace.
# this should be removed in future since it should be driven from settings on OCIO Config profiles
instance.data["display"]  # Current (Source) Display used in the viewport.
instance.data["view"]  # Current (Source) View used in the viewport.

# `colorspaceData` key is expected on representations
representation["colorspaceData"]["config"]["path"]  # Absolute path of current OCIO config
representation["colorspaceData"]["config"]["template"]  # Current OCIO config with root anatomy key.
# it is expected that if display&view keys are in colorspace data then `colorspace` key is empty
representation["colorspaceData"]["colorspace"]  # Current colorspace baked into pixels.
representation["colorspaceData"]["display"]  # Current Display baked into pixels.
representation["colorspaceData"]["view"]  # Current View baked into pixels.

# Some Relations
# `ayon_core.pipeline.farm.pyblish_functions.create_instances_for_aov` boils down to
colorspace_template = remap_source(instance.data["colorspaceConfig"], anatomy)

representation["colorspaceData"].update({
    "colorspace": RenderProduct.colorspace,
    "config": {
        "path": instance.data["colorspaceConfig"],
        "template": colorspace_template
    }
})

Cleanup the Extract OIIO Transcode Plugin logic

Imo, the bottom line is that the plugin should follow the transcoding type. which is either Use Colorspace or Use Display&View.

Image

However, the plugin initializes some variables at the beginning of the process which pollutes the function arguments.

we set target_display, target_view, source_display, source_view and source_colorspace. https://github.com/ynput/ayon-core/blob/5ac4dd04fa852b3d50c132b19938a8ac35ac9d53/client/ayon_core/plugins/publish/extract_color_transcode.py#L95-L96 https://github.com/ynput/ayon-core/blob/5ac4dd04fa852b3d50c132b19938a8ac35ac9d53/client/ayon_core/plugins/publish/extract_color_transcode.py#L105-L108

and later on in the code we override them https://github.com/ynput/ayon-core/blob/5ac4dd04fa852b3d50c132b19938a8ac35ac9d53/client/ayon_core/plugins/publish/extract_color_transcode.py#L141-L156

then we pass on all of them https://github.com/ynput/ayon-core/blob/5ac4dd04fa852b3d50c132b19938a8ac35ac9d53/client/ayon_core/plugins/publish/extract_color_transcode.py#L182-L194

MustafaJafar avatar Oct 29 '25 09:10 MustafaJafar