# Film Emulsion-like configuration for
# Blender. Crafted by Troy James Sobotka with
# special thanks, feedback, and knowledge from Guillermo
# Espertino, Claudio Rocha, Bassam Kurdali, Eugenio
# Pignataro, Henri Hebeisen, Jason Clarke,
# Haarm-Peter Duiker, Thomas Mansencal, Andrew
# Price, Nick Shaw, and Timothy
# Lottes.

ocio_profile_version: 2

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

description: A filmlike dynamic range encoding set for Blender

roles:
  default: Rec.709 OETF
  reference: Linear
  scene_linear: Linear
  data: Non-Colour Data
  compositing_log: Filmic Log Encoding
  color_timing: Filmic Log Encoding
  default_byte: sRGB OETF
  default_float: Linear
  default_sequencer: sRGB OETF
  color_picking: sRGB OETF
  texture_paint: sRGB OETF
  matte_paint: Filmic Log Encoding
  cie_xyz_d65_interchange: CIE-XYZ D65

displays:
  sRGB:
    - !<View> {name: sRGB OETF, colorspace: sRGB OETF}
    - !<View> {name: Non-Colour Data, colorspace: Non-Colour Data}
    - !<View> {name: Linear Raw, colorspace: Linear}
    - !<View> {name: Filmic Log Encoding Base, colorspace: Filmic Log Encoding}
  BT.1886:
    - !<View> {name: BT.1886 EOTF, colorspace: BT.1886 EOTF}
    - !<View> {name: Non-Colour Data, colorspace: Non-Colour Data}
    - !<View> {name: Linear Raw, colorspace: Linear}
    - !<View> {name: Filmic Log Encoding Base, colorspace: BT.1886 Filmic Log Encoding}
  Apple Display P3:
    - !<View> {name: sRGB OETF, colorspace: AppleP3 sRGB OETF}
    - !<View> {name: Non-Colour Data, colorspace: Non-Colour Data}
    - !<View> {name: Linear Raw, colorspace: Linear}
    - !<View> {name: Filmic Log Encoding Base, colorspace: AppleP3 Filmic Log Encoding}

active_displays: [sRGB, BT.1886, Apple Display P3, None]
#active_views: [Filmic Log Encoding Base, sRGB OETF, Non-Colour Data, Linear Raw, No View]

inactive_colorspaces: [CIE-XYZ D65]

colorspaces:
  - !<ColorSpace>
    name: Linear
    family:
    equalitygroup:
    bitdepth: 32f
    description: |
      ITU BT.709 primaries based scene referred linear space.
    isdata: false
    allocation: lg2
    allocationvars: [-12.4739311883, 12.5260688117, 0.00392156862]

  - !<ColorSpace>
    name: CIE-XYZ D65
    family: display
    equalitygroup: ""
    bitdepth: 32f
    description: |
      Linear CIE XYZ space with D65 white point
    isdata: false
    allocation: lg2
    allocationvars: [-12.4739311883, 12.5260688117, 0.00392156862]
    to_reference: !<GroupTransform>
      children:
        - !<MatrixTransform> {matrix: [0.4124,  0.3576,  0.1805, 0, 0.2126,  0.7152,  0.0722, 0, 0.0193,  0.1192,  0.9505, 0, 0, 0, 0, 1], direction: inverse}

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

  - !<ColorSpace>
    name: sRGB OETF
    family:
    equalitygroup:
    bitdepth: 32f
    description: |
      sRGB specification display referred Optical-Electro Transfer Function.
    isdata: false
    allocation: uniform
    allocationvars: [0.0, 1.0]
    to_reference: !<FileTransform> {src: sRGB_OETF_to_Linear.spi1d, interpolation: linear}

  - !<ColorSpace>
    name: Apple DCI-P3 D65
    family: display
    equalitygroup: ""
    bitdepth: 32f
    isdata: false
    allocation: lg2
    allocationvars: [-12.4739311883, 12.5260688117, 0.00392156862]
    to_reference: !<GroupTransform>
      children:
        - !<MatrixTransform> {matrix: [0.515121, 0.291977, 0.157104, 0, 0.241196, 0.692245, 0.0665741, 0, -0.00105286, 0.0418854, 0.784073, 0, 0, 0, 0, 1]}
        - !<MatrixTransform> {matrix: [1.04788, 0.0229187, -0.0502014, 0, 0.0295868, 0.990479, -0.0170593, 0, -0.00923157, 0.0150757, 0.751678, 0, 0, 0, 0, 1], direction: inverse}
        - !<MatrixTransform> {matrix: [0.412391, 0.357584, 0.180481, 0, 0.212639, 0.715169, 0.0721923, 0, 0.0193308, 0.119195, 0.950532, 0, 0, 0, 0, 1], direction: inverse}

  - !<ColorSpace>
    name: AppleP3 sRGB OETF
    family:
    equalitygroup:
    bitdepth: 32f
    description: |
      sRGB specification display referred Optical-Electro Transfer Function with Apple DCI-P3 primaries.
    isdata: false
    allocation: uniform
    allocationvars: [0.0, 1.0]
    to_reference: !<GroupTransform>
      children:
        - !<FileTransform> {src: sRGB_OETF_to_Linear.spi1d, interpolation: linear}
        - !<ColorSpaceTransform> {src: Apple DCI-P3 D65, dst: Linear}

  - !<ColorSpace>
    name: BT.1886 EOTF
    family:
    equalitygroup:
    bitdepth: 32f
    description: |
      BT.1886 specification display referred Electro-Optical Transfer Function with REC.709 primaries.
    isdata: false
    allocation: uniform
    allocationvars: [0.0, 1.0]
    to_reference: !<ExponentTransform> {value: [2.4, 2.4, 2.4, 1.0]}

  - !<ColorSpace>
    name: AppleP3 Filmic Log Encoding
    family:
    equalitygroup:
    bitdepth: 32f
    description: |
      Log based filmic shaper with 16.5 stops of latitude, and 25 stops of dynamic range with Apple P3 primaries.
    isdata: false
    allocation: lg2
    allocationvars: [-12.4739311883, 12.5260688117, 0.00392156862]
    from_reference: !<GroupTransform>
        children:
          - !<ColorSpaceTransform> {src: Linear, dst: Filmic Log Encoding}
          - !<ExponentTransform> {value: [2.2, 2.2, 2.2, 1.0]}
          - !<ColorSpaceTransform> {src: Linear, dst: Apple DCI-P3 D65}
          - !<ExponentTransform> {value: [2.2, 2.2, 2.2, 1.0], direction: inverse}
    to_reference: !<GroupTransform>
        children:
          - !<ExponentTransform> {value: [2.2, 2.2, 2.2, 1.0]}
          - !<ColorSpaceTransform> {src: Apple DCI-P3 D65, dst: Linear}
          - !<ExponentTransform> {value: [2.2, 2.2, 2.2, 1.0], direction: inverse}
          - !<AllocationTransform> {allocation: lg2, vars: [-12.4739311883, 4.02606881167, 0.00392156862], direction: inverse}

  - !<ColorSpace>
    name: BT.1886 Filmic Log Encoding
    family:
    equalitygroup:
    bitdepth: 32f
    description: |
      Log based filmic shaper with 16.5 stops of latitude, and 25 stops of dynamic range with REC.709 primaries.
    isdata: false
    allocation: lg2
    allocationvars: [-12.4739311883, 12.5260688117, 0.00392156862]
    from_reference: !<GroupTransform>
        children:
          - !<ColorSpaceTransform> {src: Linear, dst: Filmic Log Encoding}
          - !<ExponentTransform> {value: [2.2, 2.2, 2.2, 1.0]}
          - !<ExponentTransform> {value: [2.4, 2.4, 2.4, 1.0], direction: inverse}
    to_reference: !<GroupTransform>
        children:
          - !<ExponentTransform> {value: [2.4, 2.4, 2.4, 1.0]}
          - !<ExponentTransform> {value: [2.2, 2.2, 2.2, 1.0], direction: inverse}
          - !<AllocationTransform> {allocation: lg2, vars: [-12.4739311883, 4.02606881167, 0.00392156862], direction: inverse}

  - !<ColorSpace>
    name: Fuji F-Log OETF
    family: Camera Footage
    equalitygroup: ""
    bitdepth: 32f
    description: |
      Fuji F-Log transfer function
    isdata: false
    allocation: uniform
    allocationvars: [0, 1]
    to_reference: !<FileTransform> {src: F-Log_to_Linear.spi1d, interpolation: linear}

  - !<ColorSpace>
    name: Fuji F-Log F-Gamut
    family: ""
    equalitygroup: ""
    bitdepth: 32f
    description: |
      Fuji F-Log / F-Gamut
    isdata: false
    allocation: uniform
    allocationvars: [0, 1]
    to_reference: !<GroupTransform>
      children:
        - !<ColorSpaceTransform> {src: Fuji F-Log OETF, dst: Linear}
        - !<MatrixTransform> {matrix: [0.636958048000, 0.144616904000, 0.168880975000, 0.000000000000, 0.262700212000, 0.677998072000, 0.059301716500, 0.000000000000, 4.994106570E-17, 0.028072693000, 1.060985060000, 0.000000000000, 0.000000000000, 0.000000000000, 0.000000000000, 1.000000000000]}
        - !<MatrixTransform> {matrix: [0.412390800000, 0.357584340000, 0.180480790000, 0.000000000000, 0.212639010000, 0.715168680000, 0.072192320000, 0.000000000000, 0.019330820000, 0.119194780000, 0.950532150000, 0.000000000000, 0.000000000000, 0.000000000000, 0.000000000000, 1.000000000000], direction: inverse}

  - !<ColorSpace>
    name: Panasonic V-Log V-Gamut
    family: Camera Footage
    equalitygroup: ""
    bitdepth: 32f
    description: |
      Panasonic V-Log / V-Gamut
    isdata: false
    allocation: uniform
    allocationvars: [0, 1]
    to_reference: !<GroupTransform>
      children:
        - !<FileTransform> {src: V-Log_to_linear.spi1d, interpolation: linear}
        - !<MatrixTransform> {matrix: [1.806576, -0.695697, -0.110879, 0, -0.170090 , 1.305955, -0.135865, 0, -0.025206, -0.154468, 1.179674, 0, 0, 0, 0, 1]}

  - !<ColorSpace>
    name: Arri Wide Gamut / LogC EI 800
    family: Camera Footage
    equalitygroup: ""
    bitdepth: 32f
    description: |
      Panasonic V-Log / V-Gamut
    isdata: false
    allocation: uniform
    allocationvars: [0, 1]
    to_reference: !<GroupTransform>
      children:
        - !<FileTransform> {src: V3_LogC_800_to_linear.spi1d, interpolation: linear}
        - !<MatrixTransform> {matrix: [1.617523, -0.537287, -0.080237, 0, -0.070573, 1.334613, -0.26404, 0, -0.021102, -0.226954, 1.248056, 0, 0, 0, 0, 1]}

  - !<ColorSpace>
    name: Arri Wide Gamut / LogC EI 400
    family: Camera Footage
    equalitygroup: ""
    bitdepth: 32f
    description: |
      Panasonic V-Log / V-Gamut
    isdata: false
    allocation: uniform
    allocationvars: [0, 1]
    to_reference: !<GroupTransform>
      children:
        - !<FileTransform> {src: V3_LogC_400_to_linear.spi1d, interpolation: linear}
        - !<MatrixTransform> {matrix: [1.617523, -0.537287, -0.080237, 0, -0.070573, 1.334613, -0.26404, 0, -0.021102, -0.226954, 1.248056, 0, 0, 0, 0, 1]}

  - !<ColorSpace>
    name: Arri Wide Gamut 4/ LogC4
    family: Camera Footage
    equalitygroup: ""
    bitdepth: 32f
    description: |
      Arri Wide Gamut 4 LogC4 input
    isdata: false
    allocation: uniform
    allocationvars: [0, 1]
    to_reference: !<GroupTransform>
      children:
        - !<LogCameraTransform> {log_side_slope: 0.0647954196341293, log_side_offset: -0.295908392682586, lin_side_slope: 2231.82630906769, lin_side_offset: 64, lin_side_break: -0.0180569961199113, direction: inverse}
        - !<MatrixTransform> {matrix: [1.893123, -0.780882, -0.112242, 0, -0.205700,  1.340257, -0.134557, 0, -0.012706, -0.152185,  1.164891, 0, 0, 0, 0, 1]}

  - !<ColorSpace>
    name: Blackmagic Film Wide Gamut (Gen 5)
    family: Camera Footage
    equalitygroup: ""
    bitdepth: 32f
    description: |
      Blackmagic Film Wide Gamut (Gen 5)
    isdata: false
    allocation: uniform
    allocationvars: [0, 1]
    to_reference: !<GroupTransform>
      children:
        - !<FileTransform> {src: Blackmagic_FilmWideGamut_Gen5_to_linear.spi1d, interpolation: linear}
        - !<MatrixTransform> {matrix: [0.606530, 0.220408, 0.123479, 0, 0.267989, 0.832731, -0.100720, 0, -0.029442, -0.086611, 1.204861, 0, 0, 0, 0, 1]}
        - !<ColorSpaceTransform> {src: CIE-XYZ D65, dst: reference}

  - !<ColorSpace>
    name: Rec.709 OETF
    family: Camera Footage
    equalitygroup: ""
    bitdepth: 32f
    description: |
      Rec.709 OETF
    isdata: false
    allocation: uniform
    allocationvars: [0, 1]
    to_reference: !<GroupTransform>
      children:
        - !<FileTransform> {src: rec709_to_linear.spi1d, interpolation: linear}

  - !<ColorSpace>
    name: Rec.601 OETF (NTSC)
    family:
    equalitygroup:
    bitdepth: 32f
    description: |
      Rec.601 Optical-Electro Transfer Function.
    isdata: false
    allocation: uniform
    allocationvars: [0.0, 1.0]
    to_reference: !<GroupTransform>
      children:
        - !<MatrixTransform> {matrix: [0.939542, 0.050181, 0.010277, 0, 0.017772, 0.965793, 0.016435, 0, -0.001622, -0.004370, 1.005991, 0, 0, 0, 0, 1]}
        - !<ColorSpaceTransform> {src: Rec.709 OETF, dst: Linear}

  - !<ColorSpace>
    name: Rec.601 OETF (PAL)
    family:
    equalitygroup:
    bitdepth: 32f
    description: |
      Rec.601 Optical-Electro Transfer Function.
    isdata: false
    allocation: uniform
    allocationvars: [0.0, 1.0]
    to_reference: !<GroupTransform>
      children:
        - !<MatrixTransform> {matrix: [1.044043, -0.044043, 0.000000, 0, 0.000000, 1.000000, -0.000000, 0, -0.000000, 0.011793, 0.988207, 0, 0, 0, 0, 1]}
        - !<ColorSpaceTransform> {src: Rec.709 OETF, dst: Linear}

  - !<ColorSpace>
    name: Non-Colour Data
    family:
    description: |
        Transform to flag data as non-colour, strictly data, and avoid OCIO colour specific transforms.
    equalitygroup:
    bitdepth: 32f
    isdata: true
    allocation: uniform
    allocationvars: [0, 1]

looks:
  - !<Look>
    name: Greyscale
    process_space: Filmic Log Encoding
    transform: !<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]}

  - !<Look>
    name: False Colour
    process_space: Filmic Log Encoding
    transform: !<GroupTransform>
        children:
          - !<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_Colour.spi3d, interpolation: best}

  - !<Look>
    name: Very High Contrast
    process_space: Filmic Log Encoding
    transform: !<FileTransform> {src: Filmic_to_1.20_1-00.spi1d, interpolation: linear}

  - !<Look>
    name: High Contrast
    process_space: Filmic Log Encoding
    transform: !<FileTransform> {src: Filmic_to_0.99_1-0075.spi1d, interpolation: linear}

  - !<Look>
    name: Medium High Contrast
    process_space: Filmic Log Encoding
    transform: !<FileTransform> {src: Filmic_to_0-85_1-011.spi1d, interpolation: best}

  - !<Look>
    name: Base Contrast
    process_space: Filmic Log Encoding
    transform: !<FileTransform> {src: Filmic_to_0-70_1-03.spi1d, interpolation: linear}

  - !<Look>
    name: Medium Low Contrast
    process_space: Filmic Log Encoding
    transform: !<FileTransform> {src: Filmic_to_0-60_1-04.spi1d, interpolation: linear}

  - !<Look>
    name: Low Contrast
    process_space: Filmic Log Encoding
    transform: !<FileTransform> {src: Filmic_to_0-48_1-09.spi1d, interpolation: linear}

  - !<Look>
    name: Very Low Contrast
    process_space: Filmic Log Encoding
    transform: !<FileTransform> {src: Filmic_to_0-35_1-30.spi1d, interpolation: linear}
