set cut_paste_input [stack 0] push $cut_paste_input Dot { name Dot24 label " ACEScg IN" note_font "Helvetica Bold" note_font_size 24 note_font_color 0xff selected true xpos 296 ypos 3786 } Group { name RenderingPrimaries tile_color 0xbd91c9ff selected true xpos 262 ypos 4173 addUserKnob {20 GamutConvert_tab l GamutConvert} addUserKnob {26 gamut_chromaticities_label l " " T "SRC Gamut Chromaticity Coordinates"} addUserKnob {35 src_presets l preset M {gamut/ACES "knobs this \{rxy \{0.73470 0.26530\} gxy \{0.00000 1.00000\} bxy \{0.00010 -0.07700\} wxy \{0.32168 0.33767\} src_colorspace_name \{ACES\}\}; python -exec nuke.thisNode().knob('calculate_matrix').execute()" gamut/ACEScg "knobs this \{rxy \{0.713 0.293\} gxy \{0.165 0.830\} bxy \{0.128 0.044\} wxy \{0.32168 0.33767\} src_colorspace_name \{ACEScg\}\}; python -exec nuke.thisNode().knob('calculate_matrix').execute()" "gamut/Filmlight E-Gamut" "knobs this \{ rxy \{0.8 0.3177\} gxy \{0.18 0.9\} bxy \{0.065 -0.0805\} wxy \{0.3127 0.329\} src_colorspace_name \{Filmlight E-Gamut\}\}; python -exec nuke.thisNode().knob('calculate_matrix').execute()" "gamut/DaVinci WG" "knobs this \{ rxy \{0.8 0.3130\} gxy \{0.1682 0.9877\} bxy \{0.079 -0.1155\} wxy \{0.3127 0.329\} src_colorspace_name \{DaVinci WG\}\}; python -exec nuke.thisNode().knob('calculate_matrix').execute()" gamut/Rec709 "knobs this \{rxy \{0.64000 0.33000\} gxy \{0.30000 0.60000\} bxy \{0.15000 0.06000\} wxy \{0.3127 0.329\} src_colorspace_name \{Rec709\}\}; python -exec nuke.thisNode().knob('calculate_matrix').execute()" gamut/Rec2020 "knobs this \{rxy \{0.70800 0.29200\} gxy \{0.17000 0.79700\} bxy \{0.13100 0.04600\} wxy \{0.3127 0.329\} src_colorspace_name \{Rec2020\}\}; python -exec nuke.thisNode().knob('calculate_matrix').execute()" gamut/P3D60 "knobs this \{rxy \{0.68000 0.32000\} gxy \{0.26500 0.69000\} bxy \{0.15000 0.06000\} wxy \{0.32168 0.33767\} src_colorspace_name \{P3D60\}\}; python -exec nuke.thisNode().knob('calculate_matrix').execute()" gamut/P3D65 "knobs this \{rxy \{0.68000 0.32000\} gxy \{0.26500 0.69000\} bxy \{0.15000 0.06000\} wxy \{0.3127 0.329\} src_colorspace_name \{P3D65\}\}; python -exec nuke.thisNode().knob('calculate_matrix').execute()" gamut/P3DCI "knobs this \{rxy \{0.68000 0.32000\} gxy \{0.26500 0.69000\} bxy \{0.15000 0.06000\} wxy \{0.314 0.351\} src_colorspace_name \{P3DCI\}\}; python -exec nuke.thisNode().knob('calculate_matrix').execute()" "gamut/Arri AlexaWideGamut" "knobs this \{rxy \{0.68400 0.31300\} gxy \{0.22100 0.84800\} bxy \{0.08610 -0.10200\} wxy \{0.3127 0.329\} src_colorspace_name \{Arri AlexaWideGamut\}\}; python -exec nuke.thisNode().knob('calculate_matrix').execute()" gamut/REDDRAGONcolor "knobs this \{rxy \{0.753044222785 0.327830576682\} gxy \{0.299570228481 0.700699321956\} bxy \{0.079642066735 -0.0549379510888\} wxy \{0.321683187724 0.337673316035\} src_colorspace_name \{REDDRAGONcolor\}\}; python -exec nuke.thisNode().knob('calculate_matrix').execute()" gamut/REDDRAGONcolor2 "knobs this \{rxy \{0.753044491143 0.327831029513\} gxy \{0.299570490451 0.700699415614\} bxy \{0.145011584278 0.0510971250879\} wxy \{0.321683210353 0.337673610062\} src_colorspace_name \{REDDRAGONcolor2\}\}; python -exec nuke.thisNode().knob('calculate_matrix').execute()" gamut/REDcolor "knobs this \{rxy \{0.699747001291 0.329046930313\} gxy \{0.304264039024 0.623641145129\} bxy \{0.134913961296 0.0347174412813\} wxy \{0.321683289449 0.337673447208\} src_colorspace_name \{REDcolor\}\}; python -exec nuke.thisNode().knob('calculate_matrix').execute()" gamut/REDcolor2 "knobs this \{rxy \{0.878682510476 0.32496400741\} gxy \{0.300888714367 0.679054755791\} bxy \{0.0953986946056 -0.0293793268343\} wxy \{0.321683289449 0.337673447208\} src_colorspace_name \{REDcolor2\}\}; python -exec nuke.thisNode().knob('calculate_matrix').execute()" gamut/REDcolor3 "knobs this \{rxy \{0.701181035906 0.329014155583\} gxy \{0.300600304652 0.683788834269\} bxy \{0.108154455624 -0.00868817578666\} wxy \{0.321683210353 0.337673610062\} src_colorspace_name \{REDcolor3\}\}; python -exec nuke.thisNode().knob('calculate_matrix').execute()" gamut/REDcolor4 "knobs this \{rxy \{0.701180591892 0.329013699116\} gxy \{0.300600395529 0.683788824257\} bxy \{0.145331946229 0.0516168036226\} wxy \{0.321683289449 0.337673447208\} src_colorspace_name \{REDcolor4\}\}; python -exec nuke.thisNode().knob('calculate_matrix').execute()" gamut/REDWideGamutRGB "knobs this \{rxy \{0.780308 0.304253\} gxy \{0.121595 1.493994\} bxy \{0.095612 -0.084589\} wxy \{0.3127 0.329\} src_colorspace_name \{REDWideGamutRGB\}\}; python -exec nuke.thisNode().knob('calculate_matrix').execute()" "gamut/GoPro Protune Native" "knobs this \{rxy \{0.69848046 0.19302645\} gxy \{0.32955538 1.02459662\} bxy \{0.10844263 -0.03467857\} wxy \{0.3127 0.329\} src_colorspace_name \{GoPro Protune Native\}\}; python -exec nuke.thisNode().knob('calculate_matrix').execute()" gamut/CanonCinemaGamut "knobs this \{rxy \{0.74 0.27\} gxy \{0.17 1.14\} bxy \{0.08 -0.1\} wxy \{0.3127 0.329\} src_colorspace_name \{CanonCinemaGamut\}\}; python -exec nuke.thisNode().knob('calculate_matrix').execute()" gamut/SonySGamut "knobs this \{rxy \{0.73 0.28\} gxy \{0.14 0.855\} bxy \{0.1 -0.05\} wxy \{0.3127 0.329\} src_colorspace_name \{SonySGamut\}\}; python -exec nuke.thisNode().knob('calculate_matrix').execute()" gamut/SonySGamut3Cine "knobs this \{rxy \{0.766 0.275\} gxy \{0.225 0.8\} bxy \{0.089 -0.087\} wxy \{0.3127 0.329\} src_colorspace_name \{SonySGamut3Cine\}\}; python -exec nuke.thisNode().knob('calculate_matrix').execute()" gamut/PanasonicVGamut "knobs this \{rxy \{0.730 0.280\} gxy \{0.165 0.840\} bxy \{0.100 -0.030\} wxy \{0.3127 0.329\} src_colorspace_name \{PanasonicVGamut\}\}; python -exec nuke.thisNode().knob('calculate_matrix').execute()" "gamut/DJI D-Gamut" "knobs this \{rxy \{0.71 0.31\} gxy \{0.21 0.88\} bxy \{0.09 -0.08\} wxy \{0.3127 0.329\} src_colorspace_name \{DJI D-Gamut\}\}; python -exec nuke.thisNode().knob('calculate_matrix').execute()" "gamut/Fujifilm F-Gamut" "knobs this \{rxy \{0.70800 0.29200\} gxy \{0.17000 0.79700\} bxy \{0.13100 0.04600\} wxy \{0.3127 0.329\} src_colorspace_name \{Fujifilm F-Gamut\}\}; python -exec nuke.thisNode().knob('calculate_matrix').execute()" gamut/BMDFilmV1 "knobs this \{rxy \{0.9173 0.2502\} gxy \{0.2833 1.7072\} bxy \{0.0856 -0.0708\} wxy \{0.3135 0.3305\} src_colorspace_name \{BMDFilmV1\}\}; python -exec nuke.thisNode().knob('calculate_matrix').execute()" gamut/BMD4kFilmV1 "knobs this \{rxy \{0.7422 0.2859\} gxy \{0.4140 1.3035\} bxy \{0.0342 -0.0833\} wxy \{0.3135 0.3305\} src_colorspace_name \{BMD4kFilmV1\}\}; python -exec nuke.thisNode().knob('calculate_matrix').execute()" gamut/BMD4kFilmV3 "knobs this \{rxy \{1.0625 0.3948\} gxy \{0.3689 0.7775\} bxy \{0.0956 -0.0332\} wxy \{0.3135 0.3305\} src_colorspace_name \{BMD4kFilmV3\}\}; python -exec nuke.thisNode().knob('calculate_matrix').execute()" gamut/BMD46kFilmV1 "knobs this \{rxy \{0.9175 0.2983\} gxy \{0.2983 1.2835\} bxy \{0.0756 -0.0860\} wxy \{0.3127 0.329\} src_colorspace_name \{BMD46kFilmV1\}\}; python -exec nuke.thisNode().knob('calculate_matrix').execute()" gamut/BMD46kFilmV3 "knobs this \{rxy \{0.8608 0.3689\} gxy \{0.3282 0.6156\} bxy \{0.0783 -0.0233\} wxy \{0.3127 0.329\} src_colorspace_name \{BMD46kFilmV3\}\}; python -exec nuke.thisNode().knob('calculate_matrix').execute()" gamut/BMDWideGamutV4 "knobs this \{rxy \{0.7177 0.3171\} gxy \{0.2280 0.8616\} bxy \{0.1006 -0.0820\} wxy \{0.3127 0.329\} src_colorspace_name \{BMDWideGamutV4\}\}; python -exec nuke.thisNode().knob('calculate_matrix').execute()" "gamut/AdobeRGB\t" "knobs this \{rxy \{0.6400 0.3300\} gxy \{0.2100 0.7100\} bxy \{0.1500 0.0600\} wxy \{0.3127 0.329\} src_colorspace_name \{AdobeRGB\}\}; python -exec nuke.thisNode().knob('calculate_matrix').execute()" gamut/AdobeWideGamutRGB "knobs this \{rxy \{0.7347 0.2653\} gxy \{0.1152 0.8264\} bxy \{0.1566 0.0177\} wxy \{0.3457 0.3585\} src_colorspace_name \{AdobeWideGamutRGB\}\}; python -exec nuke.thisNode().knob('calculate_matrix').execute()" gamut/ROMM "knobs this \{rxy \{7.34700000e-01 2.65300000e-01\} gxy \{1.59600000e-01 8.40400000e-01\} bxy \{3.66000000e-02 1.00000000e-04\} wxy \{0.3457 0.3585\} src_colorspace_name \{ROMM\}\}; python -exec nuke.thisNode().knob('calculate_matrix').execute()" gamut/RIMM "knobs this \{rxy \{7.34700000e-01 2.65300000e-01\} gxy \{1.59600000e-01 8.40400000e-01\} bxy \{3.66000000e-02 1.00000000e-04\} wxy \{0.3457 0.3585\} src_colorspace_name \{RIMM\}\}; python -exec nuke.thisNode().knob('calculate_matrix').execute()" gamut/ERIMM "knobs this \{rxy \{7.34700000e-01 2.65300000e-01\} gxy \{1.59600000e-01 8.40400000e-01\} bxy \{3.66000000e-02 1.00000000e-04\} wxy \{0.3457 0.3585\} src_colorspace_name \{ERIMM\}\}; python -exec nuke.thisNode().knob('calculate_matrix').execute()" gamut/ProPhotoRGB "knobs this \{rxy \{0.734699 0.265301\} gxy \{0.159597 0.840403\} bxy \{0.036598 0.000105\} wxy \{0.345704 0.358540\} src_colorspace_name \{ProPhotoRGB\}\}; python -exec nuke.thisNode().knob('calculate_matrix').execute()" gamut/RusselRGB "knobs this \{rxy \{0.6900 0.3100\} gxy \{0.1800 0.7700\} bxy \{0.1000 0.0200\} wxy \{0.33243 0.34744\} src_colorspace_name \{RusselRGB\}\}; python -exec nuke.thisNode().knob('calculate_matrix').execute()" gamut/SharpRGB "knobs this \{rxy \{0.6898 0.3206\} gxy \{0.0736 0.9003\} bxy \{0.1166 0.0374\} wxy \{0.33333333 0.33333333\} src_colorspace_name \{SharpRGB\}\}; python -exec nuke.thisNode().knob('calculate_matrix').execute()" gamut/AppleRGB "knobs this \{rxy \{0.6250 0.3400\} gxy \{0.2800 0.5950\} bxy \{0.1550 0.0700\} wxy \{0.3127 0.329\} src_colorspace_name \{AppleRGB\}\}; python -exec nuke.thisNode().knob('calculate_matrix').execute()" gamut/BestRGB "knobs this \{rxy \{0.735191637630662 0.264808362369338\} gxy \{0.215336134453781 0.774159663865546\} bxy \{0.130122950819672 0.034836065573770\} wxy \{0.3457 0.3585\} src_colorspace_name \{BestRGB\}\}; python -exec nuke.thisNode().knob('calculate_matrix').execute()" "gamut/XYZ D60" "knobs this \{rxy \{1 0\} gxy \{0 1\} bxy \{0 0\} wxy \{0.32162624 0.337737\} src_colorspace_name \{XYZ D60\}\}; python -exec nuke.thisNode().knob('calculate_matrix').execute()" "gamut/XYZ D65" "knobs this \{rxy \{1 0\} gxy \{0 1\} bxy \{0 0\} wxy \{0.3127 0.329\} src_colorspace_name \{XYZ D65\}\}; python -exec nuke.thisNode().knob('calculate_matrix').execute()" "gamut/XYZ E" "knobs this \{rxy \{1 0\} gxy \{0 1\} bxy \{0 0\} wxy \{0.333333333333 0.333333333333\} src_colorspace_name \{XYZ E\}\}; python -exec nuke.thisNode().knob('calculate_matrix').execute()"}} addUserKnob {12 rxy l r t "Red xy chromaticity coordinates in CIE 1931 colorspace."} rxy {0.713 0.293} addUserKnob {12 gxy l g t "Green xy chromaticity coordinates in CIE 1931 colorspace."} gxy {0.165 0.83} addUserKnob {12 bxy l b t "Blue xy chromaticity coordinates in CIE 1931 colorspace."} bxy {0.128 0.044} addUserKnob {12 wxy l w t "Whitepoint xy chromaticity coordinates in CIE 1931 colorspace."} wxy {0.32168 0.33767} addUserKnob {1 src_colorspace_name l src +DISABLED} src_colorspace_name ACEScg addUserKnob {26 ""} addUserKnob {26 dst_gamut_chromaticities_label l " " T "DST Gamut Chromaticity Coordinates"} addUserKnob {35 dst_presets l preset M {gamut/ACES "knobs this \{drxy \{0.73470 0.26530\} dgxy \{0.00000 1.00000\} dbxy \{0.00010 -0.07700\} dwxy \{0.32168 0.33767\} dst_colorspace_name \{ACES\}\}; python -exec nuke.thisNode().knob('calculate_matrix').execute()" gamut/ACEScg "knobs this \{drxy \{0.713 0.293\} dgxy \{0.165 0.830\} dbxy \{0.128 0.044\} dwxy \{0.32168 0.33767\} dst_colorspace_name \{ACEScg\}\}; python -exec nuke.thisNode().knob('calculate_matrix').execute()" "gamut/Filmlight E-Gamut" "knobs this \{ drxy \{0.8 0.3177\} dgxy \{0.18 0.9\} dbxy \{0.065 -0.0805\} dwxy \{0.3127 0.329\} dst_colorspace_name \{Filmlight E-Gamut\}\}; python -exec nuke.thisNode().knob('calculate_matrix').execute()" "gamut/DaVinci WG" "knobs this \{ drxy \{0.8 0.3130\} dgxy \{0.1682 0.9877\} dbxy \{0.079 -0.1155\} dwxy \{0.3127 0.329\} dst_colorspace_name \{DaVinci WG\}\}; python -exec nuke.thisNode().knob('calculate_matrix').execute()" gamut/Rec709 "knobs this \{drxy \{0.64000 0.33000\} dgxy \{0.30000 0.60000\} dbxy \{0.15000 0.06000\} dwxy \{0.3127 0.329\} dst_colorspace_name \{Rec709\}\}; python -exec nuke.thisNode().knob('calculate_matrix').execute()" gamut/Rec2020 "knobs this \{drxy \{0.70800 0.29200\} dgxy \{0.17000 0.79700\} dbxy \{0.13100 0.04600\} dwxy \{0.3127 0.329\} dst_colorspace_name \{Rec2020\}\}; python -exec nuke.thisNode().knob('calculate_matrix').execute()" gamut/P3D60 "knobs this \{drxy \{0.68000 0.32000\} dgxy \{0.26500 0.69000\} dbxy \{0.15000 0.06000\} dwxy \{0.32168 0.33767\} dst_colorspace_name \{P3D60\}\}; python -exec nuke.thisNode().knob('calculate_matrix').execute()" gamut/P3D65 "knobs this \{drxy \{0.68000 0.32000\} dgxy \{0.26500 0.69000\} dbxy \{0.15000 0.06000\} dwxy \{0.3127 0.329\} dst_colorspace_name \{P3D65\}\}; python -exec nuke.thisNode().knob('calculate_matrix').execute()" gamut/P3DCI "knobs this \{drxy \{0.68000 0.32000\} dgxy \{0.26500 0.69000\} dbxy \{0.15000 0.06000\} dwxy \{0.314 0.351\} dst_colorspace_name \{P3DCI\}\}; python -exec nuke.thisNode().knob('calculate_matrix').execute()" "gamut/Arri AlexaWideGamut" "knobs this \{drxy \{0.68400 0.31300\} dgxy \{0.22100 0.84800\} dbxy \{0.08610 -0.10200\} dwxy \{0.3127 0.329\} dst_colorspace_name \{Arri AlexaWideGamut\}\}; python -exec nuke.thisNode().knob('calculate_matrix').execute()" gamut/REDDRAGONcolor "knobs this \{drxy \{0.753044222785 0.327830576682\} dgxy \{0.299570228481 0.700699321956\} dbxy \{0.079642066735 -0.0549379510888\} dwxy \{0.321683187724 0.337673316035\} dst_colorspace_name \{REDDRAGONcolor\}\}; python -exec nuke.thisNode().knob('calculate_matrix').execute()" gamut/REDDRAGONcolor2 "knobs this \{drxy \{0.753044491143 0.327831029513\} dgxy \{0.299570490451 0.700699415614\} dbxy \{0.145011584278 0.0510971250879\} dwxy \{0.321683210353 0.337673610062\} dst_colorspace_name \{REDDRAGONcolor2\}\}; python -exec nuke.thisNode().knob('calculate_matrix').execute()" gamut/REDcolor "knobs this \{drxy \{0.699747001291 0.329046930313\} dgxy \{0.304264039024 0.623641145129\} dbxy \{0.134913961296 0.0347174412813\} dwxy \{0.321683289449 0.337673447208\} dst_colorspace_name \{REDcolor\}\}; python -exec nuke.thisNode().knob('calculate_matrix').execute()" gamut/REDcolor2 "knobs this \{drxy \{0.878682510476 0.32496400741\} dgxy \{0.300888714367 0.679054755791\} dbxy \{0.0953986946056 -0.0293793268343\} dwxy \{0.321683289449 0.337673447208\} dst_colorspace_name \{REDcolor2\}\}; python -exec nuke.thisNode().knob('calculate_matrix').execute()" gamut/REDcolor3 "knobs this \{drxy \{0.701181035906 0.329014155583\} dgxy \{0.300600304652 0.683788834269\} dbxy \{0.108154455624 -0.00868817578666\} dwxy \{0.321683210353 0.337673610062\} dst_colorspace_name \{REDcolor3\}\}; python -exec nuke.thisNode().knob('calculate_matrix').execute()" gamut/REDcolor4 "knobs this \{drxy \{0.701180591892 0.329013699116\} dgxy \{0.300600395529 0.683788824257\} dbxy \{0.145331946229 0.0516168036226\} dwxy \{0.321683289449 0.337673447208\} dst_colorspace_name \{REDcolor4\}\}; python -exec nuke.thisNode().knob('calculate_matrix').execute()" gamut/REDWideGamutRGB "knobs this \{drxy \{0.780308 0.304253\} dgxy \{0.121595 1.493994\} dbxy \{0.095612 -0.084589\} dwxy \{0.3127 0.329\} dst_colorspace_name \{REDWideGamutRGB\}\}; python -exec nuke.thisNode().knob('calculate_matrix').execute()" "gamut/GoPro Protune Native" "knobs this \{drxy \{0.69848046 0.19302645\} dgxy \{0.32955538 1.02459662\} dbxy \{0.10844263 -0.03467857\} dwxy \{0.3127 0.329\} dst_colorspace_name \{GoPro Protune Native\}\}; python -exec nuke.thisNode().knob('calculate_matrix').execute()" gamut/CanonCinemaGamut "knobs this \{drxy \{0.74 0.27\} dgxy \{0.17 1.14\} dbxy \{0.08 -0.1\} dwxy \{0.3127 0.329\} dst_colorspace_name \{CanonCinemaGamut\}\}; python -exec nuke.thisNode().knob('calculate_matrix').execute()" gamut/SonySGamut "knobs this \{drxy \{0.73 0.28\} dgxy \{0.14 0.855\} dbxy \{0.1 -0.05\} dwxy \{0.3127 0.329\} dst_colorspace_name \{SonySGamut\}\}; python -exec nuke.thisNode().knob('calculate_matrix').execute()" gamut/SonySGamut3Cine "knobs this \{drxy \{0.766 0.275\} dgxy \{0.225 0.8\} dbxy \{0.089 -0.087\} dwxy \{0.3127 0.329\} dst_colorspace_name \{SonySGamut3Cine\}\}; python -exec nuke.thisNode().knob('calculate_matrix').execute()" gamut/PanasonicVGamut "knobs this \{drxy \{0.730 0.280\} dgxy \{0.165 0.840\} dbxy \{0.100 -0.030\} dwxy \{0.3127 0.329\} dst_colorspace_name \{PanasonicVGamut\}\}; python -exec nuke.thisNode().knob('calculate_matrix').execute()" "gamut/DJI D-Gamut" "knobs this \{drxy \{0.71 0.31\} dgxy \{0.21 0.88\} dbxy \{0.09 -0.08\} dwxy \{0.3127 0.329\} dst_colorspace_name \{DJI D-Gamut\}\}; python -exec nuke.thisNode().knob('calculate_matrix').execute()" "gamut/Fujifilm F-Gamut" "knobs this \{drxy \{0.70800 0.29200\} dgxy \{0.17000 0.79700\} dbxy \{0.13100 0.04600\} dwxy \{0.3127 0.329\} dst_colorspace_name \{Fujifilm F-Gamut\}\}; python -exec nuke.thisNode().knob('calculate_matrix').execute()" gamut/BMDFilmV1 "knobs this \{drxy \{0.9173 0.2502\} dgxy \{0.2833 1.7072\} dbxy \{0.0856 -0.0708\} dwxy \{0.3135 0.3305\} dst_colorspace_name \{BMDFilmV1\}\}; python -exec nuke.thisNode().knob('calculate_matrix').execute()" gamut/BMD4kFilmV1 "knobs this \{drxy \{0.7422 0.2859\} dgxy \{0.4140 1.3035\} dbxy \{0.0342 -0.0833\} dwxy \{0.3135 0.3305\} dst_colorspace_name \{BMD4kFilmV1\}\}; python -exec nuke.thisNode().knob('calculate_matrix').execute()" gamut/BMD4kFilmV3 "knobs this \{drxy \{1.0625 0.3948\} dgxy \{0.3689 0.7775\} dbxy \{0.0956 -0.0332\} dwxy \{0.3135 0.3305\} dst_colorspace_name \{BMD4kFilmV3\}\}; python -exec nuke.thisNode().knob('calculate_matrix').execute()" gamut/BMD46kFilmV1 "knobs this \{drxy \{0.9175 0.2983\} dgxy \{0.2983 1.2835\} dbxy \{0.0756 -0.0860\} dwxy \{0.3127 0.329\} dst_colorspace_name \{BMD46kFilmV1\}\}; python -exec nuke.thisNode().knob('calculate_matrix').execute()" gamut/BMD46kFilmV3 "knobs this \{drxy \{0.8608 0.3689\} dgxy \{0.3282 0.6156\} dbxy \{0.0783 -0.0233\} dwxy \{0.3127 0.329\} dst_colorspace_name \{BMD46kFilmV3\}\}; python -exec nuke.thisNode().knob('calculate_matrix').execute()" gamut/BMDWideGamutV4 "knobs this \{drxy \{0.7177 0.3171\} dgxy \{0.2280 0.8616\} dbxy \{0.1006 -0.0820\} dwxy \{0.3127 0.329\} dst_colorspace_name \{BMDWideGamutV4\}\}; python -exec nuke.thisNode().knob('calculate_matrix').execute()" "gamut/AdobeRGB\t" "knobs this \{drxy \{0.6400 0.3300\} dgxy \{0.2100 0.7100\} dbxy \{0.1500 0.0600\} dwxy \{0.3127 0.329\} dst_colorspace_name \{AdobeRGB\}\}; python -exec nuke.thisNode().knob('calculate_matrix').execute()" gamut/AdobeWideGamutRGB "knobs this \{drxy \{0.7347 0.2653\} dgxy \{0.1152 0.8264\} dbxy \{0.1566 0.0177\} dwxy \{0.3457 0.3585\} dst_colorspace_name \{AdobeWideGamutRGB\}\}; python -exec nuke.thisNode().knob('calculate_matrix').execute()" gamut/ROMM "knobs this \{drxy \{7.34700000e-01 2.65300000e-01\} dgxy \{1.59600000e-01 8.40400000e-01\} dbxy \{3.66000000e-02 1.00000000e-04\} dwxy \{0.3457 0.3585\} dst_colorspace_name \{ROMM\}\}; python -exec nuke.thisNode().knob('calculate_matrix').execute()" gamut/RIMM "knobs this \{drxy \{7.34700000e-01 2.65300000e-01\} dgxy \{1.59600000e-01 8.40400000e-01\} dbxy \{3.66000000e-02 1.00000000e-04\} dwxy \{0.3457 0.3585\} dst_colorspace_name \{RIMM\}\}; python -exec nuke.thisNode().knob('calculate_matrix').execute()" gamut/ERIMM "knobs this \{drxy \{7.34700000e-01 2.65300000e-01\} dgxy \{1.59600000e-01 8.40400000e-01\} dbxy \{3.66000000e-02 1.00000000e-04\} dwxy \{0.3457 0.3585\} dst_colorspace_name \{ERIMM\}\}; python -exec nuke.thisNode().knob('calculate_matrix').execute()" gamut/ProPhotoRGB "knobs this \{drxy \{0.734699 0.265301\} dgxy \{0.159597 0.840403\} dbxy \{0.036598 0.000105\} dwxy \{0.345704 0.358540\} dst_colorspace_name \{ProPhotoRGB\}\}; python -exec nuke.thisNode().knob('calculate_matrix').execute()" gamut/RusselRGB "knobs this \{drxy \{0.6900 0.3100\} dgxy \{0.1800 0.7700\} dbxy \{0.1000 0.0200\} dwxy \{0.33243 0.34744\} dst_colorspace_name \{RusselRGB\}\}; python -exec nuke.thisNode().knob('calculate_matrix').execute()" gamut/SharpRGB "knobs this \{drxy \{0.6898 0.3206\} dgxy \{0.0736 0.9003\} dbxy \{0.1166 0.0374\} dwxy \{0.33333333 0.33333333\} dst_colorspace_name \{SharpRGB\}\}; python -exec nuke.thisNode().knob('calculate_matrix').execute()" gamut/AppleRGB "knobs this \{drxy \{0.6250 0.3400\} dgxy \{0.2800 0.5950\} dbxy \{0.1550 0.0700\} dwxy \{0.3127 0.329\} dst_colorspace_name \{AppleRGB\}\}; python -exec nuke.thisNode().knob('calculate_matrix').execute()" gamut/BestRGB "knobs this \{drxy \{0.735191637630662 0.264808362369338\} dgxy \{0.215336134453781 0.774159663865546\} dbxy \{0.130122950819672 0.034836065573770\} dwxy \{0.3457 0.3585\} dst_colorspace_name \{BestRGB\}\}; python -exec nuke.thisNode().knob('calculate_matrix').execute()" "gamut/XYZ D60" "knobs this \{drxy \{1 0\} dgxy \{0 1\} dbxy \{0 0\} dwxy \{0.32162624 0.337737\} dst_colorspace_name \{XYZ D60\}\}; python -exec nuke.thisNode().knob('calculate_matrix').execute()" "gamut/XYZ D65" "knobs this \{drxy \{1 0\} dgxy \{0 1\} dbxy \{0 0\} dwxy \{0.3127 0.329\} dst_colorspace_name \{XYZ D65\}\}; python -exec nuke.thisNode().knob('calculate_matrix').execute()" "gamut/XYZ E" "knobs this \{drxy \{1 0\} dgxy \{0 1\} dbxy \{0 0\} dwxy \{0.333333333333 0.333333333333\} dst_colorspace_name \{XYZ E\}\}; python -exec nuke.thisNode().knob('calculate_matrix').execute()"}} addUserKnob {12 drxy l r t "Red xy chromaticity coordinates in CIE 1931 colorspace."} drxy {0.8125976563 0.2649462891} addUserKnob {12 dgxy l g t "Green xy chromaticity coordinates in CIE 1931 colorspace."} dgxy {0.13046875 0.9126953125} addUserKnob {12 dbxy l b t "Blue xy chromaticity coordinates in CIE 1931 colorspace."} dbxy {0.089453125 -0.1078125} addUserKnob {12 dwxy l w t "Whitepoint xy chromaticity coordinates in CIE 1931 colorspace."} dwxy {0.32168 0.33767} addUserKnob {1 dst_colorspace_name l dst +DISABLED} dst_colorspace_name ACEScg addUserKnob {26 ""} addUserKnob {26 chromatic_adaptation_label l " " T "Chromatic Adaptation"} addUserKnob {4 cat_method l method t "Choose the chromatic adaptation method for adapting whitepoint." M {cat02 bradford cmccat2000 xyz_scaling none "" fairchild bianco cat02_brill_cat bianco_pc cmccat97 sharp von_kries "" ""}} addUserKnob {26 ""} addUserKnob {6 invert t "Invert direction of matrix." +STARTLINE} addUserKnob {22 calculate_matrix l "Calculate Matrix" t "Calculate 3x3 matrix based on the specified colorspace chromaticities." T "import nuke\nfloat3 = nuke.math.Vector3\nfloat3x3 = nuke.math.Matrix3\n\n\ndef transpose(m):\n # Transpose (swap rows and columns) of a nuke.math.Matrix3\n return float3x3(m\[0], m\[1], m\[2], m\[3], m\[4], m\[5], m\[6], m\[7], m\[8])\n\ndef set_matrix(m):\n # Populate a nuke.math.Matrix3 with a 3x3 python list (either 3x3 or 1x9)\n if len(m) is 3 and \[isinstance(r, list) for r in m]:\n m = sum(m, \[])\n o = float3x3(m\[0], m\[3], m\[6], m\[1], m\[4], m\[7], m\[2], m\[5], m\[8])\n return o\n\ndef diag(v):\n # Create a diagonal 3x3 matrix from a 1x3 vector\n return float3x3(v\[0], 0, 0, 0, v\[1], 0, 0, 0, v\[2])\n\n\ndef xyY_to_XYZ(xyY):\n # Convert an xyY chromaticity value to XYZ\n x = xyY\[0]\n y = xyY\[1]\n if len(xyY) is 2:\n # Assume an xy chromaticity coordinate, use default Y\n Y = 1.0\n else:\n Y = xyY\[2]\n XYZ = float3(x * Y / max(y, 1e-10), Y, (1.0 - x - y) * Y / max(y, 1e-10))\n return XYZ\n\ndef xy_to_xyz(xy):\n return float3(xy\[0], xy\[1], 1.0 - xy\[0] - xy\[1])\n\n\ndef calc_cat(src_xy, dst_xy, cat_method='cat02'):\n # Calculate Von Kries chromatic adaptation transform matrix,\n # given a source and destination illuminant and CAT method.\n # Illuminant is given as xy chromaticity coordinates. \n # CAT method is the name of one of the below cone response matrices.\n\n crmtxs = \{\n \"bianco\": \[\[0.8752, 0.2787, -0.1539], \[-0.8904, 1.8709, 0.0195], \[-0.0061, 0.0162, 0.9899]],\n \"bianco_pc\": \[\[0.6489, 0.3915, -0.0404], \[-0.3775, 1.3055, 0.072], \[-0.0271, 0.0888, 0.9383]],\n \"bradford\": \[\[0.8951, 0.2664, -0.1614], \[-0.7502, 1.7135, 0.0367], \[0.0389, -0.0685, 1.0296]],\n \"cat02\": \[\[0.7328, 0.4296, -0.1624], \[-0.7036, 1.6975, 0.0061], \[0.003, 0.0136, 0.9834]],\n \"cat02_brill_cat\": \[\[0.7328, 0.4296, -0.1624], \[-0.7036, 1.6975, 0.0061], \[0.0, 0.0, 1.0]],\n \"cmccat2000\": \[\[0.7982, 0.3389, -0.1371], \[-0.5918, 1.5512, 0.0406], \[0.0008, 0.0239, 0.9753]],\n \"cmccat97\": \[\[0.8951, -0.7502, 0.0389], \[0.2664, 1.7135, 0.0685], \[-0.1614, 0.0367, 1.0296]],\n \"fairchild\": \[\[0.8562, 0.3372, -0.1934], \[-0.836, 1.8327, 0.0033], \[0.0357, -0.0469, 1.0112]],\n \"sharp\": \[\[1.2694, -0.0988, -0.1706], \[-0.8364, 1.8006, 0.0357], \[0.0297, -0.0315, 1.0018]],\n \"von_kries\": \[\[0.40024, 0.7076, -0.08081], \[-0.2263, 1.16532, 0.0457], \[0.0, 0.0, 0.91822]],\n \"xyz_scaling\": \[\[1.0, 0.0, 0.0], \[0.0, 1.0, 0.0], \[0.0, 0.0, 1.0]]\n \}\n \n cat_method = cat_method.lower().replace(' ', '_')\n # Return identity matrix if no match\n if cat_method not in crmtxs.keys():\n m = float3x3()\n m.makeIdentity()\n return m\n \n crmtx = set_matrix(crmtxs\[cat_method])\n\n # Get XYZ values from xy chromaticity coordinates\n src_XYZ = xyY_to_XYZ(src_xy)\n dst_XYZ = xyY_to_XYZ(dst_xy)\n\n # Calculate source and destination cone response matrices\n src_crmtx = transpose(crmtx) * src_XYZ\n dst_crmtx = transpose(crmtx) * dst_XYZ\n\n von_kries_matrix = diag(dst_crmtx / src_crmtx)\n cat_mtx = float3x3()\n cat_mtx = crmtx * (von_kries_matrix * crmtx.inverse())\n\n return cat_mtx\n\n\ndef calc_npm(chr):\n # Calculate a normalized primaries matrix from the specified chromaticity coordinates,\n # given 2x4 list of xy chromaticity coordinates: red, green, blue, and white\n rxyz, gxyz, bxyz, wxyz = map(xy_to_xyz, chr)\n wy = chr\[3]\[1]\n wxyz = float3(wxyz.x / wy, wxyz.y / wy, wxyz.z / wy)\n np_mtx = float3x3(rxyz\[0], gxyz\[0], bxyz\[0],\n rxyz\[1], gxyz\[1], bxyz\[1],\n rxyz\[2], gxyz\[2], bxyz\[2])\n wscale = np_mtx.inverse() * wxyz \n np_mtx = transpose(np_mtx * diag(wscale))\n return np_mtx\n\ndef is_xyz(c):\n # return true if primaries are XYZ\n return c\[:3] == \[\[1.0, 0.0], \[0.0, 1.0], \[0.0, 0.0]]\n\n\ndef start(node):\n identity_mtx = float3x3()\n identity_mtx.makeIdentity()\n\n invert = node\['invert'].getValue()\n cat_method = node\['cat_method'].value()\n\n src_chr = \[node\[k].getValue() for k in \['rxy', 'gxy', 'bxy', 'wxy']]\n dst_chr = \[node\[k].getValue() for k in \['drxy', 'dgxy', 'dbxy', 'dwxy']]\n\n # bypass double scale if source or destination is XYZ\n if is_xyz(src_chr):\n rgb_to_xyz = identity_mtx\n else:\n rgb_to_xyz = calc_npm(src_chr)\n \n if is_xyz(dst_chr):\n xyz_to_rgb = identity_mtx\n else:\n xyz_to_rgb = calc_npm(dst_chr).inverse()\n\n if src_chr\[3] == dst_chr\[3]:\n cat_mtx = identity_mtx\n else:\n cat_mtx = calc_cat(src_chr\[3], dst_chr\[3], cat_method)\n\n mtx = (rgb_to_xyz * cat_mtx) * xyz_to_rgb\n\n if invert:\n mtx = mtx.inverse()\n\n node\['matrix'].setValue(mtx)\n\n\nif __name__=='__main__':\n start(nuke.thisNode())" +STARTLINE} addUserKnob {22 create_matrix_node l "Create Matrix" t "Create ColorMatrix node with the current values." -STARTLINE T "node = nuke.thisNode()\nnode\['calculate_matrix'].execute()\nnuke.root().begin()\n_ = \[n.setSelected(False) for n in nuke.allNodes(recurseGroups=True)]\nm = nuke.createNode('ColorMatrix')\nm\['matrix'].setValue(node\['matrix'].getValue())\nm.setXYpos(node.xpos()-120, node.ypos())\nsrc_name = node\['src_colorspace_name'].getValue()\ndst_name = node\['dst_colorspace_name'].getValue()\nif node\['invert'].getValue():\n label = '\{1\} to \{0\}'.format(src_name, dst_name)\nelse:\n label = '\{0\} to \{1\}'.format(src_name, dst_name)\nm\['label'].setValue(label)"} addUserKnob {41 matrix T ColorMatrix.matrix} addUserKnob {22 clear l Clear T "n = nuke.thisNode()\nn\['matrix'].setValue(\[1,0,0,0,1,0,0,0,1])\nn\['label'].setValue('')" +STARTLINE} addUserKnob {22 show_matrix l Show t "Show matrix values in a popup window for copying." T "node = nuke.thisNode()\nshow_4x4 = node\['show_matrix_4x4'].getValue()\nshow_commas = node\['show_matrix_commas'].getValue()\n\nif show_commas:\n sep = ', '\nelse:\n sep = ' '\n\nmtx = \[format(i, '.8f') for i in node\['matrix'].getValue()]\n\nif show_4x4:\n z = \['0']\n mtx = mtx\[0:3] + z + mtx\[3:6] + z + mtx\[6:9] + z*4 + \['1']\n\nnuke.message(sep.join(mtx))" +STARTLINE} addUserKnob {6 show_matrix_4x4 l "show 4x4" t "present values in a 4x4 matrix (useful for ocio)" -STARTLINE} addUserKnob {6 show_matrix_commas l "show comma sep" t "show matrix comma separated." -STARTLINE} addUserKnob {22 save_spimtx l "Save spimtx" T "# inspired by ColorMatrixPlus by hpd\ndef write_spimtx(mtx_node, spimtx_file):\n mtx_vals = mtx_node\['matrix'].getValue()\n with open(spimtx_file, \"w\") as f:\n f.write( \"%3.6f %3.6f %3.6f 0.0\\n\" % (\n mtx_vals\[0], mtx_vals\[1], mtx_vals\[2]) )\n f.write( \"%3.6f %3.6f %3.6f 0.0\\n\" % (\n mtx_vals\[3], mtx_vals\[4], mtx_vals\[5]) )\n f.write( \"%3.6f %3.6f %3.6f 0.0\\n\" % (\n mtx_vals\[6], mtx_vals\[7], mtx_vals\[8]) )\n\nnode = nuke.thisNode()\nfilepath = nuke.getFilename('Save Matrix', '*.spimtx')\n\nif filepath:\n if not filepath.endswith('.spimtx'):\n filepath = filepath + '.spimtx'\n write_spimtx(node, filepath)" +STARTLINE} addUserKnob {22 load_spimtx l "Load spimtx" -STARTLINE T "# Inspired by ColorMatrixPlus by hpd\ndef load_spimtx(spimtx, mtx_node):\n with open( spimtx, 'r') as file:\n lines = file.readlines()\n matrix_values = list()\n for line in lines:\n matrix_values.extend( map(float, line.strip().split(' ')\[0:3]) )\n mtx_node\['matrix'].setValue(matrix_values)\n\nspimtx = nuke.getFilename('Load SPIMTX', '*.spimtx')\nif spimtx:\n load_spimtx( spimtx, nuke.thisNode() )\n"} } Input { inputs 0 name Input xpos -40 ypos 206 } ColorMatrix { matrix { {0.8891872168 0.04843750596 0.0623754859} {0.07645788789 0.7566657662 0.1668763906} {0.05304532498 0.03478367627 0.9121709466} } name ColorMatrix xpos -40 ypos 254 } Output { name Output xpos -40 ypos 302 } end_group set N56c6fcc0 [stack 0] Group { name Tonemap_Siragusano_Presets1 selected true xpos 262 ypos 4280 addUserKnob {20 Tonemap} addUserKnob {35 presets l " " M {"presets/SDR - Dark" "knobs this \{Lp 100 Lw 105 Lr 160 w 0 p 1.3 t0 0.02 n \{Lw/Lp\}\}" "presets/SDR - Dim" "knobs this \{Lp 100 Lw 105 Lr 160 w 0 p 1.25 t0 0.02 n \{Lw/Lp\}\}" "presets/SDR - Average" "knobs this \{Lp 100 Lw 105 Lr 160 w 0 p 1.2 t0 0.02 n \{Lw/Lp\}\}" "presets/Rec.2100 PQ ST-2084 600 nit" "knobs this \{Lp 10000 Lw 642 Lr 115 w 0 p 1.15 t0 0.02 n \{Lw/Lp\}\}" "presets/Rec.2100 PQ ST-2084 1000 nit" "knobs this \{Lp 10000 Lw 1100 Lr 120 w 0 p 1.15 t0 0.02 n \{Lw/Lp\}\}" "presets/Rec.2100 PQ ST-2084 2000 nit" "knobs this \{Lp 10000 Lw 2300 Lr 120 w 0.1 p 1.15 t0 0.02 n \{Lw/Lp\}\}" "presets/Rec.2100 PQ ST-2084 4000 nit" "knobs this \{Lp 10000 Lw 4970 Lr 120 w 0.2 p 1.15 t0 0.02 n \{Lw/Lp\}\}"}} addUserKnob {7 Lp t "peak white" R 100 10000} Lp 100 addUserKnob {7 Lw t "Peak white in nits" R 100 4000} Lw 105 addUserKnob {7 Lr t "Reference white in nits." R 48 1000} Lr 160 addUserKnob {7 w l exposure t "scene-referred exposure control" R -2 2} addUserKnob {7 p l contrast t "display-referred power function" R 0.8 2} p 1.2 addUserKnob {7 t0 l toe t "shadow toe flare compensation" R 0 0.1} t0 0.02 addUserKnob {78 s l scale n 2} s {{pow(s.1,1/p)/pow(2,w)} {Lw/Lr}} addUserKnob {7 n l normalize t "normalize peak to output" R 0 2} n {{Lw/Lp}} addUserKnob {4 direction M {forward inverse}} } Input { inputs 0 name Input xpos -40 ypos -40 } set Nfeceda60 [stack 0] Expression { expr0 r*(s.1/n) expr1 g*(s.1/n) expr2 b*(s.1/n) name InvScale note_font Helvetica xpos 70 ypos 21 } Expression { expr0 (r+sqrt(r*(r+4*t0)))/2 expr1 (g+sqrt(g*(g+4*t0)))/2 expr2 (b+sqrt(b*(b+4*t0)))/2 name InvToe note_font Helvetica xpos 70 ypos 51 } Expression { expr0 (s.0*pow(r/s.1,1/p))/(1-pow(r/s.1,1/p)) expr1 (s.0*pow(g/s.1,1/p))/(1-pow(g/s.1,1/p)) expr2 (s.0*pow(b/s.1,1/p))/(1-pow(b/s.1,1/p)) name InvCompress note_font Helvetica xpos 70 ypos 81 } push $Nfeceda60 Expression { expr0 s.1*pow(r/(r+s.0),p) expr1 s.1*pow(g/(g+s.0),p) expr2 s.1*pow(b/(b+s.0),p) name Compress note_font Helvetica xpos -150 ypos 21 } Expression { expr0 (r*r)/(r+t0) expr1 (g*g)/(g+t0) expr2 (b*b)/(b+t0) name Toe note_font Helvetica xpos -150 ypos 51 } Expression { expr0 r*(n/s.1) expr1 g*(n/s.1) expr2 b*(n/s.1) name Scale note_font Helvetica xpos -150 ypos 81 } Switch { inputs 2 which {{parent.direction}} name SwitchDirection note_font Helvetica xpos -40 ypos 141 } Output { name Output xpos -40 ypos 200 } end_group Group { name OutputPrimaries tile_color 0xbd91c9ff selected true xpos 262 ypos 4340 addUserKnob {20 GamutConvert_tab l GamutConvert} addUserKnob {26 gamut_chromaticities_label l " " T "SRC Gamut Chromaticity Coordinates"} addUserKnob {35 src_presets l preset M {gamut/ACES "knobs this \{rxy \{0.73470 0.26530\} gxy \{0.00000 1.00000\} bxy \{0.00010 -0.07700\} wxy \{0.32168 0.33767\} src_colorspace_name \{ACES\}\}; python -exec nuke.thisNode().knob('calculate_matrix').execute()" gamut/ACEScg "knobs this \{rxy \{0.713 0.293\} gxy \{0.165 0.830\} bxy \{0.128 0.044\} wxy \{0.32168 0.33767\} src_colorspace_name \{ACEScg\}\}; python -exec nuke.thisNode().knob('calculate_matrix').execute()" "gamut/Filmlight E-Gamut" "knobs this \{ rxy \{0.8 0.3177\} gxy \{0.18 0.9\} bxy \{0.065 -0.0805\} wxy \{0.3127 0.329\} src_colorspace_name \{Filmlight E-Gamut\}\}; python -exec nuke.thisNode().knob('calculate_matrix').execute()" "gamut/DaVinci WG" "knobs this \{ rxy \{0.8 0.3130\} gxy \{0.1682 0.9877\} bxy \{0.079 -0.1155\} wxy \{0.3127 0.329\} src_colorspace_name \{DaVinci WG\}\}; python -exec nuke.thisNode().knob('calculate_matrix').execute()" gamut/Rec709 "knobs this \{rxy \{0.64000 0.33000\} gxy \{0.30000 0.60000\} bxy \{0.15000 0.06000\} wxy \{0.3127 0.329\} src_colorspace_name \{Rec709\}\}; python -exec nuke.thisNode().knob('calculate_matrix').execute()" gamut/Rec2020 "knobs this \{rxy \{0.70800 0.29200\} gxy \{0.17000 0.79700\} bxy \{0.13100 0.04600\} wxy \{0.3127 0.329\} src_colorspace_name \{Rec2020\}\}; python -exec nuke.thisNode().knob('calculate_matrix').execute()" gamut/P3D60 "knobs this \{rxy \{0.68000 0.32000\} gxy \{0.26500 0.69000\} bxy \{0.15000 0.06000\} wxy \{0.32168 0.33767\} src_colorspace_name \{P3D60\}\}; python -exec nuke.thisNode().knob('calculate_matrix').execute()" gamut/P3D65 "knobs this \{rxy \{0.68000 0.32000\} gxy \{0.26500 0.69000\} bxy \{0.15000 0.06000\} wxy \{0.3127 0.329\} src_colorspace_name \{P3D65\}\}; python -exec nuke.thisNode().knob('calculate_matrix').execute()" gamut/P3DCI "knobs this \{rxy \{0.68000 0.32000\} gxy \{0.26500 0.69000\} bxy \{0.15000 0.06000\} wxy \{0.314 0.351\} src_colorspace_name \{P3DCI\}\}; python -exec nuke.thisNode().knob('calculate_matrix').execute()" "gamut/Arri AlexaWideGamut" "knobs this \{rxy \{0.68400 0.31300\} gxy \{0.22100 0.84800\} bxy \{0.08610 -0.10200\} wxy \{0.3127 0.329\} src_colorspace_name \{Arri AlexaWideGamut\}\}; python -exec nuke.thisNode().knob('calculate_matrix').execute()" gamut/REDDRAGONcolor "knobs this \{rxy \{0.753044222785 0.327830576682\} gxy \{0.299570228481 0.700699321956\} bxy \{0.079642066735 -0.0549379510888\} wxy \{0.321683187724 0.337673316035\} src_colorspace_name \{REDDRAGONcolor\}\}; python -exec nuke.thisNode().knob('calculate_matrix').execute()" gamut/REDDRAGONcolor2 "knobs this \{rxy \{0.753044491143 0.327831029513\} gxy \{0.299570490451 0.700699415614\} bxy \{0.145011584278 0.0510971250879\} wxy \{0.321683210353 0.337673610062\} src_colorspace_name \{REDDRAGONcolor2\}\}; python -exec nuke.thisNode().knob('calculate_matrix').execute()" gamut/REDcolor "knobs this \{rxy \{0.699747001291 0.329046930313\} gxy \{0.304264039024 0.623641145129\} bxy \{0.134913961296 0.0347174412813\} wxy \{0.321683289449 0.337673447208\} src_colorspace_name \{REDcolor\}\}; python -exec nuke.thisNode().knob('calculate_matrix').execute()" gamut/REDcolor2 "knobs this \{rxy \{0.878682510476 0.32496400741\} gxy \{0.300888714367 0.679054755791\} bxy \{0.0953986946056 -0.0293793268343\} wxy \{0.321683289449 0.337673447208\} src_colorspace_name \{REDcolor2\}\}; python -exec nuke.thisNode().knob('calculate_matrix').execute()" gamut/REDcolor3 "knobs this \{rxy \{0.701181035906 0.329014155583\} gxy \{0.300600304652 0.683788834269\} bxy \{0.108154455624 -0.00868817578666\} wxy \{0.321683210353 0.337673610062\} src_colorspace_name \{REDcolor3\}\}; python -exec nuke.thisNode().knob('calculate_matrix').execute()" gamut/REDcolor4 "knobs this \{rxy \{0.701180591892 0.329013699116\} gxy \{0.300600395529 0.683788824257\} bxy \{0.145331946229 0.0516168036226\} wxy \{0.321683289449 0.337673447208\} src_colorspace_name \{REDcolor4\}\}; python -exec nuke.thisNode().knob('calculate_matrix').execute()" gamut/REDWideGamutRGB "knobs this \{rxy \{0.780308 0.304253\} gxy \{0.121595 1.493994\} bxy \{0.095612 -0.084589\} wxy \{0.3127 0.329\} src_colorspace_name \{REDWideGamutRGB\}\}; python -exec nuke.thisNode().knob('calculate_matrix').execute()" "gamut/GoPro Protune Native" "knobs this \{rxy \{0.69848046 0.19302645\} gxy \{0.32955538 1.02459662\} bxy \{0.10844263 -0.03467857\} wxy \{0.3127 0.329\} src_colorspace_name \{GoPro Protune Native\}\}; python -exec nuke.thisNode().knob('calculate_matrix').execute()" gamut/CanonCinemaGamut "knobs this \{rxy \{0.74 0.27\} gxy \{0.17 1.14\} bxy \{0.08 -0.1\} wxy \{0.3127 0.329\} src_colorspace_name \{CanonCinemaGamut\}\}; python -exec nuke.thisNode().knob('calculate_matrix').execute()" gamut/SonySGamut "knobs this \{rxy \{0.73 0.28\} gxy \{0.14 0.855\} bxy \{0.1 -0.05\} wxy \{0.3127 0.329\} src_colorspace_name \{SonySGamut\}\}; python -exec nuke.thisNode().knob('calculate_matrix').execute()" gamut/SonySGamut3Cine "knobs this \{rxy \{0.766 0.275\} gxy \{0.225 0.8\} bxy \{0.089 -0.087\} wxy \{0.3127 0.329\} src_colorspace_name \{SonySGamut3Cine\}\}; python -exec nuke.thisNode().knob('calculate_matrix').execute()" gamut/PanasonicVGamut "knobs this \{rxy \{0.730 0.280\} gxy \{0.165 0.840\} bxy \{0.100 -0.030\} wxy \{0.3127 0.329\} src_colorspace_name \{PanasonicVGamut\}\}; python -exec nuke.thisNode().knob('calculate_matrix').execute()" "gamut/DJI D-Gamut" "knobs this \{rxy \{0.71 0.31\} gxy \{0.21 0.88\} bxy \{0.09 -0.08\} wxy \{0.3127 0.329\} src_colorspace_name \{DJI D-Gamut\}\}; python -exec nuke.thisNode().knob('calculate_matrix').execute()" "gamut/Fujifilm F-Gamut" "knobs this \{rxy \{0.70800 0.29200\} gxy \{0.17000 0.79700\} bxy \{0.13100 0.04600\} wxy \{0.3127 0.329\} src_colorspace_name \{Fujifilm F-Gamut\}\}; python -exec nuke.thisNode().knob('calculate_matrix').execute()" gamut/BMDFilmV1 "knobs this \{rxy \{0.9173 0.2502\} gxy \{0.2833 1.7072\} bxy \{0.0856 -0.0708\} wxy \{0.3135 0.3305\} src_colorspace_name \{BMDFilmV1\}\}; python -exec nuke.thisNode().knob('calculate_matrix').execute()" gamut/BMD4kFilmV1 "knobs this \{rxy \{0.7422 0.2859\} gxy \{0.4140 1.3035\} bxy \{0.0342 -0.0833\} wxy \{0.3135 0.3305\} src_colorspace_name \{BMD4kFilmV1\}\}; python -exec nuke.thisNode().knob('calculate_matrix').execute()" gamut/BMD4kFilmV3 "knobs this \{rxy \{1.0625 0.3948\} gxy \{0.3689 0.7775\} bxy \{0.0956 -0.0332\} wxy \{0.3135 0.3305\} src_colorspace_name \{BMD4kFilmV3\}\}; python -exec nuke.thisNode().knob('calculate_matrix').execute()" gamut/BMD46kFilmV1 "knobs this \{rxy \{0.9175 0.2983\} gxy \{0.2983 1.2835\} bxy \{0.0756 -0.0860\} wxy \{0.3127 0.329\} src_colorspace_name \{BMD46kFilmV1\}\}; python -exec nuke.thisNode().knob('calculate_matrix').execute()" gamut/BMD46kFilmV3 "knobs this \{rxy \{0.8608 0.3689\} gxy \{0.3282 0.6156\} bxy \{0.0783 -0.0233\} wxy \{0.3127 0.329\} src_colorspace_name \{BMD46kFilmV3\}\}; python -exec nuke.thisNode().knob('calculate_matrix').execute()" gamut/BMDWideGamutV4 "knobs this \{rxy \{0.7177 0.3171\} gxy \{0.2280 0.8616\} bxy \{0.1006 -0.0820\} wxy \{0.3127 0.329\} src_colorspace_name \{BMDWideGamutV4\}\}; python -exec nuke.thisNode().knob('calculate_matrix').execute()" "gamut/AdobeRGB\t" "knobs this \{rxy \{0.6400 0.3300\} gxy \{0.2100 0.7100\} bxy \{0.1500 0.0600\} wxy \{0.3127 0.329\} src_colorspace_name \{AdobeRGB\}\}; python -exec nuke.thisNode().knob('calculate_matrix').execute()" gamut/AdobeWideGamutRGB "knobs this \{rxy \{0.7347 0.2653\} gxy \{0.1152 0.8264\} bxy \{0.1566 0.0177\} wxy \{0.3457 0.3585\} src_colorspace_name \{AdobeWideGamutRGB\}\}; python -exec nuke.thisNode().knob('calculate_matrix').execute()" gamut/ROMM "knobs this \{rxy \{7.34700000e-01 2.65300000e-01\} gxy \{1.59600000e-01 8.40400000e-01\} bxy \{3.66000000e-02 1.00000000e-04\} wxy \{0.3457 0.3585\} src_colorspace_name \{ROMM\}\}; python -exec nuke.thisNode().knob('calculate_matrix').execute()" gamut/RIMM "knobs this \{rxy \{7.34700000e-01 2.65300000e-01\} gxy \{1.59600000e-01 8.40400000e-01\} bxy \{3.66000000e-02 1.00000000e-04\} wxy \{0.3457 0.3585\} src_colorspace_name \{RIMM\}\}; python -exec nuke.thisNode().knob('calculate_matrix').execute()" gamut/ERIMM "knobs this \{rxy \{7.34700000e-01 2.65300000e-01\} gxy \{1.59600000e-01 8.40400000e-01\} bxy \{3.66000000e-02 1.00000000e-04\} wxy \{0.3457 0.3585\} src_colorspace_name \{ERIMM\}\}; python -exec nuke.thisNode().knob('calculate_matrix').execute()" gamut/ProPhotoRGB "knobs this \{rxy \{0.734699 0.265301\} gxy \{0.159597 0.840403\} bxy \{0.036598 0.000105\} wxy \{0.345704 0.358540\} src_colorspace_name \{ProPhotoRGB\}\}; python -exec nuke.thisNode().knob('calculate_matrix').execute()" gamut/RusselRGB "knobs this \{rxy \{0.6900 0.3100\} gxy \{0.1800 0.7700\} bxy \{0.1000 0.0200\} wxy \{0.33243 0.34744\} src_colorspace_name \{RusselRGB\}\}; python -exec nuke.thisNode().knob('calculate_matrix').execute()" gamut/SharpRGB "knobs this \{rxy \{0.6898 0.3206\} gxy \{0.0736 0.9003\} bxy \{0.1166 0.0374\} wxy \{0.33333333 0.33333333\} src_colorspace_name \{SharpRGB\}\}; python -exec nuke.thisNode().knob('calculate_matrix').execute()" gamut/AppleRGB "knobs this \{rxy \{0.6250 0.3400\} gxy \{0.2800 0.5950\} bxy \{0.1550 0.0700\} wxy \{0.3127 0.329\} src_colorspace_name \{AppleRGB\}\}; python -exec nuke.thisNode().knob('calculate_matrix').execute()" gamut/BestRGB "knobs this \{rxy \{0.735191637630662 0.264808362369338\} gxy \{0.215336134453781 0.774159663865546\} bxy \{0.130122950819672 0.034836065573770\} wxy \{0.3457 0.3585\} src_colorspace_name \{BestRGB\}\}; python -exec nuke.thisNode().knob('calculate_matrix').execute()" "gamut/XYZ D60" "knobs this \{rxy \{1 0\} gxy \{0 1\} bxy \{0 0\} wxy \{0.32162624 0.337737\} src_colorspace_name \{XYZ D60\}\}; python -exec nuke.thisNode().knob('calculate_matrix').execute()" "gamut/XYZ D65" "knobs this \{rxy \{1 0\} gxy \{0 1\} bxy \{0 0\} wxy \{0.3127 0.329\} src_colorspace_name \{XYZ D65\}\}; python -exec nuke.thisNode().knob('calculate_matrix').execute()" "gamut/XYZ E" "knobs this \{rxy \{1 0\} gxy \{0 1\} bxy \{0 0\} wxy \{0.333333333333 0.333333333333\} src_colorspace_name \{XYZ E\}\}; python -exec nuke.thisNode().knob('calculate_matrix').execute()"}} addUserKnob {12 rxy l r t "Red xy chromaticity coordinates in CIE 1931 colorspace."} rxy {{parent.RenderingPrimaries.drxy} {parent.RenderingPrimaries.drxy}} addUserKnob {12 gxy l g t "Green xy chromaticity coordinates in CIE 1931 colorspace."} gxy {{parent.RenderingPrimaries.dgxy} {parent.RenderingPrimaries.dgxy}} addUserKnob {12 bxy l b t "Blue xy chromaticity coordinates in CIE 1931 colorspace."} bxy {{parent.RenderingPrimaries.dbxy} {parent.RenderingPrimaries.dbxy}} addUserKnob {12 wxy l w t "Whitepoint xy chromaticity coordinates in CIE 1931 colorspace."} wxy {{parent.RenderingPrimaries.dwxy} {parent.RenderingPrimaries.dwxy}} addUserKnob {1 src_colorspace_name l src +DISABLED} src_colorspace_name ACEScg addUserKnob {26 ""} addUserKnob {26 dst_gamut_chromaticities_label l " " T "DST Gamut Chromaticity Coordinates"} addUserKnob {35 dst_presets l preset M {gamut/ACES "knobs this \{drxy \{0.73470 0.26530\} dgxy \{0.00000 1.00000\} dbxy \{0.00010 -0.07700\} dwxy \{0.32168 0.33767\} dst_colorspace_name \{ACES\}\}; python -exec nuke.thisNode().knob('calculate_matrix').execute()" gamut/ACEScg "knobs this \{drxy \{0.713 0.293\} dgxy \{0.165 0.830\} dbxy \{0.128 0.044\} dwxy \{0.32168 0.33767\} dst_colorspace_name \{ACEScg\}\}; python -exec nuke.thisNode().knob('calculate_matrix').execute()" "gamut/Filmlight E-Gamut" "knobs this \{ drxy \{0.8 0.3177\} dgxy \{0.18 0.9\} dbxy \{0.065 -0.0805\} dwxy \{0.3127 0.329\} dst_colorspace_name \{Filmlight E-Gamut\}\}; python -exec nuke.thisNode().knob('calculate_matrix').execute()" "gamut/DaVinci WG" "knobs this \{ drxy \{0.8 0.3130\} dgxy \{0.1682 0.9877\} dbxy \{0.079 -0.1155\} dwxy \{0.3127 0.329\} dst_colorspace_name \{DaVinci WG\}\}; python -exec nuke.thisNode().knob('calculate_matrix').execute()" gamut/Rec709 "knobs this \{drxy \{0.64000 0.33000\} dgxy \{0.30000 0.60000\} dbxy \{0.15000 0.06000\} dwxy \{0.3127 0.329\} dst_colorspace_name \{Rec709\}\}; python -exec nuke.thisNode().knob('calculate_matrix').execute()" gamut/Rec2020 "knobs this \{drxy \{0.70800 0.29200\} dgxy \{0.17000 0.79700\} dbxy \{0.13100 0.04600\} dwxy \{0.3127 0.329\} dst_colorspace_name \{Rec2020\}\}; python -exec nuke.thisNode().knob('calculate_matrix').execute()" gamut/P3D60 "knobs this \{drxy \{0.68000 0.32000\} dgxy \{0.26500 0.69000\} dbxy \{0.15000 0.06000\} dwxy \{0.32168 0.33767\} dst_colorspace_name \{P3D60\}\}; python -exec nuke.thisNode().knob('calculate_matrix').execute()" gamut/P3D65 "knobs this \{drxy \{0.68000 0.32000\} dgxy \{0.26500 0.69000\} dbxy \{0.15000 0.06000\} dwxy \{0.3127 0.329\} dst_colorspace_name \{P3D65\}\}; python -exec nuke.thisNode().knob('calculate_matrix').execute()" gamut/P3DCI "knobs this \{drxy \{0.68000 0.32000\} dgxy \{0.26500 0.69000\} dbxy \{0.15000 0.06000\} dwxy \{0.314 0.351\} dst_colorspace_name \{P3DCI\}\}; python -exec nuke.thisNode().knob('calculate_matrix').execute()" "gamut/Arri AlexaWideGamut" "knobs this \{drxy \{0.68400 0.31300\} dgxy \{0.22100 0.84800\} dbxy \{0.08610 -0.10200\} dwxy \{0.3127 0.329\} dst_colorspace_name \{Arri AlexaWideGamut\}\}; python -exec nuke.thisNode().knob('calculate_matrix').execute()" gamut/REDDRAGONcolor "knobs this \{drxy \{0.753044222785 0.327830576682\} dgxy \{0.299570228481 0.700699321956\} dbxy \{0.079642066735 -0.0549379510888\} dwxy \{0.321683187724 0.337673316035\} dst_colorspace_name \{REDDRAGONcolor\}\}; python -exec nuke.thisNode().knob('calculate_matrix').execute()" gamut/REDDRAGONcolor2 "knobs this \{drxy \{0.753044491143 0.327831029513\} dgxy \{0.299570490451 0.700699415614\} dbxy \{0.145011584278 0.0510971250879\} dwxy \{0.321683210353 0.337673610062\} dst_colorspace_name \{REDDRAGONcolor2\}\}; python -exec nuke.thisNode().knob('calculate_matrix').execute()" gamut/REDcolor "knobs this \{drxy \{0.699747001291 0.329046930313\} dgxy \{0.304264039024 0.623641145129\} dbxy \{0.134913961296 0.0347174412813\} dwxy \{0.321683289449 0.337673447208\} dst_colorspace_name \{REDcolor\}\}; python -exec nuke.thisNode().knob('calculate_matrix').execute()" gamut/REDcolor2 "knobs this \{drxy \{0.878682510476 0.32496400741\} dgxy \{0.300888714367 0.679054755791\} dbxy \{0.0953986946056 -0.0293793268343\} dwxy \{0.321683289449 0.337673447208\} dst_colorspace_name \{REDcolor2\}\}; python -exec nuke.thisNode().knob('calculate_matrix').execute()" gamut/REDcolor3 "knobs this \{drxy \{0.701181035906 0.329014155583\} dgxy \{0.300600304652 0.683788834269\} dbxy \{0.108154455624 -0.00868817578666\} dwxy \{0.321683210353 0.337673610062\} dst_colorspace_name \{REDcolor3\}\}; python -exec nuke.thisNode().knob('calculate_matrix').execute()" gamut/REDcolor4 "knobs this \{drxy \{0.701180591892 0.329013699116\} dgxy \{0.300600395529 0.683788824257\} dbxy \{0.145331946229 0.0516168036226\} dwxy \{0.321683289449 0.337673447208\} dst_colorspace_name \{REDcolor4\}\}; python -exec nuke.thisNode().knob('calculate_matrix').execute()" gamut/REDWideGamutRGB "knobs this \{drxy \{0.780308 0.304253\} dgxy \{0.121595 1.493994\} dbxy \{0.095612 -0.084589\} dwxy \{0.3127 0.329\} dst_colorspace_name \{REDWideGamutRGB\}\}; python -exec nuke.thisNode().knob('calculate_matrix').execute()" "gamut/GoPro Protune Native" "knobs this \{drxy \{0.69848046 0.19302645\} dgxy \{0.32955538 1.02459662\} dbxy \{0.10844263 -0.03467857\} dwxy \{0.3127 0.329\} dst_colorspace_name \{GoPro Protune Native\}\}; python -exec nuke.thisNode().knob('calculate_matrix').execute()" gamut/CanonCinemaGamut "knobs this \{drxy \{0.74 0.27\} dgxy \{0.17 1.14\} dbxy \{0.08 -0.1\} dwxy \{0.3127 0.329\} dst_colorspace_name \{CanonCinemaGamut\}\}; python -exec nuke.thisNode().knob('calculate_matrix').execute()" gamut/SonySGamut "knobs this \{drxy \{0.73 0.28\} dgxy \{0.14 0.855\} dbxy \{0.1 -0.05\} dwxy \{0.3127 0.329\} dst_colorspace_name \{SonySGamut\}\}; python -exec nuke.thisNode().knob('calculate_matrix').execute()" gamut/SonySGamut3Cine "knobs this \{drxy \{0.766 0.275\} dgxy \{0.225 0.8\} dbxy \{0.089 -0.087\} dwxy \{0.3127 0.329\} dst_colorspace_name \{SonySGamut3Cine\}\}; python -exec nuke.thisNode().knob('calculate_matrix').execute()" gamut/PanasonicVGamut "knobs this \{drxy \{0.730 0.280\} dgxy \{0.165 0.840\} dbxy \{0.100 -0.030\} dwxy \{0.3127 0.329\} dst_colorspace_name \{PanasonicVGamut\}\}; python -exec nuke.thisNode().knob('calculate_matrix').execute()" "gamut/DJI D-Gamut" "knobs this \{drxy \{0.71 0.31\} dgxy \{0.21 0.88\} dbxy \{0.09 -0.08\} dwxy \{0.3127 0.329\} dst_colorspace_name \{DJI D-Gamut\}\}; python -exec nuke.thisNode().knob('calculate_matrix').execute()" "gamut/Fujifilm F-Gamut" "knobs this \{drxy \{0.70800 0.29200\} dgxy \{0.17000 0.79700\} dbxy \{0.13100 0.04600\} dwxy \{0.3127 0.329\} dst_colorspace_name \{Fujifilm F-Gamut\}\}; python -exec nuke.thisNode().knob('calculate_matrix').execute()" gamut/BMDFilmV1 "knobs this \{drxy \{0.9173 0.2502\} dgxy \{0.2833 1.7072\} dbxy \{0.0856 -0.0708\} dwxy \{0.3135 0.3305\} dst_colorspace_name \{BMDFilmV1\}\}; python -exec nuke.thisNode().knob('calculate_matrix').execute()" gamut/BMD4kFilmV1 "knobs this \{drxy \{0.7422 0.2859\} dgxy \{0.4140 1.3035\} dbxy \{0.0342 -0.0833\} dwxy \{0.3135 0.3305\} dst_colorspace_name \{BMD4kFilmV1\}\}; python -exec nuke.thisNode().knob('calculate_matrix').execute()" gamut/BMD4kFilmV3 "knobs this \{drxy \{1.0625 0.3948\} dgxy \{0.3689 0.7775\} dbxy \{0.0956 -0.0332\} dwxy \{0.3135 0.3305\} dst_colorspace_name \{BMD4kFilmV3\}\}; python -exec nuke.thisNode().knob('calculate_matrix').execute()" gamut/BMD46kFilmV1 "knobs this \{drxy \{0.9175 0.2983\} dgxy \{0.2983 1.2835\} dbxy \{0.0756 -0.0860\} dwxy \{0.3127 0.329\} dst_colorspace_name \{BMD46kFilmV1\}\}; python -exec nuke.thisNode().knob('calculate_matrix').execute()" gamut/BMD46kFilmV3 "knobs this \{drxy \{0.8608 0.3689\} dgxy \{0.3282 0.6156\} dbxy \{0.0783 -0.0233\} dwxy \{0.3127 0.329\} dst_colorspace_name \{BMD46kFilmV3\}\}; python -exec nuke.thisNode().knob('calculate_matrix').execute()" gamut/BMDWideGamutV4 "knobs this \{drxy \{0.7177 0.3171\} dgxy \{0.2280 0.8616\} dbxy \{0.1006 -0.0820\} dwxy \{0.3127 0.329\} dst_colorspace_name \{BMDWideGamutV4\}\}; python -exec nuke.thisNode().knob('calculate_matrix').execute()" "gamut/AdobeRGB\t" "knobs this \{drxy \{0.6400 0.3300\} dgxy \{0.2100 0.7100\} dbxy \{0.1500 0.0600\} dwxy \{0.3127 0.329\} dst_colorspace_name \{AdobeRGB\}\}; python -exec nuke.thisNode().knob('calculate_matrix').execute()" gamut/AdobeWideGamutRGB "knobs this \{drxy \{0.7347 0.2653\} dgxy \{0.1152 0.8264\} dbxy \{0.1566 0.0177\} dwxy \{0.3457 0.3585\} dst_colorspace_name \{AdobeWideGamutRGB\}\}; python -exec nuke.thisNode().knob('calculate_matrix').execute()" gamut/ROMM "knobs this \{drxy \{7.34700000e-01 2.65300000e-01\} dgxy \{1.59600000e-01 8.40400000e-01\} dbxy \{3.66000000e-02 1.00000000e-04\} dwxy \{0.3457 0.3585\} dst_colorspace_name \{ROMM\}\}; python -exec nuke.thisNode().knob('calculate_matrix').execute()" gamut/RIMM "knobs this \{drxy \{7.34700000e-01 2.65300000e-01\} dgxy \{1.59600000e-01 8.40400000e-01\} dbxy \{3.66000000e-02 1.00000000e-04\} dwxy \{0.3457 0.3585\} dst_colorspace_name \{RIMM\}\}; python -exec nuke.thisNode().knob('calculate_matrix').execute()" gamut/ERIMM "knobs this \{drxy \{7.34700000e-01 2.65300000e-01\} dgxy \{1.59600000e-01 8.40400000e-01\} dbxy \{3.66000000e-02 1.00000000e-04\} dwxy \{0.3457 0.3585\} dst_colorspace_name \{ERIMM\}\}; python -exec nuke.thisNode().knob('calculate_matrix').execute()" gamut/ProPhotoRGB "knobs this \{drxy \{0.734699 0.265301\} dgxy \{0.159597 0.840403\} dbxy \{0.036598 0.000105\} dwxy \{0.345704 0.358540\} dst_colorspace_name \{ProPhotoRGB\}\}; python -exec nuke.thisNode().knob('calculate_matrix').execute()" gamut/RusselRGB "knobs this \{drxy \{0.6900 0.3100\} dgxy \{0.1800 0.7700\} dbxy \{0.1000 0.0200\} dwxy \{0.33243 0.34744\} dst_colorspace_name \{RusselRGB\}\}; python -exec nuke.thisNode().knob('calculate_matrix').execute()" gamut/SharpRGB "knobs this \{drxy \{0.6898 0.3206\} dgxy \{0.0736 0.9003\} dbxy \{0.1166 0.0374\} dwxy \{0.33333333 0.33333333\} dst_colorspace_name \{SharpRGB\}\}; python -exec nuke.thisNode().knob('calculate_matrix').execute()" gamut/AppleRGB "knobs this \{drxy \{0.6250 0.3400\} dgxy \{0.2800 0.5950\} dbxy \{0.1550 0.0700\} dwxy \{0.3127 0.329\} dst_colorspace_name \{AppleRGB\}\}; python -exec nuke.thisNode().knob('calculate_matrix').execute()" gamut/BestRGB "knobs this \{drxy \{0.735191637630662 0.264808362369338\} dgxy \{0.215336134453781 0.774159663865546\} dbxy \{0.130122950819672 0.034836065573770\} dwxy \{0.3457 0.3585\} dst_colorspace_name \{BestRGB\}\}; python -exec nuke.thisNode().knob('calculate_matrix').execute()" "gamut/XYZ D60" "knobs this \{drxy \{1 0\} dgxy \{0 1\} dbxy \{0 0\} dwxy \{0.32162624 0.337737\} dst_colorspace_name \{XYZ D60\}\}; python -exec nuke.thisNode().knob('calculate_matrix').execute()" "gamut/XYZ D65" "knobs this \{drxy \{1 0\} dgxy \{0 1\} dbxy \{0 0\} dwxy \{0.3127 0.329\} dst_colorspace_name \{XYZ D65\}\}; python -exec nuke.thisNode().knob('calculate_matrix').execute()" "gamut/XYZ E" "knobs this \{drxy \{1 0\} dgxy \{0 1\} dbxy \{0 0\} dwxy \{0.333333333333 0.333333333333\} dst_colorspace_name \{XYZ E\}\}; python -exec nuke.thisNode().knob('calculate_matrix').execute()"}} addUserKnob {12 drxy l r t "Red xy chromaticity coordinates in CIE 1931 colorspace."} drxy {0.64 0.33} addUserKnob {12 dgxy l g t "Green xy chromaticity coordinates in CIE 1931 colorspace."} dgxy {0.3 0.6} addUserKnob {12 dbxy l b t "Blue xy chromaticity coordinates in CIE 1931 colorspace."} dbxy {0.15 0.06} addUserKnob {12 dwxy l w t "Whitepoint xy chromaticity coordinates in CIE 1931 colorspace."} dwxy {0.3127 0.329} addUserKnob {1 dst_colorspace_name l dst +DISABLED} dst_colorspace_name Rec709 addUserKnob {26 ""} addUserKnob {26 chromatic_adaptation_label l " " T "Chromatic Adaptation"} addUserKnob {4 cat_method l method t "Choose the chromatic adaptation method for adapting whitepoint." M {cat02 bradford cmccat2000 xyz_scaling none "" fairchild bianco cat02_brill_cat bianco_pc cmccat97 sharp von_kries "" ""}} addUserKnob {26 ""} addUserKnob {6 invert t "Invert direction of matrix." +STARTLINE} addUserKnob {22 calculate_matrix l "Calculate Matrix" t "Calculate 3x3 matrix based on the specified colorspace chromaticities." T "import nuke\nfloat3 = nuke.math.Vector3\nfloat3x3 = nuke.math.Matrix3\n\n\ndef transpose(m):\n # Transpose (swap rows and columns) of a nuke.math.Matrix3\n return float3x3(m\[0], m\[1], m\[2], m\[3], m\[4], m\[5], m\[6], m\[7], m\[8])\n\ndef set_matrix(m):\n # Populate a nuke.math.Matrix3 with a 3x3 python list (either 3x3 or 1x9)\n if len(m) is 3 and \[isinstance(r, list) for r in m]:\n m = sum(m, \[])\n o = float3x3(m\[0], m\[3], m\[6], m\[1], m\[4], m\[7], m\[2], m\[5], m\[8])\n return o\n\ndef diag(v):\n # Create a diagonal 3x3 matrix from a 1x3 vector\n return float3x3(v\[0], 0, 0, 0, v\[1], 0, 0, 0, v\[2])\n\n\ndef xyY_to_XYZ(xyY):\n # Convert an xyY chromaticity value to XYZ\n x = xyY\[0]\n y = xyY\[1]\n if len(xyY) is 2:\n # Assume an xy chromaticity coordinate, use default Y\n Y = 1.0\n else:\n Y = xyY\[2]\n XYZ = float3(x * Y / max(y, 1e-10), Y, (1.0 - x - y) * Y / max(y, 1e-10))\n return XYZ\n\ndef xy_to_xyz(xy):\n return float3(xy\[0], xy\[1], 1.0 - xy\[0] - xy\[1])\n\n\ndef calc_cat(src_xy, dst_xy, cat_method='cat02'):\n # Calculate Von Kries chromatic adaptation transform matrix,\n # given a source and destination illuminant and CAT method.\n # Illuminant is given as xy chromaticity coordinates. \n # CAT method is the name of one of the below cone response matrices.\n\n crmtxs = \{\n \"bianco\": \[\[0.8752, 0.2787, -0.1539], \[-0.8904, 1.8709, 0.0195], \[-0.0061, 0.0162, 0.9899]],\n \"bianco_pc\": \[\[0.6489, 0.3915, -0.0404], \[-0.3775, 1.3055, 0.072], \[-0.0271, 0.0888, 0.9383]],\n \"bradford\": \[\[0.8951, 0.2664, -0.1614], \[-0.7502, 1.7135, 0.0367], \[0.0389, -0.0685, 1.0296]],\n \"cat02\": \[\[0.7328, 0.4296, -0.1624], \[-0.7036, 1.6975, 0.0061], \[0.003, 0.0136, 0.9834]],\n \"cat02_brill_cat\": \[\[0.7328, 0.4296, -0.1624], \[-0.7036, 1.6975, 0.0061], \[0.0, 0.0, 1.0]],\n \"cmccat2000\": \[\[0.7982, 0.3389, -0.1371], \[-0.5918, 1.5512, 0.0406], \[0.0008, 0.0239, 0.9753]],\n \"cmccat97\": \[\[0.8951, -0.7502, 0.0389], \[0.2664, 1.7135, 0.0685], \[-0.1614, 0.0367, 1.0296]],\n \"fairchild\": \[\[0.8562, 0.3372, -0.1934], \[-0.836, 1.8327, 0.0033], \[0.0357, -0.0469, 1.0112]],\n \"sharp\": \[\[1.2694, -0.0988, -0.1706], \[-0.8364, 1.8006, 0.0357], \[0.0297, -0.0315, 1.0018]],\n \"von_kries\": \[\[0.40024, 0.7076, -0.08081], \[-0.2263, 1.16532, 0.0457], \[0.0, 0.0, 0.91822]],\n \"xyz_scaling\": \[\[1.0, 0.0, 0.0], \[0.0, 1.0, 0.0], \[0.0, 0.0, 1.0]]\n \}\n \n cat_method = cat_method.lower().replace(' ', '_')\n # Return identity matrix if no match\n if cat_method not in crmtxs.keys():\n m = float3x3()\n m.makeIdentity()\n return m\n \n crmtx = set_matrix(crmtxs\[cat_method])\n\n # Get XYZ values from xy chromaticity coordinates\n src_XYZ = xyY_to_XYZ(src_xy)\n dst_XYZ = xyY_to_XYZ(dst_xy)\n\n # Calculate source and destination cone response matrices\n src_crmtx = transpose(crmtx) * src_XYZ\n dst_crmtx = transpose(crmtx) * dst_XYZ\n\n von_kries_matrix = diag(dst_crmtx / src_crmtx)\n cat_mtx = float3x3()\n cat_mtx = crmtx * (von_kries_matrix * crmtx.inverse())\n\n return cat_mtx\n\n\ndef calc_npm(chr):\n # Calculate a normalized primaries matrix from the specified chromaticity coordinates,\n # given 2x4 list of xy chromaticity coordinates: red, green, blue, and white\n rxyz, gxyz, bxyz, wxyz = map(xy_to_xyz, chr)\n wy = chr\[3]\[1]\n wxyz = float3(wxyz.x / wy, wxyz.y / wy, wxyz.z / wy)\n np_mtx = float3x3(rxyz\[0], gxyz\[0], bxyz\[0],\n rxyz\[1], gxyz\[1], bxyz\[1],\n rxyz\[2], gxyz\[2], bxyz\[2])\n wscale = np_mtx.inverse() * wxyz \n np_mtx = transpose(np_mtx * diag(wscale))\n return np_mtx\n\ndef is_xyz(c):\n # return true if primaries are XYZ\n return c\[:3] == \[\[1.0, 0.0], \[0.0, 1.0], \[0.0, 0.0]]\n\n\ndef start(node):\n identity_mtx = float3x3()\n identity_mtx.makeIdentity()\n\n invert = node\['invert'].getValue()\n cat_method = node\['cat_method'].value()\n\n src_chr = \[node\[k].getValue() for k in \['rxy', 'gxy', 'bxy', 'wxy']]\n dst_chr = \[node\[k].getValue() for k in \['drxy', 'dgxy', 'dbxy', 'dwxy']]\n\n # bypass double scale if source or destination is XYZ\n if is_xyz(src_chr):\n rgb_to_xyz = identity_mtx\n else:\n rgb_to_xyz = calc_npm(src_chr)\n \n if is_xyz(dst_chr):\n xyz_to_rgb = identity_mtx\n else:\n xyz_to_rgb = calc_npm(dst_chr).inverse()\n\n if src_chr\[3] == dst_chr\[3]:\n cat_mtx = identity_mtx\n else:\n cat_mtx = calc_cat(src_chr\[3], dst_chr\[3], cat_method)\n\n mtx = (rgb_to_xyz * cat_mtx) * xyz_to_rgb\n\n if invert:\n mtx = mtx.inverse()\n\n node\['matrix'].setValue(mtx)\n\n\nif __name__=='__main__':\n start(nuke.thisNode())" +STARTLINE} addUserKnob {22 create_matrix_node l "Create Matrix" t "Create ColorMatrix node with the current values." -STARTLINE T "node = nuke.thisNode()\nnode\['calculate_matrix'].execute()\nnuke.root().begin()\n_ = \[n.setSelected(False) for n in nuke.allNodes(recurseGroups=True)]\nm = nuke.createNode('ColorMatrix')\nm\['matrix'].setValue(node\['matrix'].getValue())\nm.setXYpos(node.xpos()-120, node.ypos())\nsrc_name = node\['src_colorspace_name'].getValue()\ndst_name = node\['dst_colorspace_name'].getValue()\nif node\['invert'].getValue():\n label = '\{1\} to \{0\}'.format(src_name, dst_name)\nelse:\n label = '\{0\} to \{1\}'.format(src_name, dst_name)\nm\['label'].setValue(label)"} addUserKnob {41 matrix T ColorMatrix.matrix} addUserKnob {22 clear l Clear T "n = nuke.thisNode()\nn\['matrix'].setValue(\[1,0,0,0,1,0,0,0,1])\nn\['label'].setValue('')" +STARTLINE} addUserKnob {22 show_matrix l Show t "Show matrix values in a popup window for copying." T "node = nuke.thisNode()\nshow_4x4 = node\['show_matrix_4x4'].getValue()\nshow_commas = node\['show_matrix_commas'].getValue()\n\nif show_commas:\n sep = ', '\nelse:\n sep = ' '\n\nmtx = \[format(i, '.8f') for i in node\['matrix'].getValue()]\n\nif show_4x4:\n z = \['0']\n mtx = mtx\[0:3] + z + mtx\[3:6] + z + mtx\[6:9] + z*4 + \['1']\n\nnuke.message(sep.join(mtx))" +STARTLINE} addUserKnob {6 show_matrix_4x4 l "show 4x4" t "present values in a 4x4 matrix (useful for ocio)" -STARTLINE} addUserKnob {6 show_matrix_commas l "show comma sep" t "show matrix comma separated." -STARTLINE} addUserKnob {22 save_spimtx l "Save spimtx" T "# inspired by ColorMatrixPlus by hpd\ndef write_spimtx(mtx_node, spimtx_file):\n mtx_vals = mtx_node\['matrix'].getValue()\n with open(spimtx_file, \"w\") as f:\n f.write( \"%3.6f %3.6f %3.6f 0.0\\n\" % (\n mtx_vals\[0], mtx_vals\[1], mtx_vals\[2]) )\n f.write( \"%3.6f %3.6f %3.6f 0.0\\n\" % (\n mtx_vals\[3], mtx_vals\[4], mtx_vals\[5]) )\n f.write( \"%3.6f %3.6f %3.6f 0.0\\n\" % (\n mtx_vals\[6], mtx_vals\[7], mtx_vals\[8]) )\n\nnode = nuke.thisNode()\nfilepath = nuke.getFilename('Save Matrix', '*.spimtx')\n\nif filepath:\n if not filepath.endswith('.spimtx'):\n filepath = filepath + '.spimtx'\n write_spimtx(node, filepath)" +STARTLINE} addUserKnob {22 load_spimtx l "Load spimtx" -STARTLINE T "# Inspired by ColorMatrixPlus by hpd\ndef load_spimtx(spimtx, mtx_node):\n with open( spimtx, 'r') as file:\n lines = file.readlines()\n matrix_values = list()\n for line in lines:\n matrix_values.extend( map(float, line.strip().split(' ')\[0:3]) )\n mtx_node\['matrix'].setValue(matrix_values)\n\nspimtx = nuke.getFilename('Load SPIMTX', '*.spimtx')\nif spimtx:\n load_spimtx( spimtx, nuke.thisNode() )\n"} } Input { inputs 0 name Input xpos -40 ypos 206 } ColorMatrix { matrix { {2.00240469 -0.950789392 -0.05161637068} {-0.2615073025 1.533845305 -0.2723381221} {-0.0862056464 -0.21917817 1.305384159} } name ColorMatrix xpos -40 ypos 254 } Output { name Output xpos -40 ypos 302 } end_group Group { name Saturation1 selected true xpos 262 ypos 4412 addUserKnob {20 Saturation} addUserKnob {4 method M {weighted maximum average ""}} addUserKnob {35 weight_presets l "" +STARTLINE M {weights/ACEScg "knobs this \{w \{0.26806405 0.67246455 0.05947147\}\}" weights/Rec.2020 "knobs this \{w \{0.26270026 0.67799819 0.05930173\}\}" weights/P3D65 "knobs this \{w \{0.22897467 0.69173867 0.07928693\}\}" weights/Rec.709 "knobs this \{w \{0.21263911 0.71516877 0.07219233\}\}" ""}} addUserKnob {78 w l "" t "luminance weighting" -STARTLINE n 3} w {0.21263911 0.71516877 0.07219233} addUserKnob {7 s l saturation R 0 4} s 1 } Input { inputs 0 name Input xpos 290 ypos 620 } Expression { temp_name3 L temp_expr3 method==0?w.0*r+w.1*g+w.2*b:method==1?max(r,g,b):method==2?(r+g+b)/3:0 expr0 L*(1-s)+r*s expr1 L*(1-s)+g*s expr2 L*(1-s)+b*s expr3 L name Expression xpos 290 ypos 681 } Output { name Output xpos 290 ypos 740 } end_group Group { name InverseEOTF5 label "\[value eotf]" selected true xpos 262 ypos 4466 addUserKnob {20 EOTF_tab l EOTF} addUserKnob {4 eotf t "Choose the inverse EOTF to apply for the target display device." M {None "sRGB Display" BT.1886 "Gamma 2.6" PQ HLG "" "" "" ""}} eotf BT.1886 } Input { inputs 0 name Input xpos 400 ypos -160 } Dot { name Dot1 xpos 434 ypos -96 } set Necb1f510 [stack 0] Dot { name Dot3 xpos 544 ypos -96 } set N13ce94b0 [stack 0] Dot { name Dot4 xpos 654 ypos -96 } Multiply { channels rgb value 10 name Multiply1 label "scale input 0.1x for 1000 nit match between PQ and HLG" xpos 620 ypos -76 } Expression { temp_name0 Yd temp_expr0 0.2627*r+0.6780*g+0.0593*b expr0 r*pow(Yd,(1-_g)/_g) expr1 g*pow(Yd,(1-_g)/_g) expr2 b*pow(Yd,(1-_g)/_g) name HLG_InverseOOTF xpos 620 ypos -40 addUserKnob {20 CONSTANTS_tab l CONSTANTS} addUserKnob {7 _g t "Gamma: Extended model for gamma variation according to peak display luminance and surround luminance: BT.2390-8 p32" R 0 2} _g {{1.2*pow(1.111,log(Lw/1000)/log(2))*pow(0.98,log(max(1e-6,Lamb)/5)/log(2))}} addUserKnob {7 Lw R 600 4000} Lw 1000 addUserKnob {7 Lamb t "ambient luminance level in nits" R 0 200} Lamb 5 } Expression { expr0 r<=1/12?sqrt(3*r):_a*log(12*r-_b)+_c expr1 g<=1/12?sqrt(3*g):_a*log(12*g-_b)+_c expr2 b<=1/12?sqrt(3*b):_a*log(12*b-_b)+_c name HLG_OETF xpos 620 ypos -10 addUserKnob {20 CONSTANTS_tab l CONSTANTS} addUserKnob {7 _a t alpha} _a 0.17883277 addUserKnob {7 _b t beta} _b {{1-4*_a}} addUserKnob {7 _c} _c {{0.5-_a*log(4*_a)}} } push $N13ce94b0 Expression { expr0 pow((c_1+c_2*pow(r*Lw/10000,m_1))/(1+c_3*pow(r*Lw/10000,m_1)),m_2) expr1 pow((c_1+c_2*pow(g*Lw/10000,m_1))/(1+c_3*pow(g*Lw/10000,m_1)),m_2) expr2 pow((c_1+c_2*pow(b*Lw/10000,m_1))/(1+c_3*pow(b*Lw/10000,m_1)),m_2) name ST2084_InverseEOTF xpos 510 ypos -70 addUserKnob {20 CONSTANTS_tab l CONSTANTS} addUserKnob {7 m_1} m_1 {{2610/4096*(1/4)}} addUserKnob {7 m_2} m_2 {{2523/4096*128}} addUserKnob {7 c_1} c_1 {{107/128}} addUserKnob {7 c_2} c_2 {{2413/128}} addUserKnob {7 c_3} c_3 {{2392/128}} addUserKnob {7 Lw t "Display peak luminance in nits" R 600 4000} Lw 10000 } push $Necb1f510 Expression { expr0 sign(r)*pow(fabs(r),1/p) expr1 sign(g)*pow(fabs(g),1/p) expr2 sign(b)*pow(fabs(b),1/p) name power xpos 400 ypos -70 addUserKnob {20 Params_tab l Params} addUserKnob {7 p l power R 0.2 2} p {{eotf?2+eotf*0.2:1}} } Switch { inputs 3 which {{max(0,eotf-3)}} name SwitchInverseEOTF xpos 400 ypos -10 } Output { name Output xpos 400 ypos 80 } end_group Dot { name Dot25 note_font "Helvetica Bold" note_font_size 24 note_font_color 0xff selected true xpos 296 ypos 4596 } StickyNote { inputs 0 name StickyNote11 tile_color 0x272727ff label "
\n8).  Or, if desired you can adjust saturation of specific primaries \n      using the Output CalcPrimaries node"
 note_font Helvetica
 note_font_size 8
 note_font_color 0xa8a8a8ff
 selected true
 xpos -288
 ypos 4296
}
StickyNote {
 inputs 0
 name StickyNote1
 tile_color 0x272727ff
 label "
\n3).  Set DST Gamut Chromaticity Coordinates for your display device"
 note_font Helvetica
 note_font_size 8
 note_font_color 0xa8a8a8ff
 selected true
 xpos 399
 ypos 4347
}
StickyNote {
 inputs 0
 name StickyNote7
 tile_color 0x272727ff
 label "
\n4).  Set Inverse EOTF for your display device"
 note_font Helvetica
 note_font_size 8
 note_font_color 0xa8a8a8ff
 selected true
 xpos 402
 ypos 4464
}
StickyNote {
 inputs 0
 name StickyNote10
 tile_color 0x272727ff
 label "
\n7).  Adjust saturation to taste if desired"
 note_font Helvetica
 note_font_size 8
 note_font_color 0xa8a8a8ff
 selected true
 xpos 373
 ypos 4404
}
StickyNote {
 inputs 0
 name StickyNote8
 tile_color 0x272727ff
 label "
\n5).  Connect viewer to this node"
 note_font Helvetica
 note_font_size 8
 note_font_color 0xa8a8a8ff
 selected true
 xpos 225
 ypos 4550
}
StickyNote {
 inputs 0
 name StickyNote9
 tile_color 0x272727ff
 label "
\n6).  Press Ctrl+i to create a 2nd viewer, and connect it here.\n      Adjust the 2d coordinates.\n     for r, g, b to set the primaries for the rendering gamut.\n     if you need a reference  for position you can set the pink node to\n     one of it's presets."
 note_font Helvetica
 note_font_size 8
 note_font_color 0xa8a8a8ff
 selected true
 xpos -92
 ypos 4097
}
Constant {
 inputs 0
 color 1
 format "2048 2048 0 0 2048 2048 1 square_2K"
 name Constant2
 note_font Helvetica
 selected true
 xpos -178
 ypos 3693
 postage_stamp false
}
Expression {
 temp_name0 n
 temp_expr0 input.width/8
 channel0 {rgba.red rgba.green rgba.blue none}
 expr0 x/width*(1-y/height)
 channel3 alpha
 expr3 1
 name Expression7
 selected true
 xpos -178
 ypos 3722
}
Expression {
 temp_name0 start
 temp_expr0 360
 temp_name1 end
 temp_expr1 830
 channel0 {rgba.red rgba.green rgba.blue none}
 expr0 r*(end-start)+start
 channel1 none
 channel2 none
 expr3 1
 name Expression2
 selected true
 xpos -178
 ypos 3752
}
ColorLookup {
 lut {master {}
   red {curve x360 0.0001299 C 0.00014585 0.0001638 0.000184 0.00020669 0.0002321 0.00026073 0.00029307 0.00032939 0.00036991 0.0004149 0.00046416 0.00051899 0.00058185 0.00065523 0.0007416 0.00084503 0.00096453 0.00109495 0.00123115 0.001368 0.00150205 0.00164233 0.00180238 0.00199576 0.002236 0.00253539 0.0028926 0.00330083 0.00375324 0.004243 0.00476239 0.00533005 0.00597871 0.00674112 0.00765 0.00875137 0.01002888 0.0114217 0.01286901 0.01431 0.01570443 0.01714744 0.01878122 0.02074801 0.02319 0.02620736 0.02978248 0.03388092 0.03846824 0.04351 0.0489956 0.0550226 0.0617188 0.069212 0.07763 0.08695811 0.09717672 0.1084063 0.1207672 0.13438 0.1493582 0.16539571 0.1819831 0.19861101 0.21477 0.23018681 0.24487969 0.25877729 0.27180791 0.28389999 0.29494381 0.3048965 0.31378731 0.32164541 0.3285 0.3343513 0.33921009 0.34312129 0.3461296 0.34828001 0.3495999 0.3501474 0.35001299 0.349287 0.34806001 0.34637329 0.34426239 0.3418088 0.3390941 0.3362 0.33319771 0.33004111 0.32663569 0.32288679 0.31869999 0.3140251 0.30888399 0.3032904 0.2972579 0.29080001 0.28397009 0.27672139 0.2689178 0.26042271 0.2511 0.2408475 0.2298512 0.2184072 0.2068115 0.19536 0.18421359 0.1733273 0.16268811 0.1522833 0.14210001 0.1321786 0.1225696 0.1132752 0.1042979 0.09564 0.08729955 0.07930804 0.07171776 0.06458099 0.05795001 0.05186211 0.04628152 0.04115088 0.03641283 0.03201 0.0279172 0.0241444 0.020687 0.0175404 0.0147 0.01216179 0.00991996 0.00796724 0.00629635 0.0049 0.00377717 0.00294532 0.00242488 0.00223629 0.0024 0.00292552 0.00383656 0.00517484 0.00698208 0.0093 0.01214949 0.01553588 0.01947752 0.02399277 0.0291 0.03481485 0.04112016 0.04798504 0.05537861 0.06327 0.07163501 0.08046224 0.08973996 0.09945645 0.1096 0.1201674 0.1311145 0.1423679 0.15385421 0.1655 0.17725711 0.18914001 0.2011694 0.21336579 0.2257499 0.2383209 0.2510668 0.26399219 0.2771017 0.2904 0.30389121 0.31757259 0.33143839 0.3454828 0.35969999 0.37408391 0.3886396 0.4033784 0.41831151 0.43344989 0.44879529 0.46433601 0.480064 0.49597129 0.51205009 0.52829587 0.54469162 0.56120938 0.57782149 0.59450001 0.6112209 0.62797582 0.64476019 0.66156971 0.67839998 0.69523919 0.7120586 0.72882837 0.7455188 0.76209998 0.77854317 0.79482561 0.81092638 0.82682478 0.84249997 0.85793251 0.87308162 0.88789439 0.90231812 0.9163 0.9297995 0.94279838 0.95527762 0.96721792 0.97860003 0.9893856 0.99954879 1.00908923 1.01800644 1.02629995 1.03398275 1.04098594 1.04718804 1.05246675 1.05669999 1.05979443 1.06179917 1.06280684 1.0629096 1.06219995 1.06073523 1.05844355 1.05522442 1.05097675 1.04560006 1.03903687 1.03136074 1.02266622 1.0130477 1.00259995 0.99136752 0.97933137 0.96649158 0.9528479 0.93839997 0.92319399 0.90724403 0.89050198 0.87291998 0.85444993 0.83508402 0.814946 0.794186 0.77295399 0.75139999 0.72958362 0.70758879 0.68560219 0.66381037 0.64240003 0.62151492 0.6011138 0.58110517 0.56139767 0.54189998 0.52259952 0.50354642 0.4847436 0.46619391 0.4479 0.42986131 0.41209799 0.39464399 0.37753329 0.3608 0.34445629 0.32851681 0.31301919 0.29800111 0.28349999 0.26954481 0.25611839 0.2431896 0.2307272 0.21870001 0.2070971 0.19592319 0.1851708 0.1748323 0.1649 0.1553667 0.14623 0.13749 0.1291467 0.1212 0.1136397 0.106465 0.09969044 0.09333061 0.0874 0.08190096 0.07680428 0.07207712 0.06768664 0.0636 0.05980685 0.05628216 0.05297104 0.04981861 0.04677 0.04378405 0.04087536 0.03807264 0.03540461 0.0329 0.03056419 0.02838056 0.02634484 0.02445275 0.0227 0.02108429 0.01959988 0.01823732 0.01698717 0.01584 0.01479064 0.01383132 0.01294868 0.0121292 0.01135916 0.01062935 0.00993885 0.00928842 0.00867885 0.00811092 0.00758239 0.00708875 0.00662731 0.00619541 0.00579035 0.00540983 0.00505258 0.00471751 0.00440351 0.00410946 0.00383391 0.00357575 0.00333434 0.00310907 0.00289933 0.00270435 0.00252302 0.00235417 0.00219662 0.00204919 0.00191096 0.00178144 0.00166011 0.00154646 0.00143997 0.00134004 0.00124628 0.00115847 0.00107643 0.00099995 0.00092874 0.00086243 0.00080075 0.0007434 0.00069008 0.00064052 0.0005945 0.00055186 0.00051243 0.00047602 0.00044245 0.00041151 0.00038298 0.00035665 0.0003323 0.00030976 0.00028889 0.00026954 0.00025157 0.00023483 0.00021917 0.00020453 0.00019084 0.00017807 0.00016615 0.00015502 0.00014462 0.00013491 0.00012585 0.00011741 0.00010955 0.00010222 9.539e-05 8.902e-05 8.308e-05 7.751e-05 7.231e-05 6.746e-05 6.293e-05 5.871e-05 5.477e-05 5.11e-05 4.768e-05 4.449e-05 4.151e-05 3.873e-05 3.614e-05 3.372e-05 3.146e-05 2.935e-05 2.738e-05 2.552e-05 2.379e-05 2.218e-05 2.067e-05 1.927e-05 1.797e-05 1.675e-05 1.562e-05 1.456e-05 1.357e-05 1.265e-05 1.18e-05 1.1e-05 1.025e-05 9.56e-06 8.91e-06 8.31e-06 7.75e-06 7.22e-06 6.73e-06 6.28e-06 5.85e-06 5.46e-06 5.09e-06 4.74e-06 4.42e-06 4.12e-06 3.84e-06 3.58e-06 3.34e-06 3.11e-06 2.9e-06 2.71e-06 2.52e-06 2.35e-06 2.19e-06 2.04e-06 1.91e-06 1.78e-06 1.66e-06 1.54e-06 1.44e-06 1.34e-06 S 1.25e-06}
   green {curve x360 3.92e-06 C 4.39e-06 4.93e-06 5.53e-06 6.21e-06 6.97e-06 7.81e-06 8.77e-06 9.84e-06 1.104e-05 1.239e-05 1.389e-05 1.556e-05 1.744e-05 1.958e-05 2.202e-05 2.484e-05 2.804e-05 3.153e-05 3.522e-05 3.9e-05 4.283e-05 4.691e-05 5.159e-05 5.718e-05 6.4e-05 7.234e-05 8.221e-05 9.351e-05 0.00010614 0.00012 0.00013498 0.00015149 0.00017021 0.00019182 0.000217 0.00024691 0.00028124 0.00031852 0.00035727 0.000396 0.00043371 0.00047302 0.00051788 0.00057222 0.00064 0.00072456 0.0008255 0.00094116 0.00106988 0.00121 0.00136209 0.00153075 0.00172037 0.00193532 0.00218 0.0024548 0.002764 0.0031178 0.0035264 0.004 0.00454624 0.00515932 0.00582928 0.00654616 0.0073 0.00808651 0.00890872 0.00976768 0.01066443 0.0116 0.01257317 0.01358272 0.01462968 0.01571509 0.01684 0.01800736 0.01921448 0.02045392 0.02171824 0.023 0.02429461 0.02561024 0.02695857 0.02835125 0.0298 0.03131083 0.03288368 0.03452112 0.03622571 0.038 0.03984667 0.041768 0.043766 0.04584267 0.048 0.05024368 0.05257304 0.05498056 0.05745872 0.06 0.06260197 0.06527752 0.06804208 0.07091109 0.0739 0.077016 0.0802664 0.0836668 0.0872328 0.09098 0.09491755 0.09904584 0.1033674 0.1078846 0.1126 0.117532 0.1226744 0.12799279 0.1334528 0.13902 0.1446764 0.1504693 0.15646189 0.1627177 0.1693 0.1762431 0.18355811 0.1912735 0.19941799 0.20802 0.2171199 0.2267345 0.2368571 0.2474812 0.2586 0.2701849 0.28229389 0.2950505 0.30857801 0.32300001 0.33840209 0.35468581 0.37169859 0.3892875 0.4073 0.42562991 0.44430959 0.4633944 0.48293951 0.50300002 0.52356929 0.54451197 0.56568998 0.58696532 0.60820001 0.6293456 0.65030682 0.67087519 0.69084239 0.70999998 0.72818518 0.74546361 0.76196939 0.7778368 0.79320002 0.80811042 0.82249618 0.83630681 0.8494916 0.86199999 0.87381083 0.88496238 0.89549363 0.90544319 0.91485012 0.92373478 0.93209243 0.93992257 0.94722521 0.954 0.9602561 0.96600741 0.97126061 0.97602248 0.98030001 0.98409241 0.98741817 0.99031281 0.99281162 0.99495012 0.99671078 0.99809831 0.99911201 0.99974817 1 0.99985671 0.99930459 0.99832553 0.99689871 0.995 0.9926005 0.98974258 0.98644441 0.98272407 0.97860003 0.97408372 0.96917123 0.96385682 0.95813489 0.95200002 0.94545043 0.93849921 0.93116277 0.92345762 0.91540003 0.90700638 0.89827722 0.8892048 0.8797816 0.87 0.85986131 0.849392 0.83862197 0.82758129 0.81629997 0.80479473 0.793082 0.781192 0.76915473 0.75700003 0.74475408 0.73242241 0.7200036 0.70749652 0.69489998 0.68221921 0.66947162 0.65667439 0.64384478 0.63099998 0.61815548 0.60531437 0.59247559 0.57963789 0.5668 0.5539611 0.54113722 0.5283528 0.51563227 0.50300002 0.4904688 0.47803041 0.46567759 0.4534032 0.44119999 0.42908001 0.417036 0.40503201 0.39303201 0.38100001 0.36891839 0.3568272 0.34477681 0.33281761 0.32100001 0.30933809 0.2978504 0.28659359 0.27562451 0.26499999 0.25476319 0.2448896 0.2353344 0.22605281 0.21699999 0.20816161 0.1995488 0.1911552 0.1829744 0.175 0.1672235 0.15964641 0.1522776 0.1451259 0.1382 0.1315003 0.1250248 0.1187792 0.1127691 0.107 0.1014762 0.09618864 0.09112296 0.08626485 0.0816 0.07712064 0.07282552 0.06871008 0.06476976 0.061 0.05739621 0.05395504 0.05067376 0.04754965 0.04458 0.04175872 0.03908496 0.03656384 0.03420048 0.032 0.02996261 0.02807664 0.02632936 0.02470805 0.0232 0.02180077 0.02050112 0.01928108 0.01812069 0.017 0.01590379 0.01483718 0.01381068 0.01283478 0.01192 0.01106831 0.01027339 0.00953331 0.00884616 0.00821 0.00762378 0.00708542 0.00659148 0.00613848 0.005723 0.00534306 0.0049958 0.0046764 0.00438007 0.004102 0.00383845 0.0035891 0.00335422 0.00313409 0.002929 0.00273814 0.00255988 0.00239324 0.00223728 0.002091 0.00195359 0.00182458 0.00170358 0.00159019 0.001484 0.0013845 0.00129127 0.00120409 0.00112274 0.001047 0.00097659 0.00091111 0.00085013 0.00079324 0.00074 0.00069008 0.00064331 0.0005995 0.00055845 0.00052 0.00048391 0.00045005 0.00041835 0.00038872 0.0003611 0.00033538 0.00031144 0.00028917 0.00026845 0.0002492 0.0002313 0.00021469 0.00019929 0.00018505 0.0001719 0.00015978 0.0001486 0.0001383 0.00012879 0.00012 0.00011186 0.00010432 9.734e-05 9.085e-05 8.48e-05 7.915e-05 7.386e-05 6.892e-05 6.43e-05 6e-05 5.598e-05 5.223e-05 4.872e-05 4.545e-05 4.24e-05 3.956e-05 3.692e-05 3.445e-05 3.215e-05 3e-05 2.799e-05 2.611e-05 2.436e-05 2.272e-05 2.12e-05 1.978e-05 1.845e-05 1.722e-05 1.606e-05 1.499e-05 1.399e-05 1.305e-05 1.218e-05 1.136e-05 1.06e-05 9.89e-06 9.22e-06 8.59e-06 8.01e-06 7.47e-06 6.96e-06 6.49e-06 6.05e-06 5.64e-06 5.26e-06 4.9e-06 4.57e-06 4.26e-06 3.97e-06 3.7e-06 3.45e-06 3.22e-06 3e-06 2.8e-06 2.61e-06 2.43e-06 2.27e-06 2.11e-06 1.97e-06 1.84e-06 1.71e-06 1.6e-06 1.49e-06 1.39e-06 1.29e-06 1.21e-06 1.12e-06 1.05e-06 9.8e-07 9.1e-07 8.5e-07 7.9e-07 7.4e-07 6.9e-07 6.4e-07 6e-07 5.6e-07 5.2e-07 4.8e-07 S 4.5e-07}
   blue {curve x360 0.0006061 C 0.00068088 0.00076515 0.00086001 0.00096659 0.001086 0.00122059 0.00137273 0.00154358 0.00173429 0.001946 0.00217778 0.00243581 0.00273195 0.00307806 0.003486 0.00397523 0.00454088 0.00515832 0.00580291 0.00645 0.00708322 0.00774549 0.00850115 0.00941454 0.01054999 0.0119658 0.01365587 0.01558805 0.01773015 0.02005001 0.02251136 0.02520288 0.02827972 0.03189704 0.03621 0.04143771 0.04750372 0.05411988 0.06099803 0.06785001 0.07448632 0.08136156 0.08915364 0.09854048 0.1102 0.1246133 0.1417017 0.16130351 0.1832568 0.20739999 0.23369209 0.26261139 0.29477459 0.33079851 0.37130001 0.4162091 0.4654642 0.51969481 0.5795303 0.64560002 0.71848381 0.79671329 0.87784588 0.95943898 1.0390501 1.11536729 1.18849707 1.25812328 1.32392955 1.38559997 1.44263518 1.49480355 1.54219031 1.58488071 1.62295997 1.65640485 1.68529594 1.70987451 1.73038209 1.74705994 1.76004458 1.76962328 1.77626371 1.78043342 1.78260004 1.78296816 1.78169978 1.77919817 1.7758671 1.77210998 1.76825893 1.76403904 1.7589438 1.75246632 1.74409997 1.73355949 1.7208581 1.70593691 1.68873715 1.66919994 1.64752865 1.62341273 1.59602225 1.56452799 1.52810001 1.4861114 1.43952155 1.38987994 1.33873618 1.28763998 1.23742235 1.18782425 1.13876104 1.09014797 1.04190004 0.99419761 0.94734728 0.90145308 0.8566193 0.81295007 0.77051729 0.7294448 0.68991357 0.65210491 0.61619997 0.58232862 0.55041617 0.52033758 0.49196729 0.46518001 0.4399246 0.41618359 0.39388219 0.3729459 0.35330001 0.33485779 0.31755209 0.30133751 0.28616861 0.27200001 0.25881711 0.2464838 0.2347718 0.2234533 0.2123 0.20116919 0.19011959 0.1792254 0.1685608 0.1582 0.1481383 0.1383758 0.1289942 0.1200751 0.1117 0.1039048 0.09666748 0.08998272 0.08384531 0.07824999 0.07320899 0.06867816 0.06456784 0.06078835 0.05725001 0.05390435 0.05074664 0.04775276 0.04489859 0.04216 0.03950728 0.03693564 0.03445836 0.03208872 0.02984 0.02771181 0.02569444 0.02378716 0.02198925 0.0203 0.01871805 0.01724036 0.01586364 0.01458461 0.0134 0.01230723 0.01130188 0.01037792 0.00952931 0.00875 0.0080352 0.0073816 0.0067854 0.0062428 0.00575 0.0053036 0.0048998 0.0045342 0.0042024 0.0039 0.0036232 0.0033706 0.0031414 0.0029348 0.00275 0.0025852 0.0024386 0.0023094 0.0021968 0.0021 0.00201773 0.0019482 0.0018898 0.00184093 0.0018 0.00176627 0.0017378 0.0017112 0.00168307 0.00165 0.00161013 0.0015644 0.0015136 0.00145853 0.0014 0.00133667 0.00127 0.001205 0.00114667 0.0011 0.0010688 0.0010494 0.0010356 0.0010212 0.001 0.00096864 0.00092992 0.00088688 0.00084256 0.0008 0.00076096 0.00072368 0.00068592 0.00064544 0.0006 0.00054787 0.0004916 0.0004354 0.00038347 0.00034 0.00030725 0.00028316 0.00026544 0.00025181 0.00024 0.00022955 0.00022064 0.00021196 0.00020219 0.00019 0.00017421 0.00015564 0.00013596 0.00011685 0.0001 8.613e-05 7.46e-05 6.5e-05 5.693e-05 5e-05 4.416e-05 3.948e-05 3.572e-05 3.264e-05 3e-05 2.765e-05 2.556e-05 2.364e-05 2.181e-05 2e-05 1.813e-05 1.62e-05 1.42e-05 1.213e-05 1e-05 7.73e-06 5.4e-06 3.2e-06 1.33e-06 0 0 0 0 0 0 0 0 S 0}
   alpha {}}
 name ColorLookup6
 selected true
 xpos -178
 ypos 3812
}
set Naa7f3240 [stack 0]
Expression {
 expr0 y<(height-big)?0:xwidth/3*2?(x-width/3*2)/(width/3):0
 expr2 y<(height-big)?0:x>width/3&&xwidth/3*2?1-(x-width/3*2)/(width/3):0
 expr3 y<(height-big)?0:1
 name Expression10
 note_font Helvetica
 selected true
 xpos -288
 ypos 3813
 addUserKnob {20 User}
 addUserKnob {7 big R 0 100}
 big 8
}
Group {
 name RGB_to_XYZ_D65_
 tile_color 0x8ab444ff
 selected true
 xpos -288
 ypos 3872
 addUserKnob {20 RGB_to_XYZ_tab l RGB_to_XYZ}
 addUserKnob {4 gamut M {ACES ACEScg "Filmlight E-Gamut" "DaVinci WG" Rec709 Rec2020 P3D60 P3D65 P3DCI AdobeRGB "Arri Alexa WideGamut" REDWideGamutRGB CanonCinemaGamut SonySGamut SonySGamut3Cine BMDWideGamutV4}}
 gamut "Arri Alexa WideGamut"
 addUserKnob {41 matrix T ColorMatrix.matrix}
 addUserKnob {41 invert -STARTLINE T ColorMatrix.invert}
}
 Input {
  inputs 0
  name Input
  xpos 290
  ypos -580
 }
 Dot {
  name Dot391
  xpos 324
  ypos -516
 }
set N9b7967a0 [stack 0]
 ColorMatrix {
  matrix {
      {{"SwitchGamut.input\[value SwitchGamut.which].matrix"} {"SwitchGamut.input\[value SwitchGamut.which].matrix"} {"SwitchGamut.input\[value SwitchGamut.which].matrix"}}
      {{"SwitchGamut.input\[value SwitchGamut.which].matrix"} {"SwitchGamut.input\[value SwitchGamut.which].matrix"} {"SwitchGamut.input\[value SwitchGamut.which].matrix"}}
      {{"SwitchGamut.input\[value SwitchGamut.which].matrix"} {"SwitchGamut.input\[value SwitchGamut.which].matrix"} {"SwitchGamut.input\[value SwitchGamut.which].matrix"}}
    }
  name ColorMatrix
  note_font Helvetica
  xpos 290
  ypos -339
 }
 Output {
  name Output
  xpos 290
  ypos -250
 }
push $N9b7967a0
 ColorMatrix {
  matrix {
      {0.638199985 0.2318339199 0.1299659461}
      {0.2680045366 0.8326835632 -0.1006879508}
      {-0.02700686455 -0.07951174676 1.106518626}
    }
  name ColorMatrix280
  label "BMDWideGamutV4 to XYZ D65"
  note_font Helvetica
  xpos 2050
  ypos -465
 }
push $N9b7967a0
 ColorMatrix {
  matrix {
      {0.6303120852 0.2619010508 0.1077866852}
      {0.2150758505 0.8850685358 -0.1001443267}
      {-0.02944366075 -0.02539661899 1.054840207}
    }
  name ColorMatrix279
  label "SonySGamut3Cine to XYZ D65"
  note_font Helvetica
  xpos 1940
  ypos -465
 }
push $N9b7967a0
 ColorMatrix {
  matrix {
      {0.7433091998 0.1355149448 0.121175684}
      {0.2709797025 0.7866065502 -0.05758608133}
      {-0.008886438794 0.004223868717 1.004662395}
    }
  name ColorMatrix278
  label "SonySGamut to XYZ D65"
  note_font Helvetica
  xpos 1830
  ypos -465
 }
push $N9b7967a0
 ColorMatrix {
  matrix {
      {0.753374815 0.1364434063 0.1101816669}
      {0.2612613738 0.8696424365 -0.1309035271}
      {-0.0088850623 -0.2171433568 1.226028442}
    }
  name ColorMatrix2
  label "CanonCinemaGamut to XYZ D65"
  note_font Helvetica
  xpos 1720
  ypos -465
 }
push $N9b7967a0
 ColorMatrix {
  matrix {
      {0.7736025453 0.07218572497 0.154211551}
      {0.2866941094 0.8429791927 -0.1296732426}
      {-0.07316493243 -0.3189391792 1.392104149}
    }
  name ColorMatrix277
  label "REDWideGamutRGB to XYZ D65"
  note_font Helvetica
  xpos 1610
  ypos -465
 }
push $N9b7967a0
 ColorMatrix {
  matrix {
      {0.6712647676 0.225895524 0.1028395444}
      {0.2919538021 0.8238409758 -0.11579483}
      {0.002569448669 -0.06155249104 1.058983088}
    }
  name ColorMatrix276
  label "Arri AlexaWideGamut to XYZ D65"
  note_font Helvetica
  xpos 1500
  ypos -465
 }
push $N9b7967a0
 ColorMatrix {
  matrix {
      {0.6067286134 0.1952306777 0.1980403513}
      {0.297344923 0.627363503 0.07529146969}
      {0.02482086048 0.06490825117 0.9102708101}
    }
  name ColorMatrix281
  label "AdobeRGB to XYZ D65"
  note_font Helvetica
  xpos 1390
  ypos -465
 }
push $N9b7967a0
 ColorMatrix {
  matrix {
      {0.4787762463 0.3158869743 0.2053366601}
      {0.2126924992 0.7093909383 0.07791686803}
      {0.0004741555313 0.05068216845 0.9488437176}
    }
  name ColorMatrix275
  label "P3DCI to XYZ D65"
  note_font Helvetica
  xpos 1280
  ypos -465
 }
push $N9b7967a0
 ColorMatrix {
  matrix {
      {0.5119343996 0.2795160115 0.2085496932}
      {0.2289746702 0.6917386651 0.07928693295}
      {-6.241469008e-10 0.04142423347 0.9585757852}
    }
  name ColorMatrix1
  label "P3D65 to XYZ D65"
  note_font Helvetica
  xpos 1170
  ypos -465
 }
push $N9b7967a0
 ColorMatrix {
  matrix {
      {0.5230477452 0.2702760398 0.2066760808}
      {0.234437868 0.6870626211 0.07849972695}
      {0.0004090408329 0.04529011995 0.9543009996}
    }
  name ColorMatrix274
  label "P3D60 to XYZ D65"
  note_font Helvetica
  xpos 1060
  ypos -465
 }
push $N9b7967a0
 ColorMatrix {
  matrix {
      {0.670160532 0.1521552503 0.1776841432}
      {0.2627002597 0.6779981852 0.05930172652}
      {-8.170549792e-10 0.0257770475 0.9742228985}
    }
  name ColorMatrix273
  label "Rec2020 to XYZ D65"
  note_font Helvetica
  xpos 950
  ypos -465
 }
push $N9b7967a0
 ColorMatrix {
  matrix {
      {0.4338874221 0.3762239516 0.1898886263}
      {0.2126391083 0.7151687741 0.07219232619}
      {0.01775004528 0.1094476134 0.8728022575}
    }
  name ColorMatrix272
  label "Rec709 to XYZ D65"
  note_font Helvetica
  xpos 840
  ypos -465
 }
push $N9b7967a0
 ColorMatrix {
  matrix {
      {0.7371433377 0.1565298587 0.10632658}
      {0.2741185129 0.8736318946 -0.1477504224}
      {-0.09087020159 -0.1266189069 1.217489123}
    }
  name ColorMatrix271
  label "DaVinci WG to XYZ D65"
  note_font Helvetica
  xpos 730
  ypos -465
 }
push $N9b7967a0
 ColorMatrix {
  matrix {
      {0.742166698 0.1725921929 0.08524093777}
      {0.280130744 0.820206821 -0.1003373861}
      {-0.09529476613 -0.06694526225 1.162240028}
    }
  name ColorMatrix270
  label "Filmlight E-Gamut to XYZ D65"
  note_font Helvetica
  xpos 620
  ypos -465
 }
push $N9b7967a0
 ColorMatrix {
  matrix {
      {0.6864269972 0.1338092536 0.179763481}
      {0.2680640519 0.6724645495 0.05947146937}
      {-0.005022625439 0.004758977331 1.000263691}
    }
  name ColorMatrix269
  label "ACEScg to XYZ D65"
  note_font Helvetica
  xpos 510
  ypos -465
 }
push $N9b7967a0
 ColorMatrix {
  matrix {
      {0.9875583053 -0.006041352171 0.01848266274}
      {0.338093549 0.7272140384 -0.06530748308}
      {0.00066398934 0.000751514337 0.9985846281}
    }
  name ColorMatrix267
  label "ACES to XYZ D65"
  note_font Helvetica
  xpos 400
  ypos -465
 }
 Switch {
  inputs 16
  which {{gamut}}
  name SwitchGamut
  note_font Helvetica
  xpos 1280
  ypos -339
 }
end_group
push $Naa7f3240
Merge2 {
 inputs 2
 bbox B
 name Merge3
 note_font Helvetica
 selected true
 xpos -178
 ypos 3873
}
Dot {
 name Dot22
 note_font "Helvetica Bold"
 note_font_size 24
 note_font_color 0xff
 selected true
 xpos -144
 ypos 3936
}
set N56c75930 [stack 0]
Colorspace {
 colorspace_in CIE-XYZ
 primary_in "Adobe (1998)"
 colorspace_out CIE-Yxy
 name Colorspace2
 label "\[value colorspace_in] -> \[value colorspace_out]"
 selected true
 xpos -68
 ypos 3926
}
push $N56c75930
BlinkScript {
 inputs 2
 ProgramGroup 1
 KernelDescription "2 \"PlotChromaticity_grid\" iterate pixelWise b2e7b5f8a89bdb0629aa8cc2eae387ef3436f24cb0af642eeba41235874506c4 3 \"col\" Read Random \"Yxy\" Read Random \"dst\" Write Random 6 \"padding\" Float 1 AAAAAA== \"left_margin\" Float 1 AAAAAA== \"tolerance\" Float 1 AAAAAA== \"antialias\" Bool 1 AA== \"draw_axes\" Bool 1 AA== \"grid_color\" Float 4 AAAAAAAAAAAAAAAAAAAAAA== 6 \"padding\" 1 1 \"left_margin\" 1 1 \"tolerance\" 1 1 \"antialias\" 1 1 \"draw_axes\" 1 1 \"grid_color\" 4 1 2 \"outsize\" Float 1 1 AAAAAA== \"offset\" Float 1 1 AAAAAA=="
 kernelSource "kernel PlotChromaticity_grid : public ImageComputationKernel\n\{\n  Image col;\n  Image Yxy;\n  Image dst;\n\nparam:\n  float padding;\n  float left_margin;\n  float tolerance;\n  bool antialias;\n  bool draw_axes;\n  float4 grid_color;\n\nlocal:\n  float outsize;\n  float offset;\n\n  void init() \{\n    // calculate output width and height and offset based on padding\n    outsize = float(dst.bounds.height()/padding);\n    // xy offset for margin on lower left corner\n    offset = dst.bounds.height()*left_margin;\n  \}\n\n  float gaussian(float d, float a, float expv) \{\n    return max(0.0f, exp(-a*d*d)-expv);\n  \}\n\n  float gaussian_filter(float x, float y, float r) \{\n    // return gaussian weighted distance from origin (0, 0)\n    // given coordinate (x, y) and radius r\n    float a = 1.5f; // rate falloff\n    float expv = exp(-a*r*r);\n    return gaussian(x, a, expv) * gaussian(y, a, expv);\n  \}\n\n  void write_aa(float x, float y, float4 rgb) \{\n    // skip black pixels\n    if (rgb.x == 0.0f && rgb.y == 0.0f && rgb.z == 0.0f) return;\n    \n    // size of pixel neighborhood = n*2+1 by n*2+1\n    int n = 2;\n\n    // center of neighborhood\n    int u0 = round(x);\n    int v0 = round(y);\n\n    // skip if center pixel weight is greater than tolerance\n    if ( dst.bounds.inside(u0, v0)) \{\n      if (dst(u0, v0, 3) >= tolerance) return;\n    \}\n\n    // loop over neighborhood\n    for (int j = -n; j <= n; j++) \{\n      int v = v0 + j;\n      for (int i = -n; i <= n; i++) \{\n        int u = u0 + i;\n        if ( dst.bounds.inside(u, v)) \{\n          // get filter weight for coord (u,v)\n          float w = gaussian_filter(u-x, v-y, float(n));\n          float4 c0 = dst(u, v); // existing color\n\n          // merge current color sample over existing color sample\n          for (int k=0; k<3; k++) \{\n            dst(u, v, k) = rgb\[k]*w+c0\[k]*(1-w); \n          \}\n\n          // merge current weight over existing weight\n          float w0 = dst(u, v, 3);\n          dst(u, v, 3) = w+w0*(1-w);\n        \}\n      \}\n    \}\n  \}\n\n  void draw_grid() \{\n    // grid width in pixels. expresses a 0 to 1 range in CIE xy\n    float grid_width = 1.0f * outsize + offset;\n    // draw grid lines\n    float i = offset;\n    while (i <= grid_width && i > 0.0f) \{\n      write_aa(offset, i, grid_color);\n      write_aa(i, offset, grid_color);\n      i += 1.0;\n    \}\n    // cross-hatching interval in pixels\n    float hatch_interval = (grid_width - offset) * 0.1f;\n    // cross-hatch length in pixels\n    float hatch_width = outsize * 0.01f;\n    i = offset;\n    while (i <= grid_width) \{\n      i += hatch_interval;\n      float j = 0.0;\n      while (j <= hatch_width/2) \{\n        write_aa(offset+j, i, grid_color);\n        write_aa(offset-j, i, grid_color);\n        write_aa(i, offset+j, grid_color);\n        write_aa(i, offset-j, grid_color);\n        j += 1.0;\n      \}\n    \}\n  \}\n\n  void process(int2 pos) \{\n    float4 rgba = col(pos.x, pos.y);\n    \n    // Get CIE xy position from Yxy input for current pixel\n    float2 xy = float2(Yxy(pos.x, pos.y, 1), Yxy(pos.x, pos.y, 2));\n    \n    // Find output pixel coordinate for this CIE xy pixel value\n    float2 out_coord = float2(xy.x * outsize + offset, xy.y * outsize + offset);\n\n    // For each RGB component, write value from color input to output coordinate\n    if (antialias) \{\n      write_aa(out_coord.x, out_coord.y, rgba);\n    \} else \{\n      // For each RGB component, write value from color input to output coordinate\n      int2 p = int2(round(out_coord.x), round(out_coord.y));\n      if (dst.bounds.inside(p.x, p.y)) \{\n        for (int k=0; k<3; k++) \{\n          dst(p.x, p.y, k) = col(pos.x, pos.y, k);\n        \}\n        dst(p.x, p.y, 3) = 1.0f;\n      \}\n    \}\n\n    // draw CIExy coordinate system axes\n    if (draw_axes && pos.x == 0 && pos.y == 0) \{\n      draw_grid();\n    \}\n  \}\n\};"
 useGPUIfAvailable {{parent.use_gpu}}
 rebuild ""
 PlotChromaticity_grid_padding 1
 PlotChromaticity_grid_left_margin 0.1
 PlotChromaticity_grid_tolerance 1
 PlotChromaticity_grid_antialias true
 PlotChromaticity_grid_draw_axes true
 PlotChromaticity_grid_grid_color 0.14
 format "2048 2048 0 0 2048 2048 1 square_2K"
 rebuild_finalise ""
 name PlotInput2
 selected true
 xpos -178
 ypos 3986
}
Dot {
 name Dot23
 note_font "Helvetica Bold"
 note_font_size 24
 note_font_color 0xff
 selected true
 xpos -144
 ypos 4176
}
set N18f4e280 [stack 0]
NoOp {
 name CalcPrimaries_Rendering
 knobChanged "import nuke\nfloat3 = nuke.math.Vector3\nfloat3x3 = nuke.math.Matrix3\n\n\ndef transpose(m):\n    # Transpose (swap rows and columns) of a nuke.math.Matrix3\n    return float3x3(m\[0], m\[1], m\[2], m\[3], m\[4], m\[5], m\[6], m\[7], m\[8])\n\ndef set_matrix(m):\n    # Populate a nuke.math.Matrix3 with a 3x3 python list (either 3x3 or 1x9)\n    if len(m) is 3 and \[isinstance(r, list) for r in m]:\n        m = sum(m, \[])\n    o = float3x3(m\[0], m\[3], m\[6], m\[1], m\[4], m\[7], m\[2], m\[5], m\[8])\n    return o\n\ndef diag(v):\n    # Create a diagonal 3x3 matrix from a 1x3 vector\n    return float3x3(v\[0], 0, 0, 0, v\[1], 0, 0, 0, v\[2])\n\n\ndef xyY_to_XYZ(xyY):\n    # Convert an xyY chromaticity value to XYZ\n    x = xyY\[0]\n    y = xyY\[1]\n    if len(xyY) is 2:\n        # Assume an xy chromaticity coordinate, use default Y\n        Y = 1.0\n    else:\n        Y = xyY\[2]\n    XYZ = float3(x * Y / max(y, 1e-10), Y, (1.0 - x - y) * Y / max(y, 1e-10))\n    return XYZ\n\ndef xy_to_xyz(xy):\n    return float3(xy\[0], xy\[1], 1.0 - xy\[0] - xy\[1])\n\n\ndef calc_cat(src_xy, dst_xy, cat_method='cat02'):\n    # Calculate Von Kries chromatic adaptation transform matrix,\n    # given a source and destination illuminant and CAT method.\n    # Illuminant is given as xy chromaticity coordinates. \n    # CAT method is the name of one of the below cone response matrices.\n\n    crmtxs = \{\n        \"bianco\": \[\[0.8752, 0.2787, -0.1539], \[-0.8904, 1.8709, 0.0195], \[-0.0061, 0.0162, 0.9899]],\n        \"bianco_pc\": \[\[0.6489, 0.3915, -0.0404], \[-0.3775, 1.3055, 0.072], \[-0.0271, 0.0888, 0.9383]],\n        \"bradford\": \[\[0.8951, 0.2664, -0.1614], \[-0.7502, 1.7135, 0.0367], \[0.0389, -0.0685, 1.0296]],\n        \"cat02\": \[\[0.7328, 0.4296, -0.1624], \[-0.7036, 1.6975, 0.0061], \[0.003, 0.0136, 0.9834]],\n        \"cat02_brill_cat\": \[\[0.7328, 0.4296, -0.1624], \[-0.7036, 1.6975, 0.0061], \[0.0, 0.0, 1.0]],\n        \"cmccat2000\": \[\[0.7982, 0.3389, -0.1371], \[-0.5918, 1.5512, 0.0406], \[0.0008, 0.0239, 0.9753]],\n        \"cmccat97\": \[\[0.8951, -0.7502, 0.0389], \[0.2664, 1.7135, 0.0685], \[-0.1614, 0.0367, 1.0296]],\n        \"fairchild\": \[\[0.8562, 0.3372, -0.1934], \[-0.836, 1.8327, 0.0033], \[0.0357, -0.0469, 1.0112]],\n        \"sharp\": \[\[1.2694, -0.0988, -0.1706], \[-0.8364, 1.8006, 0.0357], \[0.0297, -0.0315, 1.0018]],\n        \"von_kries\": \[\[0.40024, 0.7076, -0.08081], \[-0.2263, 1.16532, 0.0457], \[0.0, 0.0, 0.91822]],\n        \"xyz_scaling\": \[\[1.0, 0.0, 0.0], \[0.0, 1.0, 0.0], \[0.0, 0.0, 1.0]]\n    \}\n    \n    cat_method = cat_method.lower().replace(' ', '_')\n    # Return identity matrix if no match\n    if cat_method not in crmtxs.keys():\n        m = float3x3()\n        m.makeIdentity()\n        return m\n        \n    crmtx = set_matrix(crmtxs\[cat_method])\n\n    # Get XYZ values from xy chromaticity coordinates\n    src_XYZ = xyY_to_XYZ(src_xy)\n    dst_XYZ = xyY_to_XYZ(dst_xy)\n\n    # Calculate source and destination cone response matrices\n    src_crmtx = transpose(crmtx) * src_XYZ\n    dst_crmtx = transpose(crmtx) * dst_XYZ\n\n    von_kries_matrix = diag(dst_crmtx / src_crmtx)\n    cat_mtx = float3x3()\n    cat_mtx = crmtx * (von_kries_matrix * crmtx.inverse())\n\n    return cat_mtx\n\n\ndef calc_npm(chr):\n    # Calculate a normalized primaries matrix from the specified chromaticity coordinates,\n    # given 2x4 list of xy chromaticity coordinates: red, green, blue, and white\n    rxyz, gxyz, bxyz, wxyz = map(xy_to_xyz, chr)\n    wy = chr\[3]\[1]\n    wxyz = float3(wxyz.x / wy, wxyz.y / wy, wxyz.z / wy)\n    np_mtx = float3x3(rxyz\[0], gxyz\[0], bxyz\[0],\n                      rxyz\[1], gxyz\[1], bxyz\[1],\n                      rxyz\[2], gxyz\[2], bxyz\[2])\n    wscale = np_mtx.inverse() * wxyz \n    np_mtx = transpose(np_mtx * diag(wscale))\n    return np_mtx\n\ndef is_xyz(c):\n    # return true if primaries are XYZ\n    return c\[:3] == \[\[1.0, 0.0], \[0.0, 1.0], \[0.0, 0.0]]\n\n\ndef start(node):\n    identity_mtx = float3x3()\n    identity_mtx.makeIdentity()\n\n    invert = node\['invert'].getValue()\n    cat_method = node\['cat_method'].value()\n\n    src_chr = \[node\[k].getValue() for k in \['rxy', 'gxy', 'bxy', 'wxy']]\n    dst_chr = \[node\[k].getValue() for k in \['drxy', 'dgxy', 'dbxy', 'dwxy']]\n\n    # bypass double scale if source or destination is XYZ\n    if is_xyz(src_chr):\n        rgb_to_xyz = identity_mtx\n    else:\n        rgb_to_xyz = calc_npm(src_chr)\n    \n    if is_xyz(dst_chr):\n        xyz_to_rgb = identity_mtx\n    else:\n        xyz_to_rgb = calc_npm(dst_chr).inverse()\n\n    if src_chr\[3] == dst_chr\[3]:\n        cat_mtx = identity_mtx\n    else:\n        cat_mtx = calc_cat(src_chr\[3], dst_chr\[3], cat_method)\n\n    mtx = (rgb_to_xyz * cat_mtx) * xyz_to_rgb\n\n    if invert:\n        mtx = mtx.inverse()\n\n    node\['matrix'].setValue(mtx)\n\n\nn = nuke.thisNode()\nk = nuke.thisKnob()\nif k.name() in \['rxy', 'gxy', 'bxy']:\n    tg = nuke.toNode(n\['target_node'].getValue())\n    margin = n\['margin'].getValue()\n    coord = k.getValue()\n    coord = \[coord\[0]/n.width()-margin, coord\[1]/n.height()-margin]\n    tg\['d\{0\}'.format(k.name())].setValue(coord)\n    start(tg)"
 note_font Helvetica
 selected true
 xpos 15
 ypos 4173
 addUserKnob {20 User}
 addUserKnob {1 target_node l "target node"}
 target_node RenderingPrimaries
 addUserKnob {7 margin}
 margin {{parent.PlotInput2.PlotChromaticity_grid_left_margin}}
 addUserKnob {6 dst t "target dst xy instead of src" +STARTLINE}
 dst true
 addUserKnob {26 ""}
 addUserKnob {35 presets l "" +STARTLINE M {"presets/wide 01" "knobs this \{rxy \{1755.5 784.5\} gxy \{455 2013\} bxy \{357.7999878 25.39999962\} \}" "presets/wide 02" "knobs this \{rxy \{1848.5 763.5\} gxy \{538 2232\} bxy \{430 82\}\}" "presets/wide 03" "knobs this \{rxy \{1869 747.5\} gxy \{472 2074\} bxy \{388 -16\}\}" ""}}
 addUserKnob {12 rxy}
 rxy {1869 747.5}
 addUserKnob {12 gxy}
 gxy {472 2074}
 addUserKnob {12 bxy}
 bxy {388 -16}
}
StickyNote {
 inputs 0
 name StickyNote4
 tile_color 0x272727ff
 label "
\n1). Connect an input image in ACEScg"
 note_font Helvetica
 note_font_size 8
 note_font_color 0xa8a8a8ff
 selected true
 xpos 376
 ypos 3835
}
push $N18f4e280
NoOp {
 name CalcPrimaries_Output
 knobChanged "import nuke\nfloat3 = nuke.math.Vector3\nfloat3x3 = nuke.math.Matrix3\n\n\ndef transpose(m):\n    # Transpose (swap rows and columns) of a nuke.math.Matrix3\n    return float3x3(m\[0], m\[1], m\[2], m\[3], m\[4], m\[5], m\[6], m\[7], m\[8])\n\ndef set_matrix(m):\n    # Populate a nuke.math.Matrix3 with a 3x3 python list (either 3x3 or 1x9)\n    if len(m) is 3 and \[isinstance(r, list) for r in m]:\n        m = sum(m, \[])\n    o = float3x3(m\[0], m\[3], m\[6], m\[1], m\[4], m\[7], m\[2], m\[5], m\[8])\n    return o\n\ndef diag(v):\n    # Create a diagonal 3x3 matrix from a 1x3 vector\n    return float3x3(v\[0], 0, 0, 0, v\[1], 0, 0, 0, v\[2])\n\n\ndef xyY_to_XYZ(xyY):\n    # Convert an xyY chromaticity value to XYZ\n    x = xyY\[0]\n    y = xyY\[1]\n    if len(xyY) is 2:\n        # Assume an xy chromaticity coordinate, use default Y\n        Y = 1.0\n    else:\n        Y = xyY\[2]\n    XYZ = float3(x * Y / max(y, 1e-10), Y, (1.0 - x - y) * Y / max(y, 1e-10))\n    return XYZ\n\ndef xy_to_xyz(xy):\n    return float3(xy\[0], xy\[1], 1.0 - xy\[0] - xy\[1])\n\n\ndef calc_cat(src_xy, dst_xy, cat_method='cat02'):\n    # Calculate Von Kries chromatic adaptation transform matrix,\n    # given a source and destination illuminant and CAT method.\n    # Illuminant is given as xy chromaticity coordinates. \n    # CAT method is the name of one of the below cone response matrices.\n\n    crmtxs = \{\n        \"bianco\": \[\[0.8752, 0.2787, -0.1539], \[-0.8904, 1.8709, 0.0195], \[-0.0061, 0.0162, 0.9899]],\n        \"bianco_pc\": \[\[0.6489, 0.3915, -0.0404], \[-0.3775, 1.3055, 0.072], \[-0.0271, 0.0888, 0.9383]],\n        \"bradford\": \[\[0.8951, 0.2664, -0.1614], \[-0.7502, 1.7135, 0.0367], \[0.0389, -0.0685, 1.0296]],\n        \"cat02\": \[\[0.7328, 0.4296, -0.1624], \[-0.7036, 1.6975, 0.0061], \[0.003, 0.0136, 0.9834]],\n        \"cat02_brill_cat\": \[\[0.7328, 0.4296, -0.1624], \[-0.7036, 1.6975, 0.0061], \[0.0, 0.0, 1.0]],\n        \"cmccat2000\": \[\[0.7982, 0.3389, -0.1371], \[-0.5918, 1.5512, 0.0406], \[0.0008, 0.0239, 0.9753]],\n        \"cmccat97\": \[\[0.8951, -0.7502, 0.0389], \[0.2664, 1.7135, 0.0685], \[-0.1614, 0.0367, 1.0296]],\n        \"fairchild\": \[\[0.8562, 0.3372, -0.1934], \[-0.836, 1.8327, 0.0033], \[0.0357, -0.0469, 1.0112]],\n        \"sharp\": \[\[1.2694, -0.0988, -0.1706], \[-0.8364, 1.8006, 0.0357], \[0.0297, -0.0315, 1.0018]],\n        \"von_kries\": \[\[0.40024, 0.7076, -0.08081], \[-0.2263, 1.16532, 0.0457], \[0.0, 0.0, 0.91822]],\n        \"xyz_scaling\": \[\[1.0, 0.0, 0.0], \[0.0, 1.0, 0.0], \[0.0, 0.0, 1.0]]\n    \}\n    \n    cat_method = cat_method.lower().replace(' ', '_')\n    # Return identity matrix if no match\n    if cat_method not in crmtxs.keys():\n        m = float3x3()\n        m.makeIdentity()\n        return m\n        \n    crmtx = set_matrix(crmtxs\[cat_method])\n\n    # Get XYZ values from xy chromaticity coordinates\n    src_XYZ = xyY_to_XYZ(src_xy)\n    dst_XYZ = xyY_to_XYZ(dst_xy)\n\n    # Calculate source and destination cone response matrices\n    src_crmtx = transpose(crmtx) * src_XYZ\n    dst_crmtx = transpose(crmtx) * dst_XYZ\n\n    von_kries_matrix = diag(dst_crmtx / src_crmtx)\n    cat_mtx = float3x3()\n    cat_mtx = crmtx * (von_kries_matrix * crmtx.inverse())\n\n    return cat_mtx\n\n\ndef calc_npm(chr):\n    # Calculate a normalized primaries matrix from the specified chromaticity coordinates,\n    # given 2x4 list of xy chromaticity coordinates: red, green, blue, and white\n    rxyz, gxyz, bxyz, wxyz = map(xy_to_xyz, chr)\n    wy = chr\[3]\[1]\n    wxyz = float3(wxyz.x / wy, wxyz.y / wy, wxyz.z / wy)\n    np_mtx = float3x3(rxyz\[0], gxyz\[0], bxyz\[0],\n                      rxyz\[1], gxyz\[1], bxyz\[1],\n                      rxyz\[2], gxyz\[2], bxyz\[2])\n    wscale = np_mtx.inverse() * wxyz \n    np_mtx = transpose(np_mtx * diag(wscale))\n    return np_mtx\n\ndef is_xyz(c):\n    # return true if primaries are XYZ\n    return c\[:3] == \[\[1.0, 0.0], \[0.0, 1.0], \[0.0, 0.0]]\n\n\ndef start(node):\n    identity_mtx = float3x3()\n    identity_mtx.makeIdentity()\n\n    invert = node\['invert'].getValue()\n    cat_method = node\['cat_method'].value()\n\n    src_chr = \[node\[k].getValue() for k in \['rxy', 'gxy', 'bxy', 'wxy']]\n    dst_chr = \[node\[k].getValue() for k in \['drxy', 'dgxy', 'dbxy', 'dwxy']]\n\n    # bypass double scale if source or destination is XYZ\n    if is_xyz(src_chr):\n        rgb_to_xyz = identity_mtx\n    else:\n        rgb_to_xyz = calc_npm(src_chr)\n    \n    if is_xyz(dst_chr):\n        xyz_to_rgb = identity_mtx\n    else:\n        xyz_to_rgb = calc_npm(dst_chr).inverse()\n\n    if src_chr\[3] == dst_chr\[3]:\n        cat_mtx = identity_mtx\n    else:\n        cat_mtx = calc_cat(src_chr\[3], dst_chr\[3], cat_method)\n\n    mtx = (rgb_to_xyz * cat_mtx) * xyz_to_rgb\n\n    if invert:\n        mtx = mtx.inverse()\n\n    node\['matrix'].setValue(mtx)\n\n\nn = nuke.thisNode()\nk = nuke.thisKnob()\nif k.name() in \['rxy', 'gxy', 'bxy']:\n    tg = nuke.toNode(n\['target_node'].getValue())\n    margin = n\['margin'].getValue()\n    coord = k.getValue()\n    coord = \[coord\[0]/n.width()-margin, coord\[1]/n.height()-margin]\n    tg\['d\{0\}'.format(k.name())].setValue(coord)\n    start(tg)"
 note_font Helvetica
 selected true
 xpos -178
 ypos 4341
 addUserKnob {20 User}
 addUserKnob {1 target_node l "target node"}
 target_node OutputPrimaries
 addUserKnob {7 margin}
 margin {{parent.PlotInput2.PlotChromaticity_grid_left_margin}}
 addUserKnob {6 dst t "target dst xy instead of src" +STARTLINE}
 dst true
 addUserKnob {26 ""}
 addUserKnob {35 presets l "" +STARTLINE M {"presets/wide 01" "knobs this \{rxy \{1755.5 784.5\} gxy \{455 2013\} bxy \{357.7999878 25.39999962\} \}" "presets/wide 02" "knobs this \{rxy \{1848.5 763.5\} gxy \{538 2232\} bxy \{430 82\}\}" "presets/wide 03" "knobs this \{rxy \{1869 747.5\} gxy \{472 2074\} bxy \{388 -16\}\}" ""}}
 addUserKnob {12 rxy}
 rxy {1869.09 747.32}
 addUserKnob {12 gxy}
 gxy {472 2074}
 addUserKnob {12 bxy}
 bxy {388 -16}
}
push $N56c6fcc0
Group {
 name Tonemap_PiecewiseHyperbolic5
 selected true
 xpos 128
 ypos 4260
 addUserKnob {20 Tonemap}
 addUserKnob {35 presets l " " M {"presets/SDR - Dark" "knobs this \{Lw \{100 100\} Lg 10 g \{0.18 \{Lg/Lw.0*pow(2,ex)\}\} w \{40 \{Lw.1/Lw.0\}\} ex 0 p 1.3 ps 1 t0 0.003\}" "presets/SDR - Dim" "knobs this \{Lw \{100 100\} Lg 10 g \{0.18 \{Lg/Lw.0*pow(2,ex)\}\} w \{40 \{Lw.1/Lw.0\}\} ex 0 p 1.3 ps 0.95 t0 0.003\}" "presets/SDR - Average" "knobs this \{Lw \{100 100\} Lg 10 g \{0.18 \{Lg/Lw.0*pow(2,ex)\}\} w \{40 \{Lw.1/Lw.0\}\} ex 0 p 1.3 ps 0.9 t0 0.003\}" "presets/Rec.2100 PQ ST-2084 600 nit" "knobs this \{Lw \{10000 600\} Lg 14 g \{0.18 \{Lg/Lw.0*pow(2,ex)\}\} w \{80 \{Lw.1/Lw.0\}\} ex \{\{0.1*log(Lw.1/1000)/log(2)\}\} p 1.2 t0 0.0001\}" "presets/Rec.2100 PQ ST-2084 1000 nit" "knobs this \{Lw \{10000 1000\} Lg 14 g \{0.18 \{Lg/Lw.0*pow(2,ex)\}\} w \{90 \{Lw.1/Lw.0\}\} ex \{\{0.1*log(Lw.1/1000)/log(2)\}\} p 1.2 t0 0.0001\}" "presets/Rec.2100 PQ ST-2084 2000 nit" "knobs this \{Lw \{10000 2000\} Lg 14 g \{0.18 \{Lg/Lw.0*pow(2,ex)\}\} w \{100 \{Lw.1/Lw.0\}\} ex \{\{0.1*log(Lw.1/1000)/log(2)\}\} p 1.2 t0 0.0001\}" "presets/Rec.2100 PQ ST-2084 4000 nit" "knobs this \{Lw \{10000 4000\} Lg 14 g \{0.18 \{Lg/Lw.0*pow(2,ex)\}\} w \{110 \{Lw.1/Lw.0\}\} ex \{\{0.1*log(Lw.1/1000)/log(2)\}\} p 1.2 t0 0.0001\}" "" ""}}
 addUserKnob {78 Lw t "Peak white to reference white ratio. Useful for HDR, if you need to ouput a 1000 nit peak luminance image in the 10,000 nit peak luminance ST-2084 PQ container for example." n 2}
 Lw {100 100}
 addUserKnob {7 Lg t "Grey luminance in nits." R 4 20}
 Lg 10
 addUserKnob {26 ""}
 addUserKnob {7 ex l exposure t "scene-referred exposure control"}
 addUserKnob {78 g l grey t "input -> output grey" n 2}
 g {0.18 {Lg/Lw.0*pow(2,ex)}}
 addUserKnob {78 w l white t "input -> output white" n 2}
 w {40 {Lw.1/Lw.0}}
 addUserKnob {7 p l contrast R 0.8 2}
 p 1.3
 addUserKnob {7 ps l surround t "surround compensation: un-pivoted power function" R 0.8 1.2}
 ps 0.9
 addUserKnob {7 t0 l toe R 0 0.01}
 t0 0.003
 addUserKnob {78 s l scale n 2}
 s {{pow(g.1,1/p)/g.0} {(s.0*pow(w.0-g.0,2)*pow(g.0*s.0-pow(w.1,1/p),2))/pow(s.0*w.0-pow(w.1,1/p),2)}}
 addUserKnob {4 direction M {forward inverse}}
 addUserKnob {26 ""}
 addUserKnob {26 plot_label l " " T "desmos plot"}
}
 Input {
  inputs 0
  name Input
  xpos -40
  ypos -70
 }
set N72818800 [stack 0]
 Expression {
  expr0 w.1*pow(r/w.1,1/ps)
  expr1 w.1*pow(g/w.1,1/ps)
  expr2 w.1*pow(b/w.1,1/ps)
  name InvSurround
  note_font Helvetica
  xpos 70
  ypos 21
 }
 Expression {
  temp_name0 st
  temp_expr0 (w.1+t0)/w.1
  expr0 (r+sqrt(r*(4*st*t0+r)))/(2*st)
  expr1 (g+sqrt(g*(4*st*t0+g)))/(2*st)
  expr2 (b+sqrt(b*(4*st*t0+b)))/(2*st)
  name InvToe
  note_font Helvetica
  xpos 70
  ypos 51
 }
 Expression {
  temp_name0 h0
  temp_expr0 g.0-sqrt(s.1/s.0)
  temp_name1 h1
  temp_expr1 s.0*g.0+sqrt(s.0*s.1)
  expr0 r>g.1?h0-s.1/(pow(r,1/p)-h1):pow(r,1/p)/s.0
  expr1 g>g.1?h0-s.1/(pow(g,1/p)-h1):pow(g,1/p)/s.0
  expr2 b>g.1?h0-s.1/(pow(b,1/p)-h1):pow(b,1/p)/s.0
  name InvCompress
  note_font Helvetica
  xpos 70
  ypos 81
 }
push $N72818800
 Expression {
  temp_name0 h0
  temp_expr0 g.0-sqrt(s.1/s.0)
  temp_name1 h1
  temp_expr1 s.0*g.0+sqrt(s.0*s.1)
  expr0 r>g.0?pow(h1-s.1/(r-h0),p):pow(s.0*r,p)
  expr1 g>g.0?pow(h1-s.1/(g-h0),p):pow(s.0*g,p)
  expr2 b>g.0?pow(h1-s.1/(b-h0),p):pow(s.0*b,p)
  name Shoulder
  note_font Helvetica
  xpos -150
  ypos 21
 }
 Expression {
  temp_name0 st
  temp_expr0 (w.1+t0)/w.1
  expr0 (st*r*r)/(r+t0)
  expr1 (st*g*g)/(g+t0)
  expr2 (st*b*b)/(b+t0)
  name Toe
  note_font Helvetica
  xpos -150
  ypos 51
 }
 Expression {
  expr0 w.1*pow(r/w.1,ps)
  expr1 w.1*pow(g/w.1,ps)
  expr2 w.1*pow(b/w.1,ps)
  name Surround
  note_font Helvetica
  xpos -150
  ypos 81
 }
 Switch {
  inputs 2
  which {{parent.direction}}
  name SwitchDirection
  note_font Helvetica
  xpos -40
  ypos 141
 }
 Output {
  name Output
  xpos -40
  ypos 200
 }
end_group
StickyNote {
 inputs 0
 name StickyNote5
 tile_color 0x272727ff
 label "
\n2).  Choose a tonemap preset for your display device or customize the settings to make your own curve."
 note_font Helvetica
 note_font_size 8
 note_font_color 0xa8a8a8ff
 selected true
 xpos 403
 ypos 4270
}