X-Git-Url: http://users.mur.at/ms/git/gitweb/?p=OpenColorIO-Configs.git;a=blobdiff_plain;f=nuke-default%2Fmake.py;fp=nuke-default%2Fmake.py;h=de115648f49dff503f8b313b71a55f3cb002d7a0;hp=05f3e7ba93ea5beeae359ab218c76f90d328bef4;hb=c0ff0e96574e823606a81e62e3867d9d8ba238db;hpb=3aa727e3dd6640a486334d35a0a649156515b5a4 diff --git a/nuke-default/make.py b/nuke-default/make.py index 05f3e7b..de11564 100755 --- a/nuke-default/make.py +++ b/nuke-default/make.py @@ -96,6 +96,28 @@ cs.setTransform(t, OCIO.Constants.COLORSPACE_DIR_TO_REFERENCE) 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):