added xyz16 color space
authorKaz Tanaka <kazunori_tanaka@mac.com>
Tue, 31 Jan 2012 18:57:47 +0000 (10:57 -0800)
committerJeremy Selan <jeremy.selan@gmail.com>
Wed, 1 Feb 2012 18:44:31 +0000 (10:44 -0800)
transform matrix was corrected to use the proper dcip3 white point gain  (48 vs.
53)

spi-anim/config.ocio
spi-anim/luts/p3_to_xyz16_corrected_wp.spimtx [new file with mode: 0644]
spi-anim/makeconfig_anim.py
spi-vfx/config.ocio
spi-vfx/luts/p3_to_xyz16_corrected_wp.spimtx [new file with mode: 0644]
spi-vfx/make_vfx_ocio.py

index ee77c35..32f148c 100644 (file)
@@ -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: !<FileTransform> {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: !<FileTransform> {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: !<GroupTransform>
@@ -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: !<GroupTransform>
@@ -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: !<GroupTransform>
@@ -139,7 +131,6 @@ colorspaces:
     bitdepth: 10ui
     description: |
       hd10 : The simple conversion for REC709
-      
     isdata: false
     allocation: uniform
     to_reference: !<GroupTransform>
@@ -154,7 +145,6 @@ colorspaces:
     bitdepth: 16ui
     description: |
       dt16 :diffuse texture conversion
-      
     isdata: false
     allocation: uniform
     to_reference: !<GroupTransform>
@@ -169,7 +159,6 @@ colorspaces:
     bitdepth: 16ui
     description: |
       mp16 : conversion for matte painting
-      
     isdata: false
     allocation: uniform
     to_reference: !<GroupTransform>
@@ -184,7 +173,6 @@ colorspaces:
     bitdepth: 32f
     description: |
       cpf :video like conversion used for color picking 
-      
     isdata: false
     allocation: uniform
     to_reference: !<FileTransform> {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: !<GroupTransform>
@@ -252,3 +235,19 @@ colorspaces:
         - !<FileTransform> {src: htr_dlp_tweak.spimtx, interpolation: linear}
         - !<ExponentTransform> {value: [2.6, 2.6, 2.6, 1], direction: inverse}
         - !<FileTransform> {src: correction.spi1d, cccid: forward, interpolation: linear}
+
+  - !<ColorSpace>
+    name: xyz16
+    family: xyz
+    equalitygroup: 
+    bitdepth: 16ui
+    description: |
+      xyz16 : 16 Bit int space for DCP creation.
+    isdata: false
+    allocation: uniform
+    from_reference: !<GroupTransform>
+      children:
+        - !<ColorSpaceTransform> {src: lnf, dst: p3dci8}
+        - !<ExponentTransform> {value: [2.6, 2.6, 2.6, 1]}
+        - !<FileTransform> {src: p3_to_xyz16_corrected_wp.spimtx, interpolation: unknown}
+        - !<ExponentTransform> {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 (file)
index 0000000..3f15723
--- /dev/null
@@ -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
index e3ff191..20ffd37 100644 (file)
@@ -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']]:
index 204af1a..21aa337 100644 (file)
@@ -32,11 +32,10 @@ colorspaces:
   - !<ColorSpace>
     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:
   - !<ColorSpace>
     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:
   - !<ColorSpace>
     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:
   - !<ColorSpace>
     name: lg16
     family: lg
-    equalitygroup: lg
+    equalitygroup: 
     bitdepth: 16ui
     description: |
       lg16 : conversion from film log 
-      
     isdata: false
     allocation: uniform
     to_reference: !<FileTransform> {src: lg16.spi1d, interpolation: nearest}
@@ -80,11 +76,10 @@ colorspaces:
   - !<ColorSpace>
     name: lg10
     family: lg
-    equalitygroup: lg
+    equalitygroup: 
     bitdepth: 10ui
     description: |
       lg10 : conversion from film log
-      
     isdata: false
     allocation: uniform
     to_reference: !<FileTransform> {src: lg10.spi1d, interpolation: nearest}
@@ -92,11 +87,10 @@ colorspaces:
   - !<ColorSpace>
     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:
   - !<ColorSpace>
     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: !<FileTransform> {src: gn10.spi1d, interpolation: nearest}
@@ -117,11 +110,10 @@ colorspaces:
   - !<ColorSpace>
     name: vd16
     family: vd
-    equalitygroup: vd
+    equalitygroup: 
     bitdepth: 16ui
     description: |
       vd16 :conversion from a gamma 2.2 
-      
     isdata: false
     allocation: uniform
     to_reference: !<GroupTransform>
@@ -132,11 +124,10 @@ colorspaces:
   - !<ColorSpace>
     name: vd10
     family: vd
-    equalitygroup: vd
+    equalitygroup: 
     bitdepth: 10ui
     description: |
       vd10 :conversion from a gamma 2.2 
-      
     isdata: false
     allocation: uniform
     to_reference: !<GroupTransform>
@@ -147,11 +138,10 @@ colorspaces:
   - !<ColorSpace>
     name: vd8
     family: vd
-    equalitygroup: vd
+    equalitygroup: 
     bitdepth: 8ui
     description: |
       vd8 :conversion from a gamma 2.2
-      
     isdata: false
     allocation: uniform
     to_reference: !<GroupTransform>
@@ -162,11 +152,10 @@ colorspaces:
   - !<ColorSpace>
     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: !<GroupTransform>
@@ -177,11 +166,10 @@ colorspaces:
   - !<ColorSpace>
     name: dt16
     family: dt
-    equalitygroup: dt
+    equalitygroup: 
     bitdepth: 16ui
     description: |
       dt16 :conversion for diffuse texture
-      
     isdata: false
     allocation: uniform
     to_reference: !<GroupTransform>
@@ -192,11 +180,10 @@ colorspaces:
   - !<ColorSpace>
     name: cpf
     family: cp
-    equalitygroup: cp
+    equalitygroup: 
     bitdepth: 32f
     description: |
       cpf :video like conversion used for color picking 
-      
     isdata: false
     allocation: uniform
     to_reference: !<FileTransform> {src: cpf.spi1d, interpolation: linear}
@@ -204,55 +191,50 @@ colorspaces:
   - !<ColorSpace>
     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
 
   - !<ColorSpace>
     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
 
   - !<ColorSpace>
     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
 
   - !<ColorSpace>
     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
 
   - !<ColorSpace>
     name: srgb8
     family: srgb
-    equalitygroup: srgb
+    equalitygroup: 
     bitdepth: 8ui
     description: |
       srgb8 :rgb display space for the srgb standard.
-      
     isdata: false
     allocation: uniform
     from_reference: !<GroupTransform>
@@ -263,14 +245,29 @@ colorspaces:
   - !<ColorSpace>
     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: !<GroupTransform>
       children:
         - !<ColorSpaceTransform> {src: lnf, dst: lg10}
         - !<FileTransform> {src: colorworks_filmlg_to_p3.3dl, interpolation: linear}
+
+  - !<ColorSpace>
+    name: xyz16
+    family: xyz
+    equalitygroup: 
+    bitdepth: 16ui
+    description: |
+      xyz16 :Conversion for  DCP creation.
+    isdata: false
+    allocation: uniform
+    from_reference: !<GroupTransform>
+      children:
+        - !<ColorSpaceTransform> {src: lnf, dst: p3dci8}
+        - !<ExponentTransform> {value: [2.6, 2.6, 2.6, 1]}
+        - !<FileTransform> {src: p3_to_xyz16_corrected_wp.spimtx, interpolation: unknown}
+        - !<ExponentTransform> {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 (file)
index 0000000..3f15723
--- /dev/null
@@ -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
index f945580..d590804 100644 (file)
@@ -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 ##################################################################