colorspaces:
- !<ColorSpace>
name: linear
- family: linear
- equalitygroup:
+ family: ""
+ equalitygroup: ""
bitdepth: 32f
description: |
Scene-linear, high dynamic range. Used for rendering and compositing.
-
isdata: false
allocation: lg2
allocationvars: [-15, 6]
- !<ColorSpace>
name: sRGB
- family: sRGB
- equalitygroup:
+ family: ""
+ equalitygroup: ""
bitdepth: 32f
description: |
Standard RGB Display Space
-
isdata: false
allocation: uniform
allocationvars: [-0.125, 1.125]
to_reference: !<FileTransform> {src: srgb.spi1d, interpolation: linear}
- !<ColorSpace>
+ name: sRGBf
+ family: ""
+ equalitygroup: ""
+ bitdepth: 32f
+ description: |
+ Standard RGB Display Space, but with additional range to preserve float highlights.
+ isdata: false
+ allocation: uniform
+ allocationvars: [-0.125, 4.875]
+ to_reference: !<FileTransform> {src: srgbf.spi1d, interpolation: linear}
+
+ - !<ColorSpace>
name: rec709
- family: rec709
- equalitygroup:
+ family: ""
+ equalitygroup: ""
bitdepth: 32f
description: |
Rec. 709 (Full Range) Display Space
-
isdata: false
allocation: uniform
allocationvars: [-0.125, 1.125]
- !<ColorSpace>
name: Cineon
- family: Cineon
- equalitygroup:
+ family: ""
+ equalitygroup: ""
bitdepth: 32f
description: |
Cineon (Log Film Scan)
-
isdata: false
allocation: uniform
allocationvars: [-0.125, 1.125]
- !<ColorSpace>
name: Gamma1.8
- family: Gamma1.8
- equalitygroup:
+ family: ""
+ equalitygroup: ""
bitdepth: 32f
description: |
Emulates a idealized Gamma 1.8 display device.
-
isdata: false
allocation: uniform
allocationvars: [0, 1]
- !<ColorSpace>
name: Gamma2.2
- family: Gamma2.2
- equalitygroup:
+ family: ""
+ equalitygroup: ""
bitdepth: 32f
description: |
Emulates a idealized Gamma 2.2 display device.
-
isdata: false
allocation: uniform
allocationvars: [0, 1]
- !<ColorSpace>
name: Panalog
- family: Panalog
- equalitygroup:
+ family: ""
+ equalitygroup: ""
bitdepth: 32f
description: |
Sony/Panavision Genesis Log Space
-
isdata: false
allocation: uniform
allocationvars: [-0.125, 1.125]
- !<ColorSpace>
name: REDLog
- family: REDLog
- equalitygroup:
+ family: ""
+ equalitygroup: ""
bitdepth: 32f
description: |
RED Log Space
-
isdata: false
allocation: uniform
allocationvars: [-0.125, 1.125]
- !<ColorSpace>
name: ViperLog
- family: ViperLog
- equalitygroup:
+ family: ""
+ equalitygroup: ""
bitdepth: 32f
description: |
Viper Log Space
-
isdata: false
allocation: uniform
allocationvars: [-0.125, 1.125]
- !<ColorSpace>
name: AlexaV3LogC
- family: AlexaV3LogC
- equalitygroup:
+ family: ""
+ equalitygroup: ""
bitdepth: 32f
description: |
Alexa Log C
-
isdata: false
allocation: uniform
allocationvars: [-0.125, 1.125]
- !<ColorSpace>
name: PLogLin
- family: PLogLin
- equalitygroup:
+ family: ""
+ equalitygroup: ""
bitdepth: 32f
description: |
Josh Pines style pivoted log/lin conversion. 445->0.18
-
isdata: false
allocation: uniform
allocationvars: [-0.125, 1.125]
- !<ColorSpace>
name: SLog
- family: SLog
- equalitygroup:
+ family: ""
+ equalitygroup: ""
bitdepth: 32f
description: |
Sony SLog
-
isdata: false
allocation: uniform
allocationvars: [-0.125, 1.125]
- !<ColorSpace>
name: raw
- family: raw
- equalitygroup:
+ family: ""
+ equalitygroup: ""
bitdepth: 32f
description: |
Raw Data. Used for normals, points, etc.
-
isdata: true
allocation: uniform
config.addColorSpace(cs)
+NUM_SAMPLES = 2**16+25
+RANGE = (-0.125, 4.875)
+data = []
+for i in xrange(NUM_SAMPLES):
+ x = i/(NUM_SAMPLES-1.0)
+ x = Fit(x, 0.0, 1.0, RANGE[0], RANGE[1])
+ data.append(fromSRGB(x))
+
+# Data is srgb->linear
+WriteSPI1D('luts/srgbf.spi1d', RANGE[0], RANGE[1], data)
+
+cs = OCIO.ColorSpace(name='sRGBf')
+cs.setDescription("Standard RGB Display Space, but with additional range to preserve float highlights.")
+cs.setBitDepth(OCIO.Constants.BIT_DEPTH_F32)
+cs.setAllocation(OCIO.Constants.ALLOCATION_UNIFORM)
+cs.setAllocationVars([RANGE[0], RANGE[1]])
+
+t = OCIO.FileTransform('srgbf.spi1d', interpolation=OCIO.Constants.INTERP_LINEAR)
+cs.setTransform(t, OCIO.Constants.COLORSPACE_DIR_TO_REFERENCE)
+config.addColorSpace(cs)
+
+
###############################################################################
def toRec709(v):