From 5cb96a37e5aaa0d317be3c28e470c4a0ffe5902d Mon Sep 17 00:00:00 2001 From: demoulinv Date: Wed, 5 Oct 2022 21:45:19 +0200 Subject: [PATCH] Update ocio config file. --- .../image/share/aliceVision/config.ocio | 466 ++---------------- 1 file changed, 38 insertions(+), 428 deletions(-) diff --git a/src/aliceVision/image/share/aliceVision/config.ocio b/src/aliceVision/image/share/aliceVision/config.ocio index a6969d5b04..01356a2d6a 100644 --- a/src/aliceVision/image/share/aliceVision/config.ocio +++ b/src/aliceVision/image/share/aliceVision/config.ocio @@ -11,7 +11,7 @@ name: OCIOv2-AliceVision # # This config does not require any external files. # -search_path: +search_path: "" # # Defining the environment (even if empty) in the config can be a performance boost. @@ -34,14 +34,14 @@ roles: # this config. # aces_interchange: ACES2065-1 - cie_xyz_d65_interchange: CIE-XYZ D65 + #cie_xyz_d65_interchange: CIE-XYZ D65 # # (As this is just a demo, not all the usual roles have been defined.) # - color_timing: ACEScct - compositing_log: ACEScct - data: Raw - default: sRGB + #color_timing: ACEScct + #compositing_log: ACEScct + #data: Raw + default: scene-linear Rec.709-sRGB scene_linear: scene-linear Rec.709-sRGB # @@ -49,22 +49,13 @@ roles: # file_rules: # - # The first rule says to assign the colorspace Raw to files with a .tx extension. - # The colorspace Raw, defined below, essentially means no color processing is applied. + # The next rule assigns the colorspace "ACEScg" to any files that contain "acescg" or "ACEScg" in the path. # - - ! {name: tx, colorspace: Raw, pattern: "*", extension: tx} + - ! {name: ACEScg, colorspace: ACEScg, regex: "acescg|ACEScg"} # - # The next rule assigns the colorspace "ARRI LogC" to any files that contain "LogC" in the path. + # The next rule assigns the colorspace "ACES" to any file that contain "aces or "ACES" in the path. # - - ! {name: LogC, colorspace: ARRI LogC, pattern: "*LogC*", extension: "*"} - # - # The next rule assigns the colorspace "sRGB" to any file that ends with .TIF or .TIFF. - # - - ! {name: TIFF, colorspace: sRGB, regex: ".*\\.TIF?F$"} - # - # The next rule uses the OCIO v1 method of searching the path for all colorspaces in the config. - # -# - ! {name: ColorSpaceNamePathSearch} + - ! {name: ACES, colorspace: ACES, regex: "aces|ACES"} # # The rules are ordered, highest priority first. OCIO takes the path to a file and applies # the rules one-by-one until there is a match. The last rule, "Default", always matches. @@ -72,287 +63,11 @@ file_rules: # - ! {name: Default, colorspace: default} -# -# The Viewing Rules allow applications to determine an appropriate default view for a given color -# space. This becomes important for applications that need to display images in a variety of color -# spaces. For example, an ACES Output Transform might be the ideal view for scene-linear or log -# encoded color spaces but not be appropriate for video color spaces. In OCIO v2, there is a new -# getView function that takes a display and a color space as arguments. OCIO uses the viewing rules -# (if present) to filter the list of views to those that are appropriate for the given color space. -# The rules shown here mostly use the new "encoding" property of color spaces but it is also possible -# for a rule to list color spaces directly. Any views that do not use a rule are always returned. -# The active_views list may be used to also sort the filtered views (or do further filtering). -# -viewing_rules: - # - # The first rule means the view will only be used with colorspaces that have an encoding set - # to "scene-linear". - # - - ! {name: scene-linear, encodings: scene-linear} - # - # The next rule is similar but is targeted at colorspaces that have an encoding of "data". - # - - ! {name: data, encodings: data} - # - # The next rule targets colorspaces that have an encoding of either "log" or "scene-linear". - # - - ! {name: log-or-linear, encodings: [ log, scene-linear ]} - # - # The next rule targets colorspaces that have an encoding of either "sdr-video" or "hdr-video". - # - - ! {name: video, encodings: [ sdr-video, hdr-video ]} - # - # The next rule is not used below but is an example of how a rule could target specific colorspaces. - # - - ! {name: film-log, colorspaces: Log film scan (ADX10)} - - -# -# The Shared Views allow you to define a view that will be reused for multiple displays. -# This can make the config easier to read and maintain. -# -shared_views: - # - # The first two shared views, "Log" and "Raw" have no actual dependence on the display, so they - # simply specify the colorspace that will be used to apply the view. - # - # Note that if the application implements support for viewing rules, the Log view will only be - # used with scene-linear colorspaces (it is typically of no value for colorspaces that are already - # logarithmic or that are video or data), and the Raw view will only be used with data colorspaces. - # (Simply removing the rule from the Raw view would make it be offered with all colorspaces, which - # might be preferred in some scenarios.) - # - - ! {name: Log, colorspace: ACEScct, rule: scene-linear} - - ! {name: Raw, colorspace: Raw, rule: data} - # - # The next shared views use a view_transform and display_colorspace rather than a simple colorspace - # because the view does depend on the display. By setting display_colorspace to "", - # the display_colorspace will be replaced by the display colorspace below that has the same name as - # the display. For example, when used with display "sRGB", the display_colorspace is set to "sRGB". - # - - ! - name: ACES 1.0 SDR-video - view_transform: ACES 1.0 SDR-video - display_colorspace: - rule: log-or-linear - # - # Note that YAML syntax allows views to be split onto multiple lines to make them easier to read. - # - # The ordering within the shared_views section is not significant. It is the order they appear - # below that determines the menu order (although active_views may be used to re-order them). - # - - ! - name: Un-tone-mapped - view_transform: Un-tone-mapped - display_colorspace: - rule: log-or-linear - # - # The "Un-tone-mapped" and "Video" views are functionally equivalent but the viewing rules allow - # different names to be used based on the colorspace being viewed. For example, when viewing - # video images, it's nicer to have a view called "Video" rather than "Un-tone-mapped" (the latter - # really only makes sense in the context of scene-referred images). - # - - ! - name: Video - view_transform: Un-tone-mapped - display_colorspace: - rule: video - - -# -# Displays -# displays: - # - # The first displays simply reference the shared views defined above. The ordering of the views - # determines the menu order (unless active_views is used to re-order them). - # - sRGB: - - ! [ ACES 1.0 SDR-video, Un-tone-mapped, Log, Video, Raw ] - Rec.1886 / Rec.709 video: - - ! [ ACES 1.0 SDR-video, Un-tone-mapped, Log, Video, Raw ] - # - # The next display uses a (non-shared) view as well as shared views. - # - Rec.2100-PQ: - - ! - name: ACES 1.1 HDR-video (1000 nits) - view_transform: ACES 1.1 HDR-video (1000 nits & Rec.2020 lim) - display_colorspace: Rec.2100-PQ - rule: log-or-linear - - ! [ Un-tone-mapped, Log, Video, Raw ] - - -# -# A Virtual Display allows an application to ask OCIO to instantiate a new display from an ICC -# monitor profile. The ICC monitor profile essentially becomes a new display colorspace and a -# new display is added for users, named after the ICC profile. The new display will inherit the -# views from the virtual display. -# -virtual_display: - - ! [ ACES 1.0 SDR-video, Un-tone-mapped, Log, Raw ] - - -# -# The default view transform is the one that will be used if ColorSpaceTransform needs to convert -# between a colorspace and a display colorspace. (In other words, one that uses the scene-referred -# reference space and one that uses the display-referred reference space.) -# -default_view_transform: Un-tone-mapped - -# -# This section of the config defines the View Transforms. A View Transform is a transform that -# converts between the scene-referred reference space and the display-referred reference space -# (which is new in OCIO v2). The View Transform is sometimes referred to by other names in -# various color science documents. For example, in ACES it is called a "rendering" and in the -# ITU standards for HDR television it is called an Opto-Optical Transfer Function (OOTF). It -# is also commonly referred to as a "tone-map". This is typically where the S-shape curve that -# avoids clipped highlights is applied, along with other adjustments necessary to adopt the -# latest color science best-practices. -# -view_transforms: - # - # This first view transform is simply a matrix to convert from the scene-referred reference space, - # which is ACES2065-1 in this config, to the display-referred reference space, which is CIE XYZ - # with a D65 adaptive whitepoint in this config. Rather than put the matrix coefficients in the - # config, it is easier to reference one of the existing BuiltinTransforms. A BuiltinTransform is - # another new OCIO v2 feature, it is essentially a well-known transform that OCIO knows how to - # construct at runtime. - # - - ! - name: Un-tone-mapped - description: | - Convert the scene colorimetry directly to display-referred with no tone-mapping. - This is often described as a "linear workflow." It is intended only for diagnostic purposes. - from_scene_reference: ! {style: "UTILITY - ACES-AP0_to_CIE-XYZ-D65_BFD"} - # - # The next view transform implements the bulk of the ACES Output Transform for SDR video. In ACES, - # the transform from scene-referred colorimetry to display-referred colorimetry is identical for - # a set of Output Transforms (e.g., sRGB and Rec.709). Only the final conversion from display - # colorimetry to display code values differs. That last part is implemented in OCIO as a display - # colorspace. The BuiltinTransform here applies the RRT and first half of the ODT. There are - # Builtins available in OCIO for all of the ACES Output Transforms (though for brevity only two - # of them are included in this demo config). - # - - ! - name: ACES 1.0 SDR-video - description: | - ACES Output Transform for SDR displays in a video viewing environment. ACES neutrals are at D65. - from_scene_reference: ! {style: "ACES-OUTPUT - ACES2065-1_to_CIE-XYZ-D65 - SDR-VIDEO_1.0"} - # - # The next view transform is very similar, implementing the bulk of the ACES Output Transform for - # 1000 nit HDR video. The output transform is completed via the addition of an HDR display colorspace - # defined below. - # - - ! - name: ACES 1.1 HDR-video (1000 nits & Rec.2020 lim) - description: | - ACES Output Transform for 1000 nit HDR displays. ACES neutrals are at D65. Gamut limit uses Rec.2020 primaries. - from_scene_reference: ! {style: "ACES-OUTPUT - ACES2065-1_to_CIE-XYZ-D65 - HDR-VIDEO-1000nit-15nit-REC2020lim_1.1"} - -# -# Looks -# -looks: - - - ! - name: ACES-LMT - Blue light artifact fix - description: | - LMT for desaturating blue hues to reduce clipping artifacts - process_space: ACES2065-1 - transform: ! {style: "ACES-LMT - BLUE_LIGHT_ARTIFACT_FIX"} - - -# -# The inactive colorspace list is another new OCIO v2 feature. It allows you to include colorspaces -# in the config but hide them from user menus. In this case, we want this colorspace in the config -# for use in the cie_xyz_d65_interchange role above, but we don't want users to be able to select it. -# Note that you may override the inactive list via an environment variable. -# -inactive_colorspaces: [ CIE-XYZ D65 ] - -# -# The Display Colorspaces are another new OCIO v2 feature. These are like traditional colorspaces -# but are defined in relation to a display-referred reference space rather than a scene-referred space. -# One of the benefits of this is that a ColorSpaceTransform may now convert between a pair of display -# colorspaces (e.g., from Rec.709 to sRGB) without needing to invert a tone-map all the way back to -# the scene-referred reference space. -# -display_colorspaces: - # - # The display-referred reference space for this config is CIE XYZ tristimulus values (colorimetry) - # with an adaptive white point of D65. As with the scene-referred reference space, no transforms - # are defined for it. - # - # This colorspace does not need to be exposed to users so it is in the inactive_colorspaces list - # above. Also, it does not have any categories, which also means it would not be exposed to users - # in applications that support categories. - # - - ! - name: CIE-XYZ D65 - family: - description: | - Display connection space, CIE XYZ with D65 adaptive white point - encoding: display-linear - isdata: false - categories: - # - # The next display colorspace is for sRGB. It simply applies a matrix and a gamma to convert from - # the desired display colorimetry (in CIE XYZ space) to display code values that may be sent to a - # monitor. Note that display colorspaces use the YAML keys "from_display_reference" and - # "to_display_reference" to specify their transforms. - # - - ! - name: sRGB - family: Displays/SDR - description: | - sRGB monitor (piecewise EOTF) - isdata: false - categories: [ file-io, basic-3d, advanced-3d, basic-2d, advanced-2d ] - encoding: sdr-video - from_display_reference: ! - children: - - ! {matrix: [ 3.240969941905, -1.537383177570, -0.498610760293, 0, -0.969243636281, 1.875967501508, 0.041555057407, 0, 0.055630079697, -0.203976958889, 1.056971514243, 0, 0, 0, 0, 1 ]} - - ! {gamma: 2.4, offset: 0.055, direction: inverse} - - ! {min_in_value: 0., min_out_value: 0., max_in_value: 1., max_out_value: 1.} - # - # For the purposes of the demo, the preceding and following colorspaces are implemented - # explicitly, but they could also have been implemented using BuiltinTransforms as: - # - ! {style: "DISPLAY - CIE-XYZ-D65_to_sRGB"} - # - ! {style: "DISPLAY - CIE-XYZ-D65_to_REC.1886-REC.709"} - # - - ! - name: Rec.1886 / Rec.709 video - aliases: [ rec709 ] - family: Displays/SDR - description: | - Rec.709 HD broadcast monitor with Rec.1886 EOTF (gamma 2.4) - isdata: false - categories: [ file-io, basic-3d, advanced-3d, basic-2d, advanced-2d ] - encoding: sdr-video - from_display_reference: ! - children: - - ! {matrix: [ 3.240969941905, -1.537383177570, -0.498610760293, 0, -0.969243636281, 1.875967501508, 0.041555057407, 0, 0.055630079697, -0.203976958889, 1.056971514243, 0, 0, 0, 0, 1 ]} - - ! {value: 2.4, direction: inverse} - - ! {min_in_value: 0., min_out_value: 0., max_in_value: 1., max_out_value: 1.} - # - # This next colorspace requires the PQ curve, which would require an external LUT file so the - # BuiltinTransform is used in this case. Note that the Builtin display transforms do not clamp, - # so it is followed by a RangeTransform which clamps to [0,1]. - # - - ! - name: Rec.2100-PQ - family: Displays/HDR - description: | - Rec.2100-PQ monitor with Rec.2020 primaries and ST-2084 EOTF - isdata: false - categories: [ file-io, advanced-3d, basic-2d, advanced-2d ] - encoding: hdr-video - from_display_reference: ! - children: - - ! {style: "DISPLAY - CIE-XYZ-D65_to_REC.2100-PQ"} - - ! {min_in_value: 0., min_out_value: 0., max_in_value: 1., max_out_value: 1.} - + linear: + - ! {name: Lin, colorspace: ACEScg} + log: + - ! {name: Log, colorspace: sRGB} # # The next config section is the traditional section for colorspaces that are defined relative to a @@ -376,15 +91,6 @@ colorspaces: # list of categories, so it will be up to application developers and config authors to determine # what strings to use. OCIO does however provide a specific list of allowed encoding strings. # - - ! - name: ACEScg - family: ACES - description: | - ACEScg working space - isdata: false - categories: [ file-io, working-space, basic-3d, advanced-3d, basic-2d, advanced-2d ] - encoding: scene-linear - to_scene_reference: ! {matrix: [ 0.695452241357, 0.140678696470, 0.163869062172, 0, 0.044794563372, 0.859671118456, 0.095534318172, 0, -0.005525882558, 0.004025210306, 1.001500672252, 0, 0, 0, 0, 1 ]} # # OCIO v2 introduces an "aliases" property that may be used to define synonyms for the canonical # colorspace name. This may be used to define short names that are easier to embed in file paths @@ -399,11 +105,17 @@ colorspaces: isdata: false categories: [ file-io, basic-3d, advanced-3d, basic-2d, advanced-2d ] encoding: scene-linear - # - # Note that this section of the config uses "to_scene_reference" and "from_scene_reference" to - # specify the transforms, but "to_reference" and "from_reference" are also allowed for backwards - # compatibility with OCIO v1. - # + + - ! + name: ACEScg + family: ACES + description: | + ACEScg working space + isdata: false + categories: [ file-io, working-space, basic-3d, advanced-3d, basic-2d, advanced-2d ] + encoding: scene-linear + to_scene_reference: ! {style: ACEScg_to_ACES2065-1} + - ! name: scene-linear Rec.709-sRGB family: Linear @@ -413,122 +125,20 @@ colorspaces: categories: [ file-io, basic-3d, advanced-3d, advanced-2d ] encoding: scene-linear to_scene_reference: ! {matrix: [ 0.439632981919, 0.382988698152, 0.177378319929, 0, 0.089776442959, 0.813439428749, 0.096784128292, 0, 0.017541170383, 0.111546553302, 0.870912276314, 0, 0, 0, 0, 1 ]} - # - # Note that in OCIO v2 it is not necessary to include most keys if they have their default values. - # This also applies to properties such as the interpolation method for FileTransforms. - # - - ! - name: Raw - family: Data - description: | - Raw (no color processing) - isdata: true - categories: [ file-io, basic-3d, advanced-3d, basic-2d, advanced-2d ] - encoding: data - # - # The ACEScct transform could be implemented as a Builtin using style: "ACEScct_to_ACES2065-1", - # but the implementation here is an opportunity to demo the new LogCameraTransform, which may - # be used to implement most of the camera-log type transforms (and is used internally by the - # ACEScct BuiltinTransform implementation). - # - - ! - name: ACEScct - family: ACES - description: | - ACES camera log working space - isdata: false - categories: [ file-io, working-space, advanced-3d, basic-2d, advanced-2d ] - encoding: log - to_scene_reference: ! - children: - - ! - log_side_slope: 0.05707762557077626 - log_side_offset: 0.55479452054794520 - lin_side_slope: 1. - lin_side_offset: 0. - lin_side_break: 0.0078125 - base: 2 - direction: inverse - - ! {matrix: [ 0.695452241357, 0.140678696470, 0.163869062172, 0, 0.044794563372, 0.859671118456, 0.095534318172, 0, -0.005525882558, 0.004025210306, 1.001500672252, 0, 0, 0, 0, 1 ]} - # - # The remaining colorspaces use the BuiltinTransforms for simplicity and readability. - # - - ! - name: ACEScc - family: ACES - description: | - ACES log working space - isdata: false - categories: [ file-io, advanced-2d ] - encoding: log - to_scene_reference: ! {style: "ACEScc_to_ACES2065-1"} - - - ! - name: ARRI LogC - family: Cameras/ARRI - description: | - Alexa-v3-LogC-EI800 (SUP v3 color science) - isdata: false - categories: [ file-io, advanced-3d, basic-2d, advanced-2d ] - encoding: log - to_scene_reference: ! {style: "ARRI_ALEXA-LOGC-EI800-AWG_to_ACES2065-1"} - ! - name: RED Log3G10 / REDWideGamutRGB - family: Cameras/RED - description: | - RED Log3G10 / REDWideGamutRGB - isdata: false - categories: [ file-io, basic-2d, advanced-2d ] - encoding: log - to_scene_reference: ! {style: "RED_LOG3G10-RWG_to_ACES2065-1"} - - - ! - name: Sony SLog3 / SGamut3 - family: Cameras/Sony - description: | - Sony SLog3 / SGamut3 - isdata: false - categories: [ file-io, basic-2d, advanced-2d ] - encoding: log - to_scene_reference: ! {style: "SONY_SLOG3-SGAMUT3_to_ACES2065-1"} - - - ! - name: Log film scan (ADX10) - aliases: [ ADX10 ] - family: ACES + name: sRGB + family: "" + bitdepth: 32f description: | - ADX10 Academy Density Exchange (10-bit printing density) + Convert ACES2065-1 to sRGB + CLFtransformID: urn:aswf:ocio:transformId:1.0:OCIO:Utility:AP0_to_Rec709-sRGB:1.0 isdata: false - categories: [ file-io, advanced-2d ] - encoding: log - to_scene_reference: ! {style: "ADX10_to_ACES2065-1"} - - -# -# Sometimes it is helpful to include one or more transforms in a config that are essentially -# stand-alone transforms that do not have a fixed relationship to a reference space or a -# process space. An example would be a "utility curve" transform where the intent is to -# simply apply a LUT1D without any conversion to a reference space. In these cases, a -# named_transforms section may be added to the config with one or more named transforms. -# -# Note that named transforms do not show up in color space menus by default, so the -# application developer must implement support to make them available to users. -# -# This feature may be used to emulate older methods of color management that ignored the -# RGB primaries and simply applied one-dimensional transformations. However, config authors -# are encouraged to implement transforms as normal OCIO color spaces wherever possible. -# -named_transforms: - - - ! - name: Utility Curve -- Cineon Log to Lin - description: | - Traditional Cineon-style log-to-lin with RefWhite=695, RefBlack=95, Gamma=0.6 - transform: ! - log_side_slope: 0.293255131965 - log_side_offset: 0.669599217986 - lin_side_slope: 0.989202248377 - lin_side_offset: 0.010797751623 - base: 10 - direction: inverse \ No newline at end of file + categories: [file-io] + encoding: sdr-video + allocation: uniform + from_scene_reference: ! + name: AP0 to Rec.709 - sRGB + children: + - ! {matrix: [2.52140088857822, -1.13399574938275, -0.387561856768867, 0, -0.276214061561748, 1.37259556630409, -0.0962823557364663, 0, -0.0153202000774786, -0.152992561800699, 1.16838719961932, 0, 0, 0, 0, 1]} + - ! {gamma: 2.4, offset: 0.055, direction: inverse}