# OpenColorIO configuration file for Blender
#
# Based on aces, nuke-default and spi configurations from OpenColorIO-Config
#
# Filmic Dynamic Range LUT configuration crafted by Troy James Sobotka with
# special thanks and feedback from Guillermo, Claudio Rocha, Bassam Kurdali,
# Eugenio Pignataro, Henri Hebeisen, Jason Clarke, Haarm-Peter Duiker, Thomas
# Mansencal, and Timothy Lottes.
#
# See ocio-license.txt for details.

ocio_profile_version: 2

search_path: "luts:filmic"
strictparsing: true
luma: [0.2126, 0.7152, 0.0722]

description: RRT version ut33

roles:
  reference: Linear

  # Internal scene linear space
  scene_linear: Linear
  rendering: Linear

  # Default color space for byte image
  default_byte: sRGB

  # Default color space for float images
  default_float: Linear

  # Default color space sequencer is working in
  default_sequencer: sRGB

  # Distribution of colors in color picker
  color_picking: sRGB

  # Non-color data
  data: Non-Color

  # For interop between configs, and to determine XYZ for rendering
  aces_interchange: Linear ACES

  # Specified by OCIO, not used in Blender
  color_timing: Filmic Log
  compositing_log: Filmic Log
  default: Linear
  matte_paint: Linear
  texture_paint: Linear

displays:
  sRGB:
    - !<View> {name: Standard, colorspace: sRGB}
    - !<View> {name: Filmic, colorspace: Filmic sRGB}
    - !<View> {name: Filmic Log, colorspace: Filmic Log}
    - !<View> {name: Raw, colorspace: Raw}
    - !<View> {name: False Color, colorspace: False Color}
  XYZ:
    - !<View> {name: Standard, colorspace: XYZ}
    - !<View> {name: DCI, colorspace: dci_xyz}
    - !<View> {name: Raw, colorspace: Raw}
  None:
    - !<View> {name: Standard, colorspace: Raw}

active_displays: [sRGB, XYZ, None]
active_views: [Standard, Filmic, Filmic Log, Raw, False Color]

colorspaces:
  - !<ColorSpace>
    name: Linear
    family: linear
    equalitygroup:
    bitdepth: 32f
    description: |
      Rec. 709 (Full Range), Blender native linear space
    isdata: false

  - !<ColorSpace>
    name: Raw
    family: raw
    equalitygroup:
    bitdepth: 32f
    isdata: true

  - !<ColorSpace>
    name: Linear ACES
    family: linear
    equalitygroup:
    bitdepth: 32f
    description: |
      ACES2065-1 linear space
    isdata: false
    from_reference: !<GroupTransform>
      children:
        - !<FileTransform> {src: srgb_to_xyz.spimtx, interpolation: linear}
        - !<BuiltinTransform> {style: "UTILITY - ACES-AP0_to_CIE-XYZ-D65_BFD", direction: inverse}

  - !<ColorSpace>
    name: Linear ACEScg
    family: linear
    equalitygroup:
    bitdepth: 32f
    description: |
      ACEScg linear space
    isdata: false
    from_reference: !<GroupTransform>
      children:
        - !<FileTransform> {src: srgb_to_xyz.spimtx, interpolation: linear}
        - !<BuiltinTransform> {style: "UTILITY - ACES-AP1_to_CIE-XYZ-D65_BFD", direction: inverse}

  - !<ColorSpace>
    name: nuke_rec709
    family: display
    equalitygroup:
    bitdepth: 32f
    description: |
      Rec. 709 (Full Range) Display Space
    isdata: false
    to_reference: !<GroupTransform>
      children:
        - !<FileTransform> {src: rec709.spi1d, interpolation: linear}

  - !<ColorSpace>
    name: XYZ
    family: linear
    equalitygroup:
    bitdepth: 32f
    isdata: false
    from_reference: !<GroupTransform>
      children:
        - !<FileTransform> {src: srgb_to_xyz.spimtx, interpolation: linear}

  - !<ColorSpace>
    name: dci_xyz
    family: display
    equalitygroup:
    bitdepth: 16f
    description: |
      OpenDCP output LUT with DCI reference white and Gamma 2.6
    isdata: false
    from_reference: !<GroupTransform>
      children:
        - !<FileTransform> {src: srgb_to_xyz.spimtx, interpolation: linear}
        - !<FileTransform> {src: dci_xyz.spi1d, interpolation: linear}

  - !<ColorSpace>
    name: lg10
    family: display
    equalitygroup:
    bitdepth: 10ui
    description: |
      conversion from film log
    isdata: false
    to_reference: !<GroupTransform>
      children:
        - !<FileTransform> {src: lg10.spi1d, interpolation: nearest}

  - !<ColorSpace>
    name: sRGB
    family:
    equalitygroup:
    bitdepth: 32f
    description: |
      sRGB display space
    isdata: false
    to_reference: !<FileTransform> {src: srgb.spi1d, interpolation: linear}
    from_reference: !<FileTransform> {src: srgb_inv.spi1d, interpolation: linear}

  - !<ColorSpace>
    name: Non-Color
    family: raw
    description: |
        Color space used for images which contains non-color data (i.e. normal maps)
    equalitygroup:
    bitdepth: 32f
    isdata: true

  - !<ColorSpace>
    name: Filmic Log
    family: log
    equalitygroup:
    bitdepth: 32f
    description: |
      Log based filmic shaper with 16.5 stops of latitude, and 25 stops of dynamic range
    isdata: false
    from_reference: !<GroupTransform>
        children:
            - !<AllocationTransform> {allocation: lg2, vars: [-12.473931188, 12.526068812]}
            - !<FileTransform> {src: filmic_desat65cube.spi3d, interpolation: best}
            - !<AllocationTransform> {allocation: uniform, vars: [0, 0.66]}
    to_reference: !<AllocationTransform> {allocation: lg2, vars: [-12.473931188, 4.026068812], direction: inverse}

  - !<ColorSpace>
    name: Filmic sRGB
    family:
    equalitygroup:
    bitdepth: 32f
    description: |
      sRGB display space with Filmic view transform
    isdata: false
    from_reference: !<GroupTransform>
        children:
            - !<ColorSpaceTransform> {src: Linear, dst: Filmic Log}
            - !<FileTransform> {src: filmic_to_0-70_1-03.spi1d, interpolation: linear}

  - !<ColorSpace>
    name: False Color
    family: display
    equalitygroup:
    bitdepth: 32f
    description: |
      Filmic false color view transform
    isdata: false
    from_reference: !<GroupTransform>
        children:
            - !<ColorSpaceTransform> {src: Linear, dst: Filmic Log}
            - !<MatrixTransform> {matrix: [0.2126729, 0.7151521, 0.0721750, 0, 0.2126729, 0.7151521, 0.0721750, 0, 0.2126729, 0.7151521, 0.0721750, 0, 0, 0, 0, 1]}
            - !<FileTransform> {src: filmic_false_color.spi3d, interpolation: best}
looks:
  - !<Look>
    name: Very High Contrast
    process_space: Filmic Log
    transform: !<GroupTransform>
        children:
            - !<FileTransform> {src: filmic_to_1.20_1-00.spi1d, interpolation: linear}
            - !<FileTransform> {src: filmic_to_0-70_1-03.spi1d, interpolation: linear, direction: inverse}

  - !<Look>
    name: High Contrast
    process_space: Filmic Log
    transform: !<GroupTransform>
        children:
            - !<FileTransform> {src: filmic_to_0.99_1-0075.spi1d, interpolation: linear}
            - !<FileTransform> {src: filmic_to_0-70_1-03.spi1d, interpolation: linear, direction: inverse}

  - !<Look>
    name: Medium High Contrast
    process_space: Filmic Log
    transform: !<GroupTransform>
        children:
            - !<FileTransform> {src: filmic_to_0-85_1-011.spi1d, interpolation: best}
            - !<FileTransform> {src: filmic_to_0-70_1-03.spi1d, interpolation: linear, direction: inverse}

  - !<Look>
    name: Medium Contrast
    process_space: Filmic Log
    transform: !<GroupTransform>
        children:

  - !<Look>
    name: Medium Low Contrast
    process_space: Filmic Log
    transform: !<GroupTransform>
        children:
            - !<FileTransform> {src: filmic_to_0-60_1-04.spi1d, interpolation: linear}
            - !<FileTransform> {src: filmic_to_0-70_1-03.spi1d, interpolation: linear, direction: inverse}

  - !<Look>
    name: Low Contrast
    process_space: Filmic Log
    transform: !<GroupTransform>
        children:
            - !<FileTransform> {src: filmic_to_0-48_1-09.spi1d, interpolation: linear}
            - !<FileTransform> {src: filmic_to_0-70_1-03.spi1d, interpolation: linear, direction: inverse}

  - !<Look>
    name: Very Low Contrast
    process_space: Filmic Log
    transform: !<GroupTransform>
        children:
            - !<FileTransform> {src: filmic_to_0-35_1-30.spi1d, interpolation: linear}
            - !<FileTransform> {src: filmic_to_0-70_1-03.spi1d, interpolation: linear, direction: inverse}
