From 3aa727e3dd6640a486334d35a0a649156515b5a4 Mon Sep 17 00:00:00 2001 From: Kaz Tanaka Date: Tue, 31 Jan 2012 10:57:47 -0800 Subject: [PATCH] added xyz16 color space transform matrix was corrected to use the proper dcip3 white point gain (48 vs. 53) --- spi-anim/config.ocio | 33 +++++------ spi-anim/luts/p3_to_xyz16_corrected_wp.spimtx | 3 + spi-anim/makeconfig_anim.py | 20 +++---- spi-vfx/config.ocio | 77 ++++++++++++------------- spi-vfx/luts/p3_to_xyz16_corrected_wp.spimtx | 3 + spi-vfx/make_vfx_ocio.py | 8 +-- 6 files changed, 72 insertions(+), 72 deletions(-) create mode 100644 spi-anim/luts/p3_to_xyz16_corrected_wp.spimtx create mode 100644 spi-vfx/luts/p3_to_xyz16_corrected_wp.spimtx diff --git a/spi-anim/config.ocio b/spi-anim/config.ocio index ee77c35..32f148c 100644 --- a/spi-anim/config.ocio +++ b/spi-anim/config.ocio @@ -36,7 +36,6 @@ colorspaces: bitdepth: 32f description: | lnf :linear show space - isdata: false allocation: lg2 allocationvars: [-13, 4] @@ -48,7 +47,6 @@ colorspaces: bitdepth: 16f description: | lnh :linear show space - isdata: false allocation: lg2 allocationvars: [-13, 4] @@ -60,7 +58,6 @@ colorspaces: 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 to_reference: ! {src: lm16.spi1d, interpolation: linear} @@ -72,7 +69,6 @@ colorspaces: 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 to_reference: ! {src: lm10.spi1d, interpolation: linear} @@ -84,7 +80,6 @@ colorspaces: 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.2, 2.484] @@ -97,7 +92,6 @@ colorspaces: bitdepth: 16ui description: | vd16 : The simple video conversion from a gamma 2.2 srgb space - isdata: false allocation: uniform to_reference: ! @@ -111,7 +105,6 @@ colorspaces: bitdepth: 10ui description: | vd10 : The simple video conversion from a gamma 2.2 srgb space - isdata: false allocation: uniform to_reference: ! @@ -125,7 +118,6 @@ colorspaces: bitdepth: 8ui description: | vd8 : The simple video conversion from a gamma 2.2 srgb space - isdata: false allocation: uniform to_reference: ! @@ -139,7 +131,6 @@ colorspaces: bitdepth: 10ui description: | hd10 : The simple conversion for REC709 - isdata: false allocation: uniform to_reference: ! @@ -154,7 +145,6 @@ colorspaces: bitdepth: 16ui description: | dt16 :diffuse texture conversion - isdata: false allocation: uniform to_reference: ! @@ -169,7 +159,6 @@ colorspaces: bitdepth: 16ui description: | mp16 : conversion for matte painting - isdata: false allocation: uniform to_reference: ! @@ -184,7 +173,6 @@ colorspaces: bitdepth: 32f description: | cpf :video like conversion used for color picking - isdata: false allocation: uniform to_reference: ! {src: cpf.spi1d, interpolation: nearest} @@ -196,7 +184,6 @@ colorspaces: bitdepth: 8ui description: | nc8 :nc,Non-color used to store non-color data such as depth or surface normals - isdata: true allocation: uniform @@ -207,7 +194,6 @@ colorspaces: bitdepth: 10ui description: | nc10 :nc,Non-color used to store non-color data such as depth or surface normals - isdata: true allocation: uniform @@ -218,7 +204,6 @@ colorspaces: bitdepth: 16ui description: | nc16 :nc,Non-color used to store non-color data such as depth or surface normals - isdata: true allocation: uniform @@ -229,7 +214,6 @@ colorspaces: bitdepth: 32f description: | ncf :nc,Non-color used to store non-color data such as depth or surface normals - isdata: true allocation: uniform @@ -240,7 +224,6 @@ colorspaces: bitdepth: 8ui description: | p3dci8 : 8 Bit int rgb display space for gamma 2.6 P3 projection. - isdata: false allocation: uniform from_reference: ! @@ -252,3 +235,19 @@ colorspaces: - ! {src: htr_dlp_tweak.spimtx, interpolation: linear} - ! {value: [2.6, 2.6, 2.6, 1], direction: inverse} - ! {src: correction.spi1d, cccid: forward, interpolation: linear} + + - ! + name: xyz16 + family: xyz + equalitygroup: + bitdepth: 16ui + description: | + xyz16 : 16 Bit int space for DCP creation. + isdata: false + allocation: uniform + from_reference: ! + children: + - ! {src: lnf, dst: p3dci8} + - ! {value: [2.6, 2.6, 2.6, 1]} + - ! {src: p3_to_xyz16_corrected_wp.spimtx, interpolation: unknown} + - ! {value: [2.6, 2.6, 2.6, 1], direction: inverse} diff --git a/spi-anim/luts/p3_to_xyz16_corrected_wp.spimtx b/spi-anim/luts/p3_to_xyz16_corrected_wp.spimtx new file mode 100644 index 0000000..3f15723 --- /dev/null +++ b/spi-anim/luts/p3_to_xyz16_corrected_wp.spimtx @@ -0,0 +1,3 @@ +0.408022745 0.254009006 0.157906591 0 +0.192010703 0.661381940 0.0631626363 0 +0.0 0.0431336048 0.831641377 0 diff --git a/spi-anim/makeconfig_anim.py b/spi-anim/makeconfig_anim.py index e3ff191..20ffd37 100644 --- a/spi-anim/makeconfig_anim.py +++ b/spi-anim/makeconfig_anim.py @@ -6,7 +6,7 @@ OCIO = SpImport.SpComp2("PyOpenColorIO",2) -outputfilename = "spi-anim.ocio" +outputfilename = "config.ocio" config = OCIO.Config() @@ -163,10 +163,10 @@ 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. +# 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 appropriate 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.") @@ -182,17 +182,17 @@ groupTransform.push_back(OCIO.FileTransform('correction.spi1d',OCIO.Constants.TR 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)) +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_corrected_wp.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','vd16'], ['Log','lm10'],['Raw','nc10']]: diff --git a/spi-vfx/config.ocio b/spi-vfx/config.ocio index 204af1a..21aa337 100644 --- a/spi-vfx/config.ocio +++ b/spi-vfx/config.ocio @@ -32,11 +32,10 @@ colorspaces: - ! name: lnf family: ln - equalitygroup: ln + equalitygroup: bitdepth: 32f description: | lnf : linear show space - isdata: false allocation: lg2 allocationvars: [-15, 6] @@ -44,11 +43,10 @@ colorspaces: - ! name: lnh family: ln - equalitygroup: ln + equalitygroup: bitdepth: 16f description: | lnh : linear show space - isdata: false allocation: lg2 allocationvars: [-15, 6] @@ -56,11 +54,10 @@ colorspaces: - ! name: ln16 family: ln - equalitygroup: ln + equalitygroup: bitdepth: 16ui description: | ln16 : linear show space - isdata: false allocation: lg2 allocationvars: [-15, 0] @@ -68,11 +65,10 @@ colorspaces: - ! name: lg16 family: lg - equalitygroup: lg + equalitygroup: bitdepth: 16ui description: | lg16 : conversion from film log - isdata: false allocation: uniform to_reference: ! {src: lg16.spi1d, interpolation: nearest} @@ -80,11 +76,10 @@ colorspaces: - ! name: lg10 family: lg - equalitygroup: lg + equalitygroup: bitdepth: 10ui description: | lg10 : conversion from film log - isdata: false allocation: uniform to_reference: ! {src: lg10.spi1d, interpolation: nearest} @@ -92,11 +87,10 @@ colorspaces: - ! name: lgf family: lg - equalitygroup: lg + equalitygroup: bitdepth: 32f description: | lgf : conversion from film log - isdata: false allocation: uniform allocationvars: [-0.25, 1.5] @@ -105,11 +99,10 @@ colorspaces: - ! name: gn10 family: gn - equalitygroup: gn + equalitygroup: bitdepth: 10ui description: | - gn10 : The 10bit int conversion from Panalog to linear - + gn10 :conversion from Panalog isdata: false allocation: uniform to_reference: ! {src: gn10.spi1d, interpolation: nearest} @@ -117,11 +110,10 @@ colorspaces: - ! name: vd16 family: vd - equalitygroup: vd + equalitygroup: bitdepth: 16ui description: | vd16 :conversion from a gamma 2.2 - isdata: false allocation: uniform to_reference: ! @@ -132,11 +124,10 @@ colorspaces: - ! name: vd10 family: vd - equalitygroup: vd + equalitygroup: bitdepth: 10ui description: | vd10 :conversion from a gamma 2.2 - isdata: false allocation: uniform to_reference: ! @@ -147,11 +138,10 @@ colorspaces: - ! name: vd8 family: vd - equalitygroup: vd + equalitygroup: bitdepth: 8ui description: | vd8 :conversion from a gamma 2.2 - isdata: false allocation: uniform to_reference: ! @@ -162,11 +152,10 @@ colorspaces: - ! name: hd10 family: hd - equalitygroup: hd + equalitygroup: bitdepth: 10ui description: | - hd10 : The simple 10bit int conversion from REC709 to linear - + hd10 : conversion from REC709 isdata: false allocation: uniform to_reference: ! @@ -177,11 +166,10 @@ colorspaces: - ! name: dt16 family: dt - equalitygroup: dt + equalitygroup: bitdepth: 16ui description: | dt16 :conversion for diffuse texture - isdata: false allocation: uniform to_reference: ! @@ -192,11 +180,10 @@ colorspaces: - ! name: cpf family: cp - equalitygroup: cp + equalitygroup: bitdepth: 32f description: | cpf :video like conversion used for color picking - isdata: false allocation: uniform to_reference: ! {src: cpf.spi1d, interpolation: linear} @@ -204,55 +191,50 @@ colorspaces: - ! name: nc8 family: nc - equalitygroup: nc + equalitygroup: bitdepth: 8ui description: | nc8 :nc,Non-color used to store non-color data such as depth or surface normals - isdata: true allocation: uniform - ! name: nc10 family: nc - equalitygroup: nc + equalitygroup: bitdepth: 10ui description: | nc10 :nc,Non-color used to store non-color data such as depth or surface normals - isdata: true allocation: uniform - ! name: nc16 family: nc - equalitygroup: nc + equalitygroup: bitdepth: 16ui description: | nc16 :nc,Non-color used to store non-color data such as depth or surface normals - isdata: true allocation: uniform - ! name: ncf family: nc - equalitygroup: nc + equalitygroup: bitdepth: 32f description: | ncf :nc,Non-color used to store non-color data such as depth or surface normals - isdata: true allocation: uniform - ! name: srgb8 family: srgb - equalitygroup: srgb + equalitygroup: bitdepth: 8ui description: | srgb8 :rgb display space for the srgb standard. - isdata: false allocation: uniform from_reference: ! @@ -263,14 +245,29 @@ colorspaces: - ! name: p3dci8 family: p3dci - equalitygroup: p3dci + equalitygroup: bitdepth: 8ui description: | p3dci8 :rgb display space for gamma 2.6 P3 projection. - isdata: false allocation: uniform from_reference: ! children: - ! {src: lnf, dst: lg10} - ! {src: colorworks_filmlg_to_p3.3dl, interpolation: linear} + + - ! + name: xyz16 + family: xyz + equalitygroup: + bitdepth: 16ui + description: | + xyz16 :Conversion for DCP creation. + isdata: false + allocation: uniform + from_reference: ! + children: + - ! {src: lnf, dst: p3dci8} + - ! {value: [2.6, 2.6, 2.6, 1]} + - ! {src: p3_to_xyz16_corrected_wp.spimtx, interpolation: unknown} + - ! {value: [2.6, 2.6, 2.6, 1], direction: inverse} diff --git a/spi-vfx/luts/p3_to_xyz16_corrected_wp.spimtx b/spi-vfx/luts/p3_to_xyz16_corrected_wp.spimtx new file mode 100644 index 0000000..3f15723 --- /dev/null +++ b/spi-vfx/luts/p3_to_xyz16_corrected_wp.spimtx @@ -0,0 +1,3 @@ +0.408022745 0.254009006 0.157906591 0 +0.192010703 0.661381940 0.0631626363 0 +0.0 0.0431336048 0.831641377 0 diff --git a/spi-vfx/make_vfx_ocio.py b/spi-vfx/make_vfx_ocio.py index f945580..d590804 100644 --- a/spi-vfx/make_vfx_ocio.py +++ b/spi-vfx/make_vfx_ocio.py @@ -7,7 +7,7 @@ OCIO = SpImport.SpComp2("PyOpenColorIO",2) print "OCIO",OCIO.version -outputfilename = "spi-vfx.ocio" +outputfilename = "config.ocio" config = OCIO.Config() @@ -203,19 +203,17 @@ 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.FileTransform('p3_to_xyz16_corrected_wp.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 ################################################################## -- 1.7.10.4