AgX-Step3: Refactor OCIO config to be CIE XYZ I-E based #110913

Merged
Sergey Sharybin merged 6 commits from :AgX-Step3 into main 2023-08-08 15:11:17 +02:00
4 changed files with 71 additions and 51 deletions

View File

@ -18,7 +18,7 @@ luma: [0.2126, 0.7152, 0.0722]
description: RRT version ut33
roles:
reference: Linear
reference: Linear CIE-XYZ E
# Internal scene linear space
scene_linear: Linear
@ -41,6 +41,7 @@ roles:
# For interop between configs, and to determine XYZ for rendering
aces_interchange: Linear ACES
cie_xyz_d65_interchange: Linear CIE-XYZ D65
# Specified by OCIO, not used in Blender
color_timing: Filmic Log
@ -61,6 +62,27 @@ active_displays: [sRGB]
active_views: [Standard, Filmic, Filmic Log, False Color, Raw]
colorspaces:
- !<ColorSpace>
name: Linear CIE-XYZ E
brecht marked this conversation as resolved Outdated

Slightly shorter name: Linear CIE-XYZ E

Slightly shorter name: `Linear CIE-XYZ E`
aliases: ["FilmLight: Linear - XYZ", Linear CIE-XYZ I-E]
family: Chromaticity
equalitygroup:
bitdepth: 32f
description: |
1931 CIE XYZ standard with assumed illuminant E white point
brecht marked this conversation as resolved Outdated

Standard -> standard
I-E -> illuminant E

Standard -> standard I-E -> illuminant E
isdata: false
- !<ColorSpace>
name: Linear CIE-XYZ D65
brecht marked this conversation as resolved Outdated

Slightly shorter name: Linear CIE-XYZ D65

As can be seen from the aliases, it's not common to have this I- prefix and not self explanatory anyway.

Slightly shorter name: `Linear CIE-XYZ D65` As can be seen from the aliases, it's not common to have this `I-` prefix and not self explanatory anyway.
aliases: [cie_xyz_d65, CIE-XYZ-D65, XYZ, Linear CIE-XYZ D65]
family: Chromaticity
equalitygroup:
bitdepth: 32f
description: |
1931 CIE XYZ with adapted illuminant D65 white point
brecht marked this conversation as resolved Outdated

I-D65 -> illuminant D65, here we can actually use the full word

I-D65 -> illuminant D65, here we can actually use the full word
isdata: false
from_scene_reference: !<FileTransform> {src: xyz_E_to_D65.spimtx, interpolation: linear}
brecht marked this conversation as resolved

Is it necessary to provide transforms in two directions?

I wonder if that might actually affect performance negatively, if perhaps in this case OpenColorIO can no longer cancel out the transforms.

Is it necessary to provide transforms in two directions? I wonder if that might actually affect performance negatively, if perhaps in this case OpenColorIO can no longer cancel out the transforms.
- !<ColorSpace>
name: Linear
family: linear
@ -69,6 +91,10 @@ colorspaces:
description: |
Rec. 709 (Full Range), Blender native linear space
isdata: false
from_scene_reference: !<GroupTransform>
children:
- !<ColorSpaceTransform> {src: Linear CIE-XYZ E, dst: Linear CIE-XYZ D65}
- !<MatrixTransform> {matrix: [ 3.2410032329763587, -1.5373989694887855, -0.4986158819963629, 0, -0.9692242522025164, 1.8759299836951759, 0.0415542263400847, 0, 0.0556394198519755, -0.2040112061239099, 1.0571489771875333, 0, 0, 0, 0, 1]}
- !<ColorSpace>
name: Linear ACES
@ -80,7 +106,7 @@ colorspaces:
isdata: false
from_reference: !<GroupTransform>
children:
- !<FileTransform> {src: srgb_to_xyz.spimtx, interpolation: linear}
- !<ColorSpaceTransform> {src: Linear CIE-XYZ E, dst: Linear CIE-XYZ D65}
- !<BuiltinTransform> {style: "UTILITY - ACES-AP0_to_CIE-XYZ-D65_BFD", direction: inverse}
- !<ColorSpace>
@ -93,19 +119,9 @@ colorspaces:
isdata: false
from_reference: !<GroupTransform>
children:
- !<FileTransform> {src: srgb_to_xyz.spimtx, interpolation: linear}
- !<ColorSpaceTransform> {src: Linear CIE-XYZ E, dst: Linear CIE-XYZ D65}
- !<BuiltinTransform> {style: "UTILITY - ACES-AP1_to_CIE-XYZ-D65_BFD", direction: inverse}
- !<ColorSpace>
name: XYZ
brecht marked this conversation as resolved Outdated

This is a significant change that breaks forward compatibility, but it is not mentioned in the PR description.

This is a significant change that breaks forward compatibility, but it is not mentioned in the PR description.
family: linear
equalitygroup:
bitdepth: 32f
isdata: false
from_reference: !<GroupTransform>
children:
- !<FileTransform> {src: srgb_to_xyz.spimtx, interpolation: linear}
- !<ColorSpace>
name: sRGB
family:
@ -114,7 +130,10 @@ colorspaces:
description: |
sRGB display space
isdata: false
from_reference: !<ExponentWithLinearTransform> {gamma: 2.4, offset: 0.055, direction: inverse}
from_scene_reference: !<GroupTransform>
children:
- !<ColorSpaceTransform> {src: Linear CIE-XYZ E, dst: Linear}
- !<ExponentWithLinearTransform> {gamma: 2.4, offset: 0.055, direction: inverse}
- !<ColorSpace>
name: Non-Color
@ -135,11 +154,15 @@ colorspaces:
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}
children:
- !<ColorSpaceTransform> {src: Linear CIE-XYZ E, dst: Linear}
- !<AllocationTransform> {allocation: lg2, vars: [-12.473931188, 12.526068812]}
- !<FileTransform> {src: filmic_desat65cube.spi3d, interpolation: best}
- !<AllocationTransform> {allocation: uniform, vars: [0, 0.66]}
to_scene_reference: !<GroupTransform>
children:
- !<AllocationTransform> {allocation: lg2, vars: [-12.473931188, 4.026068812], direction: inverse}
- !<ColorSpaceTransform> {src: Linear CIE-XYZ E, dst: Linear, direction: inverse}
- !<ColorSpace>
name: Filmic sRGB
@ -150,9 +173,9 @@ colorspaces:
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}
children:
- !<ColorSpaceTransform> {src: Linear CIE-XYZ E, dst: Filmic Log}
- !<FileTransform> {src: filmic_to_0-70_1-03.spi1d, interpolation: linear}
- !<ColorSpace>
name: False Color
@ -163,61 +186,61 @@ colorspaces:
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}
children:
- !<ColorSpaceTransform> {src: Linear CIE-XYZ E, 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}
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}
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}
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:
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}
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}
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}
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}

View File

@ -1,3 +0,0 @@
0.4124564 0.3575761 0.1804375 0
0.2126729 0.7151522 0.0721750 0
0.0193339 0.1191920 0.9503041 0

View File

@ -1,3 +0,0 @@
1.0521111 0.0000000 0.0000000 0
0.0000000 1.0000000 0.0000000 0
0.0000000 0.0000000 0.9184170 0

View File

@ -0,0 +1,3 @@
0.95318743 -0.02659057 0.02387315 0
-0.03824666 1.02884062 0.00940604 0
0.00260677 -0.00303325 1.08925647 0