--- /dev/null
+#!/usr/bin/env python
+
+import SpImport, math, os, sys
+OCIO = SpImport.SpComp2("PyOpenColorIO",1)
+
+
+
+
+outputfilename = "spi-anim.ocio"
+
+config = OCIO.Config()
+
+LUT_SEARCH_PATH = ['luts']
+config.setSearchPath(':'.join(LUT_SEARCH_PATH))
+
+# Set roles
+config.setRole(OCIO.Constants.ROLE_SCENE_LINEAR, "lnf")
+config.setRole(OCIO.Constants.ROLE_REFERENCE, "lnf")
+config.setRole(OCIO.Constants.ROLE_COLOR_TIMING, "lm10")
+config.setRole(OCIO.Constants.ROLE_COMPOSITING_LOG, "lmf")
+config.setRole(OCIO.Constants.ROLE_COLOR_PICKING,"cpf")
+config.setRole(OCIO.Constants.ROLE_DATA,"ncf")
+config.setRole(OCIO.Constants.ROLE_DEFAULT,"ncf")
+config.setRole(OCIO.Constants.ROLE_MATTE_PAINT,"mp16")
+config.setRole(OCIO.Constants.ROLE_TEXTURE_PAINT,"dt16")
+
+## Scene OCIO.Constants.INTERP_LINEAR ###############################################################
+
+cs = OCIO.ColorSpace(family='ln', name='lnf')
+cs.setDescription("lnf :linear show space")
+cs.setBitDepth(OCIO.Constants.BIT_DEPTH_F32)
+cs.setAllocationVars([-13.0,4.0])
+cs.setAllocation(OCIO.Constants.ALLOCATION_LG2)
+config.addColorSpace(cs)
+
+cs = OCIO.ColorSpace(family='ln', name='lnh')
+cs.setDescription("lnh :linear show space")
+cs.setBitDepth(OCIO.Constants.BIT_DEPTH_F16)
+cs.setAllocationVars([-13.0,4.0])
+cs.setAllocation(OCIO.Constants.ALLOCATION_LG2)
+config.addColorSpace(cs)
+
+## Log Monitor ########################################################################
+
+cs = OCIO.ColorSpace(family='lm',name='lm16')
+cs.setDescription("lm16 : Log Monitor this space has a log like response and srgb primaries, it is used for color grading ")
+cs.setBitDepth(OCIO.Constants.BIT_DEPTH_UINT16)
+t=OCIO.FileTransform('lm16.spi1d',direction=OCIO.Constants.TRANSFORM_DIR_FORWARD,interpolation=OCIO.Constants.INTERP_LINEAR)
+cs.setTransform(t, OCIO.Constants.COLORSPACE_DIR_TO_REFERENCE)
+config.addColorSpace(cs)
+
+cs = OCIO.ColorSpace(family='lm',name='lm10')
+cs.setDescription("lm10 : Log Monitor this space has a log like response and srgb primaries, it is used for color grading ")
+cs.setBitDepth(OCIO.Constants.BIT_DEPTH_UINT10)
+t=OCIO.FileTransform('lm10.spi1d',direction=OCIO.Constants.TRANSFORM_DIR_FORWARD,interpolation=OCIO.Constants.INTERP_LINEAR)
+cs.setTransform(t, OCIO.Constants.COLORSPACE_DIR_TO_REFERENCE)
+config.addColorSpace(cs)
+
+cs = OCIO.ColorSpace(family='lm',name='lmf')
+cs.setDescription("lmf : Log Monitor this space has a log like response and srgb primaries, it is used as a compositing log")
+cs.setBitDepth(OCIO.Constants.BIT_DEPTH_F32)
+cs.setAllocationVars([-0.2,2.484])
+t=OCIO.FileTransform('lmf.spi1d',direction=OCIO.Constants.TRANSFORM_DIR_FORWARD,interpolation=OCIO.Constants.INTERP_LINEAR)
+cs.setTransform(t, OCIO.Constants.COLORSPACE_DIR_TO_REFERENCE)
+config.addColorSpace(cs)
+
+## VD ########################################################################
+
+cs = OCIO.ColorSpace(family='vd',name='vd16')
+cs.setDescription("vd16 : The simple video conversion from a gamma 2.2 srgb space")
+cs.setBitDepth(OCIO.Constants.BIT_DEPTH_UINT16)
+groupTransform = OCIO.GroupTransform()
+groupTransform.push_back(OCIO.FileTransform('vd16.spi1d',direction=OCIO.Constants.TRANSFORM_DIR_FORWARD,interpolation=OCIO.Constants.INTERP_NEAREST))
+cs.setTransform(groupTransform, OCIO.Constants.COLORSPACE_DIR_TO_REFERENCE)
+config.addColorSpace(cs)
+
+
+cs = OCIO.ColorSpace(family='vd',name='vd10')
+cs.setDescription("vd10 : The simple video conversion from a gamma 2.2 srgb space")
+cs.setBitDepth(OCIO.Constants.BIT_DEPTH_UINT10)
+groupTransform = OCIO.GroupTransform()
+groupTransform.push_back(OCIO.FileTransform('vd10.spi1d',direction=OCIO.Constants.TRANSFORM_DIR_FORWARD,interpolation=OCIO.Constants.INTERP_NEAREST))
+cs.setTransform(groupTransform, OCIO.Constants.COLORSPACE_DIR_TO_REFERENCE)
+config.addColorSpace(cs)
+
+cs = OCIO.ColorSpace(family='vd',name='vd8')
+cs.setDescription("vd8 : The simple video conversion from a gamma 2.2 srgb space")
+cs.setBitDepth(OCIO.Constants.BIT_DEPTH_UINT8)
+groupTransform = OCIO.GroupTransform()
+groupTransform.push_back(OCIO.FileTransform('vd8.spi1d',direction=OCIO.Constants.TRANSFORM_DIR_FORWARD,interpolation=OCIO.Constants.INTERP_NEAREST))
+cs.setTransform(groupTransform, OCIO.Constants.COLORSPACE_DIR_TO_REFERENCE)
+config.addColorSpace(cs)
+
+
+## REC709 CONVERSIONS ########################################################################
+cs = OCIO.ColorSpace(family='hd',name='hd10')
+cs.setDescription("hd10 : The simple conversion for REC709")
+cs.setBitDepth(OCIO.Constants.BIT_DEPTH_UINT10)
+groupTransform = OCIO.GroupTransform()
+groupTransform.push_back(OCIO.FileTransform('hdOffset.spimtx',direction=OCIO.Constants.TRANSFORM_DIR_INVERSE,interpolation=OCIO.Constants.INTERP_NEAREST))
+groupTransform.push_back(OCIO.ColorSpaceTransform(src='vd16', dst='lnf'))
+cs.setTransform(groupTransform, OCIO.Constants.COLORSPACE_DIR_TO_REFERENCE)
+config.addColorSpace(cs)
+
+
+## TEXTURE PUBLISHING ########################################################################
+
+cs = OCIO.ColorSpace(family='dt',name='dt16')
+cs.setDescription("dt16 :diffuse texture conversion")
+cs.setBitDepth(OCIO.Constants.BIT_DEPTH_UINT16)
+groupTransform = OCIO.GroupTransform()
+groupTransform.push_back(OCIO.FileTransform('dt.spimtx',direction=OCIO.Constants.TRANSFORM_DIR_FORWARD,interpolation=OCIO.Constants.INTERP_NEAREST))
+groupTransform.push_back(OCIO.ColorSpaceTransform(src='vd16', dst='lnf'))
+cs.setTransform(groupTransform, OCIO.Constants.COLORSPACE_DIR_TO_REFERENCE)
+config.addColorSpace(cs)
+
+
+## MATTE PUBLISHING ########################################################################
+cs = OCIO.ColorSpace(family='mp',name='mp16')
+cs.setDescription("mp16 : conversion for matte painting")
+cs.setBitDepth(OCIO.Constants.BIT_DEPTH_UINT16)
+groupTransform = OCIO.GroupTransform()
+groupTransform.push_back(OCIO.FileTransform('mp.spimtx',direction=OCIO.Constants.TRANSFORM_DIR_FORWARD,interpolation=OCIO.Constants.INTERP_NEAREST))
+groupTransform.push_back(OCIO.ColorSpaceTransform(src='vd16', dst='lnf'))
+cs.setTransform(groupTransform, OCIO.Constants.COLORSPACE_DIR_TO_REFERENCE)
+config.addColorSpace(cs)
+
+
+## COLOR PICKER ########################################################################
+
+cs = OCIO.ColorSpace(family='cp',name='cpf')
+cs.setDescription("cpf :video like conversion used for color picking ")
+cs.setBitDepth(OCIO.Constants.BIT_DEPTH_F32)
+cs.setTransform(OCIO.FileTransform('cpf.spi1d',direction=OCIO.Constants.TRANSFORM_DIR_FORWARD,interpolation=OCIO.Constants.INTERP_NEAREST), OCIO.Constants.COLORSPACE_DIR_TO_REFERENCE)
+config.addColorSpace(cs)
+
+## DATA ########################################################################
+
+cs = OCIO.ColorSpace(family='nc',name='nc8')
+cs.setDescription("nc8 :nc,Non-color used to store non-color data such as depth or surface normals")
+cs.setBitDepth(OCIO.Constants.BIT_DEPTH_UINT8)
+cs.setIsData(True)
+config.addColorSpace(cs)
+
+cs = OCIO.ColorSpace(family='nc',name='nc10')
+cs.setDescription("nc10 :nc,Non-color used to store non-color data such as depth or surface normals")
+cs.setBitDepth(OCIO.Constants.BIT_DEPTH_UINT10)
+cs.setIsData(True)
+config.addColorSpace(cs)
+
+cs = OCIO.ColorSpace(family='nc',name='nc16')
+cs.setDescription("nc16 :nc,Non-color used to store non-color data such as depth or surface normals")
+cs.setBitDepth(OCIO.Constants.BIT_DEPTH_UINT16)
+cs.setIsData(True)
+config.addColorSpace(cs)
+
+cs = OCIO.ColorSpace(family='nc',name='ncf')
+cs.setDescription("ncf :nc,Non-color used to store non-color data such as depth or surface normals")
+cs.setBitDepth(OCIO.Constants.BIT_DEPTH_F32)
+cs.setIsData(True)
+config.addColorSpace(cs)
+
+## DISPLAY SPACES ##################################################################
+
+#
+# This is not as clean as would be desired
+# THere is a conversion made from srgb to P3
+# then there is a tone range correction that limits the dynamic range of the DLP to
+# be appropaite for material created on the DreamColor display.
+#
+cs = OCIO.ColorSpace(family='p3dci',name='p3dci8')
+cs.setDescription("p3dci8 : 8 Bit int rgb display space for gamma 2.6 P3 projection.")
+cs.setBitDepth(OCIO.Constants.BIT_DEPTH_UINT8)
+groupTransform = OCIO.GroupTransform()
+groupTransform.push_back(OCIO.ColorSpaceTransform(src='lnf', dst='vd16'))
+groupTransform.push_back(OCIO.ExponentTransform(value=[2.2,2.2,2.2,1.0], direction=OCIO.Constants.TRANSFORM_DIR_FORWARD))
+groupTransform.push_back(OCIO.FileTransform('srgb_to_p3d65.spimtx',direction=OCIO.Constants.TRANSFORM_DIR_FORWARD,interpolation=OCIO.Constants.INTERP_LINEAR))
+groupTransform.push_back(OCIO.FileTransform('p3d65_to_pdci.spimtx',direction=OCIO.Constants.TRANSFORM_DIR_FORWARD,interpolation=OCIO.Constants.INTERP_LINEAR))
+groupTransform.push_back(OCIO.FileTransform('htr_dlp_tweak.spimtx',direction=OCIO.Constants.TRANSFORM_DIR_FORWARD,interpolation=OCIO.Constants.INTERP_LINEAR))
+groupTransform.push_back(OCIO.ExponentTransform(value=[2.6,2.6,2.6,1.0], direction=OCIO.Constants.TRANSFORM_DIR_INVERSE))
+groupTransform.push_back(OCIO.FileTransform('correction.spi1d',OCIO.Constants.TRANSFORM_DIR_FORWARD,interpolation=OCIO.Constants.INTERP_LINEAR))
+cs.setTransform(groupTransform, OCIO.Constants.COLORSPACE_DIR_FROM_REFERENCE)
+config.addColorSpace(cs)
+
+"""
+cs = OCIO.ColorSpace(family='xyz',name='xyz16')
+cs.setDescription("xyz16 : 16 Bit int space for DCP creation.")
+cs.setBitDepth(OCIO.Constants.BIT_DEPTH_UINT16)
+groupTransform = OCIO.GroupTransform()
+groupTransform.push_back(OCIO.ColorSpaceTransform(src='lnf',dst='vd16'))
+groupTransform.push_back(OCIO.FileTransform('hdOffset.spimtx' ,direction= OCIO.Constants.TRANSFORM_DIR_FORWARD,interpolation=OCIO.Constants.INTERP_LINEAR))
+groupTransform.push_back(OCIO.FileTransform('hd10_to_xyz16.spi3d' ,direction=OCIO.Constants.TRANSFORM_DIR_FORWARD,interpolation=OCIO.Constants.INTERP_LINEAR))
+cs.setTransform(groupTransform, OCIO.Constants.COLORSPACE_DIR_FROM_REFERENCE)
+config.addColorSpace(cs)
+"""
+## DISPLAY SPACES ##################################################################
+
+for name,colorspace in [ ['Film','vd16'], ['Log','lm10'],['Raw','nc10']]:
+ config.addDisplay('sRGB',name,colorspace)
+
+for name,colorspace in [ ['Film','p3dci8'], ['Log','lm10'], ['Raw','nc10']]:
+ config.addDisplay('DCIP3',name,colorspace)
+
+
+config.setActiveViews(','.join(['Film','Log','Raw']))
+config.setActiveDisplays(','.join(['sRGB','DCIP3']))
+
+try:
+ config.sanityCheck()
+except Exception,e:
+ print e
+ print "Configuration was not written due to a failed Sanity Check"
+ sys.exit()
+else:
+ f = file(outputfilename,"w")
+ f.write(config.serialize())
+ f.close()
+ print "Wrote",outputfilename
+
+
+
----
ocio_profile_version: 1
search_path: luts
roles:
color_picking: cpf
- color_timing: lmf
+ color_timing: lm10
compositing_log: lmf
data: ncf
default: ncf
+ matte_paint: mp16
reference: lnf
scene_linear: lnf
- spi_spm: lm8
+ texture_paint: dt16
displays:
DCIP3:
- - !<View> {name: Raw, colorspace: nc10}
- - !<View> {name: Log, colorspace: lm10}
- !<View> {name: Film, colorspace: p3dci8}
- sRGB:
+ - !<View> {name: Log, colorspace: lm10}
- !<View> {name: Raw, colorspace: nc10}
+ sRGB:
+ - !<View> {name: Film, colorspace: vd16}
- !<View> {name: Log, colorspace: lm10}
- - !<View> {name: Film, colorspace: vd8}
+ - !<View> {name: Raw, colorspace: nc10}
+
active_displays: [sRGB, DCIP3]
active_views: [Film, Log, Raw]
name: lnf
family: ln
bitdepth: 32f
+ description: |
+ lnf :linear show space
isdata: false
allocation: lg2
allocationvars: [-13, 4]
name: lnh
family: ln
bitdepth: 16f
+ description: |
+ lnh :linear show space
isdata: false
allocation: lg2
allocationvars: [-13, 4]
- !<ColorSpace>
name: lm16
- family: lg
+ family: lm
bitdepth: 16ui
+ description: |
+ lm16 : Log Monitor this space has a log like response and srgb primaries, it is used for color grading
isdata: false
allocation: uniform
- allocationvars: [0, 1]
- to_reference: !<FileTransform> {src: lm16.spi1d, interpolation: nearest}
+ to_reference: !<FileTransform> {src: lm16.spi1d, interpolation: linear}
- !<ColorSpace>
name: lm10
- family: lg
+ family: lm
bitdepth: 10ui
+ description: |
+ lm10 : Log Monitor this space has a log like response and srgb primaries, it is used for color grading
isdata: false
allocation: uniform
- allocationvars: [0, 1]
- to_reference: !<FileTransform> {src: lm10.spi1d, interpolation: nearest}
-
- - !<ColorSpace>
- name: lm8
- family: lg
- bitdepth: 8ui
- isdata: false
- allocation: uniform
- allocationvars: [0, 1]
- to_reference: !<FileTransform> {src: lm8.spi1d, interpolation: nearest}
+ to_reference: !<FileTransform> {src: lm10.spi1d, interpolation: linear}
- !<ColorSpace>
name: lmf
- family: lg
+ family: lm
bitdepth: 32f
+ description: |
+ lmf : Log Monitor this space has a log like response and srgb primaries, it is used as a compositing log
isdata: false
allocation: uniform
- allocationvars: [-0.25, 1.5]
+ allocationvars: [-0.2, 2.484]
to_reference: !<FileTransform> {src: lmf.spi1d, interpolation: linear}
- !<ColorSpace>
name: vd16
family: vd
bitdepth: 16ui
+ description: |
+ vd16 : The simple video conversion from a gamma 2.2 srgb space
isdata: false
allocation: uniform
- allocationvars: [0, 1]
- to_reference: !<FileTransform> {src: vd16.spi1d, interpolation: nearest}
+ to_reference: !<GroupTransform>
+ children:
+ - !<FileTransform> {src: vd16.spi1d, interpolation: nearest}
- !<ColorSpace>
name: vd10
family: vd
bitdepth: 10ui
+ description: |
+ vd10 : The simple video conversion from a gamma 2.2 srgb space
isdata: false
allocation: uniform
- allocationvars: [0, 1]
- to_reference: !<FileTransform> {src: vd10.spi1d, interpolation: nearest}
+ to_reference: !<GroupTransform>
+ children:
+ - !<FileTransform> {src: vd10.spi1d, interpolation: nearest}
- !<ColorSpace>
name: vd8
family: vd
bitdepth: 8ui
+ description: |
+ vd8 : The simple video conversion from a gamma 2.2 srgb space
isdata: false
allocation: uniform
- allocationvars: [0, 1]
- to_reference: !<FileTransform> {src: vd8.spi1d, interpolation: nearest}
-
- - !<ColorSpace>
- name: vdf
- family: vd
- bitdepth: 32f
- isdata: false
- allocation: uniform
- allocationvars: [0, 1]
- to_reference: !<FileTransform> {src: vd16.spi1d, interpolation: linear}
+ to_reference: !<GroupTransform>
+ children:
+ - !<FileTransform> {src: vd8.spi1d, interpolation: nearest}
- !<ColorSpace>
- name: dt8
- family: dt
- bitdepth: 8ui
+ name: hd10
+ family: hd
+ bitdepth: 10ui
+ description: |
+ hd10 : The simple conversion for REC709
isdata: false
allocation: uniform
- allocationvars: [0, 1]
to_reference: !<GroupTransform>
children:
- - !<FileTransform> {src: dt.spimtx, interpolation: unknown}
- - !<ColorSpaceTransform> {src: vdf, dst: lnf}
+ - !<FileTransform> {src: hdOffset.spimtx, interpolation: nearest, direction: inverse}
+ - !<ColorSpaceTransform> {src: vd16, dst: lnf}
- !<ColorSpace>
name: dt16
family: dt
bitdepth: 16ui
+ description: |
+ dt16 :diffuse texture conversion
isdata: false
allocation: uniform
- allocationvars: [0, 1]
to_reference: !<GroupTransform>
children:
- - !<FileTransform> {src: dt.spimtx, interpolation: unknown}
- - !<ColorSpaceTransform> {src: vdf, dst: lnf}
-
- - !<ColorSpace>
- name: mp8
- family: mp
- bitdepth: 8ui
- isdata: false
- allocation: uniform
- allocationvars: [0, 1]
- to_reference: !<GroupTransform>
- children:
- - !<FileTransform> {src: mp.spimtx, interpolation: unknown}
- - !<ColorSpaceTransform> {src: vdf, dst: lnf}
+ - !<FileTransform> {src: dt.spimtx, interpolation: nearest}
+ - !<ColorSpaceTransform> {src: vd16, dst: lnf}
- !<ColorSpace>
name: mp16
family: mp
bitdepth: 16ui
+ description: |
+ mp16 : conversion for matte painting
isdata: false
allocation: uniform
- allocationvars: [0, 1]
- to_reference: !<GroupTransform>
- children:
- - !<FileTransform> {src: mp.spimtx, interpolation: unknown}
- - !<ColorSpaceTransform> {src: vdf, dst: lnf}
-
- - !<ColorSpace>
- name: hd10
- family: hd
- bitdepth: 10ui
- isdata: false
- allocation: uniform
- allocationvars: [0, 1]
to_reference: !<GroupTransform>
children:
- - !<FileTransform> {src: hdOffset.spimtx, interpolation: nearest, direction: inverse}
- - !<ColorSpaceTransform> {src: vdf, dst: lnf}
+ - !<FileTransform> {src: mp.spimtx, interpolation: nearest}
+ - !<ColorSpaceTransform> {src: vd16, dst: lnf}
- !<ColorSpace>
name: cpf
family: cp
bitdepth: 32f
+ description: |
+ cpf :video like conversion used for color picking
isdata: false
allocation: uniform
- allocationvars: [0, 1]
- to_reference: !<FileTransform> {src: cpf.spi1d, interpolation: linear}
+ to_reference: !<FileTransform> {src: cpf.spi1d, interpolation: nearest}
- !<ColorSpace>
name: nc8
family: nc
bitdepth: 8ui
+ description: |
+ nc8 :nc,Non-color used to store non-color data such as depth or surface normals
isdata: true
allocation: uniform
- allocationvars: [0, 1]
- !<ColorSpace>
name: nc10
family: nc
bitdepth: 10ui
+ description: |
+ nc10 :nc,Non-color used to store non-color data such as depth or surface normals
isdata: true
allocation: uniform
- allocationvars: [0, 1]
- !<ColorSpace>
name: nc16
family: nc
bitdepth: 16ui
- isdata: false
+ description: |
+ nc16 :nc,Non-color used to store non-color data such as depth or surface normals
+ isdata: true
allocation: uniform
- allocationvars: [0, 1]
- !<ColorSpace>
name: ncf
family: nc
bitdepth: 32f
+ description: |
+ ncf :nc,Non-color used to store non-color data such as depth or surface normals
isdata: true
allocation: uniform
- allocationvars: [0, 1]
-
- - !<ColorSpace>
- name: xyz16
- family: xyz
- bitdepth: 16ui
- isdata: false
- allocation: uniform
- allocationvars: [0, 1]
- from_reference: !<GroupTransform>
- children:
- - !<ColorSpaceTransform> {src: lnf, dst: p3dci8}
- - !<ExponentTransform> {value: [2.6, 2.6, 2.6, 1]}
- - !<FileTransform> {src: p3_to_xyz16.spimtx, interpolation: unknown}
- - !<ExponentTransform> {value: [2.6, 2.6, 2.6, 1], direction: inverse}
- !<ColorSpace>
name: p3dci8
family: p3dci
- bitdepth: 16ui
+ bitdepth: 8ui
+ description: |
+ p3dci8 : 8 Bit int rgb display space for gamma 2.6 P3 projection.
isdata: false
allocation: uniform
- allocationvars: [0, 1]
from_reference: !<GroupTransform>
children:
- - !<ColorSpaceTransform> {src: lnf, dst: vdf}
+ - !<ColorSpaceTransform> {src: lnf, dst: vd16}
- !<ExponentTransform> {value: [2.2, 2.2, 2.2, 1]}
- - !<FileTransform> {src: srgb_to_p3d65.spimtx, interpolation: unknown}
- - !<FileTransform> {src: p3d65_to_pdci.spimtx, interpolation: unknown}
- - !<FileTransform> {src: htr_dlp_tweak.spimtx, interpolation: unknown}
+ - !<FileTransform> {src: srgb_to_p3d65.spimtx, interpolation: linear}
+ - !<FileTransform> {src: p3d65_to_pdci.spimtx, interpolation: linear}
+ - !<FileTransform> {src: htr_dlp_tweak.spimtx, interpolation: linear}
- !<ExponentTransform> {value: [2.6, 2.6, 2.6, 1], direction: inverse}
- - !<FileTransform> {src: correction.spi1d, interpolation: linear}
+ - !<FileTransform> {src: correction.spi1d, cccid: forward, interpolation: linear}
--- /dev/null
+#!/usr/bin/env python
+
+
+import math, os, sys
+import SpImport
+OCIO = SpImport.SpComp2("PyOpenColorIO",1)
+
+print "OCIO",OCIO.version
+
+outputfilename = "spi-vfx.ocio"
+
+config = OCIO.Config()
+
+LUT_SEARCH_PATH = ['luts']
+config.setSearchPath(':'.join(LUT_SEARCH_PATH))
+
+
+# Set roles
+config.setRole(OCIO.Constants.ROLE_SCENE_LINEAR, "lnf")
+config.setRole(OCIO.Constants.ROLE_REFERENCE, "lnf")
+config.setRole(OCIO.Constants.ROLE_COLOR_TIMING, "lg10")
+config.setRole(OCIO.Constants.ROLE_COMPOSITING_LOG, "lgf")
+config.setRole(OCIO.Constants.ROLE_COLOR_PICKING,"cpf")
+config.setRole(OCIO.Constants.ROLE_DATA,"ncf")
+config.setRole(OCIO.Constants.ROLE_DEFAULT,"ncf")
+config.setRole(OCIO.Constants.ROLE_MATTE_PAINT,"vd8")
+config.setRole(OCIO.Constants.ROLE_TEXTURE_PAINT,"dt16")
+## Scene Linear ###############################################################
+
+cs = OCIO.ColorSpace(family='ln',name='lnf')
+cs.setDescription("lnf : linear show space")
+cs.setBitDepth(OCIO.Constants.BIT_DEPTH_F32)
+cs.setAllocationVars([-15.0,6.0])
+cs.setAllocation(OCIO.Constants.ALLOCATION_LG2)
+config.addColorSpace(cs)
+
+cs = OCIO.ColorSpace(family='ln',name='lnh')
+cs.setDescription("lnh : linear show space")
+cs.setBitDepth(OCIO.Constants.BIT_DEPTH_F16)
+cs.setAllocationVars([-15.0,6.0])
+cs.setAllocation(OCIO.Constants.ALLOCATION_LG2)
+config.addColorSpace(cs)
+
+cs = OCIO.ColorSpace(family='ln',name='ln16')
+cs.setDescription("ln16 : linear show space")
+cs.setBitDepth(OCIO.Constants.BIT_DEPTH_UINT16)
+cs.setAllocationVars([-15.0,0.0])
+cs.setAllocation(OCIO.Constants.ALLOCATION_LG2)
+config.addColorSpace(cs)
+
+
+## Log ########################################################################
+
+cs = OCIO.ColorSpace(family='lg',name='lg16')
+cs.setDescription("lg16 : conversion from film log ")
+cs.setBitDepth(OCIO.Constants.BIT_DEPTH_UINT16)
+t = OCIO.FileTransform('lg16.spi1d',interpolation=OCIO.Constants.INTERP_NEAREST )
+cs.setTransform(t, OCIO.Constants.COLORSPACE_DIR_TO_REFERENCE)
+config.addColorSpace(cs)
+
+cs = OCIO.ColorSpace(family='lg',name='lg10')
+cs.setDescription("lg10 : conversion from film log")
+cs.setBitDepth(OCIO.Constants.BIT_DEPTH_UINT10)
+t = OCIO.FileTransform('lg10.spi1d',interpolation=OCIO.Constants.INTERP_NEAREST )
+cs.setTransform(t, OCIO.Constants.COLORSPACE_DIR_TO_REFERENCE)
+config.addColorSpace(cs)
+
+cs = OCIO.ColorSpace(family='lg',name='lgf')
+cs.setDescription("lgf : conversion from film log")
+cs.setBitDepth(OCIO.Constants.BIT_DEPTH_F32)
+cs.setAllocationVars([-0.25,1.5])
+t = OCIO.FileTransform('lgf.spi1d',interpolation=OCIO.Constants.INTERP_LINEAR)
+cs.setTransform(t, OCIO.Constants.COLORSPACE_DIR_TO_REFERENCE)
+config.addColorSpace(cs)
+
+
+
+## PANALOG ########################################################################
+
+cs = OCIO.ColorSpace(family='gn',name='gn10')
+cs.setDescription("gn10 :conversion from Panalog")
+cs.setBitDepth(OCIO.Constants.BIT_DEPTH_UINT10)
+t = OCIO.FileTransform('gn10.spi1d',interpolation=OCIO.Constants.INTERP_NEAREST)
+cs.setTransform(t, OCIO.Constants.COLORSPACE_DIR_TO_REFERENCE)
+config.addColorSpace(cs)
+
+
+## VD ########################################################################
+
+cs = OCIO.ColorSpace(family='vd',name='vd16')
+cs.setDescription("vd16 :conversion from a gamma 2.2 ")
+cs.setBitDepth(OCIO.Constants.BIT_DEPTH_UINT16)
+groupTransform = OCIO.GroupTransform()
+groupTransform.push_back(OCIO.FileTransform('version_8_whitebalanced.spimtx',direction=OCIO.Constants.TRANSFORM_DIR_INVERSE))
+groupTransform.push_back(OCIO.FileTransform('vd16.spi1d',interpolation=OCIO.Constants.INTERP_NEAREST ))
+cs.setTransform(groupTransform, OCIO.Constants.COLORSPACE_DIR_TO_REFERENCE)
+config.addColorSpace(cs)
+
+cs = OCIO.ColorSpace(family='vd',name='vd10')
+cs.setDescription("vd10 :conversion from a gamma 2.2 ")
+cs.setBitDepth(OCIO.Constants.BIT_DEPTH_UINT10)
+groupTransform = OCIO.GroupTransform()
+groupTransform.push_back(OCIO.FileTransform('version_8_whitebalanced.spimtx',direction=OCIO.Constants.TRANSFORM_DIR_INVERSE))
+groupTransform.push_back(OCIO.FileTransform('vd10.spi1d',interpolation=OCIO.Constants.INTERP_NEAREST ))
+cs.setTransform(groupTransform, OCIO.Constants.COLORSPACE_DIR_TO_REFERENCE)
+config.addColorSpace(cs)
+
+cs = OCIO.ColorSpace(family='vd',name='vd8')
+cs.setDescription("vd8 :conversion from a gamma 2.2")
+cs.setBitDepth(OCIO.Constants.BIT_DEPTH_UINT8)
+groupTransform = OCIO.GroupTransform()
+groupTransform.push_back(OCIO.FileTransform('version_8_whitebalanced.spimtx',direction=OCIO.Constants.TRANSFORM_DIR_INVERSE))
+groupTransform.push_back(OCIO.FileTransform('vd8.spi1d',interpolation=OCIO.Constants.INTERP_NEAREST ))
+cs.setTransform(groupTransform, OCIO.Constants.COLORSPACE_DIR_TO_REFERENCE)
+config.addColorSpace(cs)
+
+# REC709 CONVERSIONS#############################################################################
+cs = OCIO.ColorSpace(family='hd',name='hd10')
+cs.setDescription("hd10 : conversion from REC709")
+cs.setBitDepth(OCIO.Constants.BIT_DEPTH_UINT10)
+groupTransform = OCIO.GroupTransform()
+groupTransform.push_back(OCIO.FileTransform('hdOffset.spimtx',interpolation=OCIO.Constants.INTERP_NEAREST ,direction=OCIO.Constants.TRANSFORM_DIR_INVERSE))
+groupTransform.push_back(OCIO.ColorSpaceTransform(src='vd16',dst='lnf'))
+cs.setTransform(groupTransform, OCIO.Constants.COLORSPACE_DIR_TO_REFERENCE)
+config.addColorSpace(cs)
+
+
+## TEXTURE PUBLISHING ########################################################################
+"""
+cs = OCIO.ColorSpace(family='dt',name='dt8')
+cs.setDescription("dt8 :conversion for diffuse texture")
+cs.setBitDepth(OCIO.Constants.BIT_DEPTH_UINT8)
+groupTransform = OCIO.GroupTransform()
+groupTransform.push_back(OCIO.FileTransform('diffuseTextureMultiplier.spimtx',interpolation=OCIO.Constants.INTERP_NEAREST ,direction=OCIO.Constants.TRANSFORM_DIR_FORWARD))
+groupTransform.push_back(OCIO.ColorSpaceTransform(dst='lnf',src='vd16'))
+cs.setTransform(groupTransform, OCIO.Constants.COLORSPACE_DIR_TO_REFERENCE)
+config.addColorSpace(cs)
+"""
+cs = OCIO.ColorSpace(family='dt',name='dt16')
+cs.setDescription("dt16 :conversion for diffuse texture")
+cs.setBitDepth(OCIO.Constants.BIT_DEPTH_UINT16)
+groupTransform = OCIO.GroupTransform()
+groupTransform.push_back(OCIO.FileTransform('diffuseTextureMultiplier.spimtx',interpolation=OCIO.Constants.INTERP_NEAREST ,direction=OCIO.Constants.TRANSFORM_DIR_FORWARD))
+groupTransform.push_back(OCIO.ColorSpaceTransform(dst='lnf',src='vd16'))
+cs.setTransform(groupTransform, OCIO.Constants.COLORSPACE_DIR_TO_REFERENCE)
+config.addColorSpace(cs)
+
+
+## COLOR PICKER ########################################################################
+
+cs = OCIO.ColorSpace(family='cp',name='cpf')
+cs.setDescription("cpf :video like conversion used for color picking ")
+cs.setBitDepth(OCIO.Constants.BIT_DEPTH_F32)
+t=OCIO.FileTransform(src='cpf.spi1d',interpolation=OCIO.Constants.INTERP_LINEAR )
+cs.setTransform(t, OCIO.Constants.COLORSPACE_DIR_TO_REFERENCE)
+config.addColorSpace(cs)
+
+
+
+## DATA ########################################################################
+
+
+cs = OCIO.ColorSpace(family='nc',name='nc8')
+cs.setDescription("nc8 :nc,Non-color used to store non-color data such as depth or surface normals")
+cs.setBitDepth(OCIO.Constants.BIT_DEPTH_UINT8)
+cs.setIsData(True)
+config.addColorSpace(cs)
+
+cs = OCIO.ColorSpace(family='nc',name='nc10')
+cs.setDescription("nc10 :nc,Non-color used to store non-color data such as depth or surface normals")
+cs.setBitDepth(OCIO.Constants.BIT_DEPTH_UINT10)
+cs.setIsData(True)
+config.addColorSpace(cs)
+
+cs = OCIO.ColorSpace(family='nc',name='nc16')
+cs.setDescription("nc16 :nc,Non-color used to store non-color data such as depth or surface normals")
+cs.setBitDepth(OCIO.Constants.BIT_DEPTH_UINT16)
+cs.setIsData(True)
+config.addColorSpace(cs)
+
+cs = OCIO.ColorSpace(family='nc',name='ncf')
+cs.setDescription("ncf :nc,Non-color used to store non-color data such as depth or surface normals")
+cs.setBitDepth(OCIO.Constants.BIT_DEPTH_F32)
+cs.setIsData(True)
+config.addColorSpace(cs)
+
+## DISPLAY SPACES ##################################################################
+
+cs = OCIO.ColorSpace(family='srgb',name='srgb8')
+cs.setDescription("srgb8 :rgb display space for the srgb standard.")
+cs.setBitDepth(OCIO.Constants.BIT_DEPTH_UINT8)
+groupTransform = OCIO.GroupTransform()
+groupTransform.push_back(OCIO.ColorSpaceTransform(src='lnf', dst='lg10'))
+groupTransform.push_back(OCIO.FileTransform('spi_ocio_srgb_test.spi3d',interpolation=OCIO.Constants.INTERP_LINEAR))
+cs.setTransform(groupTransform, OCIO.Constants.COLORSPACE_DIR_FROM_REFERENCE)
+config.addColorSpace(cs)
+
+cs = OCIO.ColorSpace(family='p3dci',name='p3dci8')
+cs.setDescription("p3dci8 :rgb display space for gamma 2.6 P3 projection.")
+cs.setBitDepth(OCIO.Constants.BIT_DEPTH_UINT8)
+groupTransform = OCIO.GroupTransform()
+groupTransform.push_back(OCIO.ColorSpaceTransform(src='lnf', dst='lg10'))
+groupTransform.push_back( OCIO.FileTransform('colorworks_filmlg_to_p3.3dl',interpolation=OCIO.Constants.INTERP_LINEAR))
+cs.setTransform(groupTransform, OCIO.Constants.COLORSPACE_DIR_FROM_REFERENCE)
+config.addColorSpace(cs)
+"""
+cs = OCIO.ColorSpace(family='xyz',name='xyz16')
+cs.setDescription("xyz16 :Conversion for DCP creation.")
+cs.setBitDepth(OCIO.Constants.BIT_DEPTH_UINT16)
+groupTransform = OCIO.GroupTransform()
+groupTransform.push_back(OCIO.ColorSpaceTransform(src='lnf', dst='p3dci8'))
+groupTransform.push_back(OCIO.ExponentTransform([2.6,2.6,2.6,1.0]))
+groupTransform.push_back(OCIO.FileTransform('p3_to_xyz16.spimtx'))
+groupTransform.push_back(OCIO.ExponentTransform([2.6,2.6,2.6,1.0],direction=OCIO.Constants.TRANSFORM_DIR_INVERSE))
+cs.setTransform(groupTransform, OCIO.Constants.COLORSPACE_DIR_FROM_REFERENCE)
+config.addColorSpace(cs)
+"""
+
+
+## DISPLAY SPACES ##################################################################
+
+for name,colorspace in [ ['Film','srgb8'], ['Log','lg10'], ['Raw','nc10']]:
+ config.addDisplay('sRGB',name,colorspace)
+
+for name,colorspace in [ ['Film','p3dci8'], ['Log','lg10'], ['Raw','nc10']]:
+ config.addDisplay('DCIP3',name,colorspace)
+
+
+config.setActiveViews(','.join(['Film','Log','Raw']))
+config.setActiveDisplays(','.join(['sRGB','DCIP3']))
+
+try:
+ config.sanityCheck()
+except Exception,e:
+ print e
+ print "Configuration was not written due to a failed Sanity Check"
+ sys.exit()
+else:
+ f = file(outputfilename,"w")
+ f.write(config.serialize())
+ f.close()
+ print "Wrote",outputfilename
----
ocio_profile_version: 1
search_path: luts
compositing_log: lgf
data: ncf
default: ncf
+ matte_paint: vd8
reference: lnf
scene_linear: lnf
- spi_spm: lg8
+ texture_paint: dt16
displays:
DCIP3:
- - !<View> {name: Raw, colorspace: nc10}
- - !<View> {name: Log, colorspace: lg10}
- !<View> {name: Film, colorspace: p3dci8}
- sRGB:
- - !<View> {name: Raw, colorspace: nc10}
- !<View> {name: Log, colorspace: lg10}
+ - !<View> {name: Raw, colorspace: nc10}
+ sRGB:
- !<View> {name: Film, colorspace: srgb8}
+ - !<View> {name: Log, colorspace: lg10}
+ - !<View> {name: Raw, colorspace: nc10}
+
active_displays: [sRGB, DCIP3]
active_views: [Film, Log, Raw]
name: lnf
family: ln
bitdepth: 32f
+ description: |
+ lnf : linear show space
isdata: false
allocation: lg2
- allocationvars: [-15, 6, 0.01]
+ allocationvars: [-15, 6]
- !<ColorSpace>
name: lnh
family: ln
bitdepth: 16f
+ description: |
+ lnh : linear show space
isdata: false
allocation: lg2
allocationvars: [-15, 6]
name: ln16
family: ln
bitdepth: 16ui
+ description: |
+ ln16 : linear show space
isdata: false
allocation: lg2
allocationvars: [-15, 0]
name: lg16
family: lg
bitdepth: 16ui
+ description: |
+ lg16 : conversion from film log
isdata: false
allocation: uniform
- allocationvars: [0, 1]
to_reference: !<FileTransform> {src: lg16.spi1d, interpolation: nearest}
- !<ColorSpace>
name: lg10
family: lg
bitdepth: 10ui
+ description: |
+ lg10 : conversion from film log
isdata: false
allocation: uniform
- allocationvars: [0, 1]
- to_reference: !<FileTransform> {src: lg10.spi1d, interpolation: nearest}
-
- - !<ColorSpace>
- name: lg8
- family: lg
- bitdepth: 8ui
- isdata: false
- allocation: uniform
- allocationvars: [0, 1]
to_reference: !<FileTransform> {src: lg10.spi1d, interpolation: nearest}
- !<ColorSpace>
name: lgf
family: lg
bitdepth: 32f
+ description: |
+ lgf : conversion from film log
isdata: false
allocation: uniform
allocationvars: [-0.25, 1.5]
to_reference: !<FileTransform> {src: lgf.spi1d, interpolation: linear}
- !<ColorSpace>
- name: gn16
- family: gn
- bitdepth: 16ui
- isdata: false
- allocation: uniform
- allocationvars: [0, 1]
- to_reference: !<FileTransform> {src: gn16.spi1d, interpolation: nearest}
-
- - !<ColorSpace>
name: gn10
family: gn
bitdepth: 10ui
+ description: |
+ gn10 : The 10bit int conversion from Panalog to linear
isdata: false
allocation: uniform
- allocationvars: [0, 1]
- to_reference: !<FileTransform> {src: gn16.spi1d, interpolation: nearest}
-
- - !<ColorSpace>
- name: gn8
- family: gn
- bitdepth: 8ui
- isdata: false
- allocation: uniform
- allocationvars: [0, 1]
- to_reference: !<FileTransform> {src: gn16.spi1d, interpolation: nearest}
-
- - !<ColorSpace>
- name: gnf
- family: gn
- bitdepth: 32f
- isdata: false
- allocation: uniform
- allocationvars: [-0.25, 1.5]
- to_reference: !<FileTransform> {src: gnf.spi1d, interpolation: linear}
+ to_reference: !<FileTransform> {src: gn10.spi1d, interpolation: nearest}
- !<ColorSpace>
name: vd16
family: vd
bitdepth: 16ui
+ description: |
+ vd16 :conversion from a gamma 2.2
isdata: false
allocation: uniform
- allocationvars: [0, 1]
- to_reference: !<GroupTransform>
- children:
- - !<FileTransform> {src: version_8_whitebalanced.spimtx, interpolation: unknown, direction: inverse}
- - !<FileTransform> {src: vd16.spi1d, interpolation: nearest}
-
- - !<ColorSpace>
- name: vd8
- family: vd
- bitdepth: 8ui
- isdata: false
- allocation: uniform
- allocationvars: [0, 1]
to_reference: !<GroupTransform>
children:
- !<FileTransform> {src: version_8_whitebalanced.spimtx, interpolation: unknown, direction: inverse}
name: vd10
family: vd
bitdepth: 10ui
+ description: |
+ vd10 :conversion from a gamma 2.2
isdata: false
allocation: uniform
- allocationvars: [0, 1]
to_reference: !<GroupTransform>
children:
- !<FileTransform> {src: version_8_whitebalanced.spimtx, interpolation: unknown, direction: inverse}
- - !<FileTransform> {src: vd16.spi1d, interpolation: nearest}
+ - !<FileTransform> {src: vd10.spi1d, interpolation: nearest}
- !<ColorSpace>
- name: vdf
+ name: vd8
family: vd
- bitdepth: 32f
+ bitdepth: 8ui
+ description: |
+ vd8 :conversion from a gamma 2.2
isdata: false
allocation: uniform
- allocationvars: [0, 1]
to_reference: !<GroupTransform>
children:
- - !<ColorSpaceTransform> {src: vd16, dst: lnf}
+ - !<FileTransform> {src: version_8_whitebalanced.spimtx, interpolation: unknown, direction: inverse}
+ - !<FileTransform> {src: vd8.spi1d, interpolation: nearest}
- !<ColorSpace>
name: hd10
family: hd
bitdepth: 10ui
+ description: |
+ hd10 : The simple 10bit int conversion from REC709 to linear
isdata: false
allocation: uniform
- allocationvars: [0, 1]
to_reference: !<GroupTransform>
children:
- !<FileTransform> {src: hdOffset.spimtx, interpolation: nearest, direction: inverse}
- - !<ColorSpaceTransform> {src: vdf, dst: lnf}
-
- - !<ColorSpace>
- name: dt8
- family: dt
- bitdepth: 8ui
- isdata: false
- allocation: uniform
- allocationvars: [0, 1]
- to_reference: !<GroupTransform>
- children:
- - !<FileTransform> {src: diffuseTextureMultiplier.spimtx, interpolation: nearest}
- - !<ColorSpaceTransform> {src: vdf, dst: lnf}
+ - !<ColorSpaceTransform> {src: vd16, dst: lnf}
- !<ColorSpace>
name: dt16
family: dt
bitdepth: 16ui
+ description: |
+ dt16 :conversion for diffuse texture
isdata: false
allocation: uniform
- allocationvars: [0, 1]
to_reference: !<GroupTransform>
children:
- !<FileTransform> {src: diffuseTextureMultiplier.spimtx, interpolation: nearest}
- - !<ColorSpaceTransform> {src: vdf, dst: lnf}
+ - !<ColorSpaceTransform> {src: vd16, dst: lnf}
- !<ColorSpace>
name: cpf
family: cp
bitdepth: 32f
+ description: |
+ cpf :video like conversion used for color picking
isdata: false
allocation: uniform
- allocationvars: [0, 1]
- to_reference: !<GroupTransform>
- children:
- - !<FileTransform> {src: cpf.spi1d, interpolation: linear}
+ to_reference: !<FileTransform> {src: cpf.spi1d, interpolation: linear}
- !<ColorSpace>
name: nc8
family: nc
bitdepth: 8ui
+ description: |
+ nc8 :nc,Non-color used to store non-color data such as depth or surface normals
isdata: true
allocation: uniform
- allocationvars: [0, 1]
- !<ColorSpace>
name: nc10
family: nc
bitdepth: 10ui
+ description: |
+ nc10 :nc,Non-color used to store non-color data such as depth or surface normals
isdata: true
allocation: uniform
- allocationvars: [0, 1]
- !<ColorSpace>
name: nc16
family: nc
bitdepth: 16ui
- isdata: false
+ description: |
+ nc16 :nc,Non-color used to store non-color data such as depth or surface normals
+ isdata: true
allocation: uniform
- allocationvars: [0, 1]
- !<ColorSpace>
name: ncf
family: nc
bitdepth: 32f
+ description: |
+ ncf :nc,Non-color used to store non-color data such as depth or surface normals
isdata: true
allocation: uniform
- allocationvars: [0, 1]
- !<ColorSpace>
name: srgb8
family: srgb
bitdepth: 8ui
+ description: |
+ srgb8 :rgb display space for the srgb standard.
isdata: false
allocation: uniform
- allocationvars: [0, 1]
from_reference: !<GroupTransform>
children:
- !<ColorSpaceTransform> {src: lnf, dst: lg10}
- !<ColorSpace>
name: p3dci8
family: p3dci
- bitdepth: 16ui
+ bitdepth: 8ui
+ description: |
+ p3dci8 :rgb display space for gamma 2.6 P3 projection.
isdata: false
allocation: uniform
- allocationvars: [0, 1]
from_reference: !<GroupTransform>
children:
- !<ColorSpaceTransform> {src: lnf, dst: lg10}
- !<FileTransform> {src: colorworks_filmlg_to_p3.3dl, interpolation: linear}
-
- - !<ColorSpace>
- name: xyz16
- family: xyz
- bitdepth: 16ui
- isdata: false
- allocation: uniform
- allocationvars: [0, 1]
- from_reference: !<GroupTransform>
- children:
- - !<ColorSpaceTransform> {src: lnf, dst: p3dci8}
- - !<ExponentTransform> {value: [2.6, 2.6, 2.6, 1]}
- - !<FileTransform> {src: p3_to_xyz16.spimtx, interpolation: unknown}
- - !<ExponentTransform> {value: [2.6, 2.6, 2.6, 1], direction: inverse}