-
Notifications
You must be signed in to change notification settings - Fork 20
/
Copy pathWhitepoint.nk
130 lines (130 loc) · 46.5 KB
/
Whitepoint.nk
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
set cut_paste_input [stack 0]
push $cut_paste_input
Group {
name Whitepoint
help "Uses chromatic adaptation to calculate a 3x3 matrix to convert from one whitepoint to another."
tile_color 0xf9eddaff
label "\[if \{\[value invert]\} \{return \"\[value dst_wp_name] to \[value src_wp_name]\"\} else \{return \"\[value src_wp_name] to \[value dst_wp_name]\"\}]"
addUserKnob {20 Whitepoint_tab l "Whitepoint"}
addUserKnob {26 choose_gamut_label l " " t "Input gamut must be known so that chromatic adaptation can be applied correctly in CIE XYZ colorspace." -STARTLINE T "Choose input gamut"}
addUserKnob {41 gamut l "" t "Input gamut must be known so that chromatic adaptation can be applied correctly in CIE XYZ colorspace." -STARTLINE T GamutToXYZ.gamut}
addUserKnob {26 ""}
addUserKnob {35 src_wp_presets l preset t "Source whitepoint" M {whitepoint/DCI-P3 "knobs this \{src_xy \{0.314 0.351\} src_wp_name \"DCI-P3\"\}; python -exec nuke.thisNode().knob('calculate_matrix').execute()" "whitepoint/D50 - 5003k - Horizon Light" "knobs this \{src_xy \{0.3457 0.3585\} src_wp_name \"D50\"\}; python -exec nuke.thisNode().knob('calculate_matrix').execute()" "whitepoint/ICC D50" "knobs this \{src_xy \{0.345702914918791 0.358538596679933\} src_wp_name \"ICC D50\"\}; python -exec nuke.thisNode().knob('calculate_matrix').execute()" "whitepoint/D55 - 5503k - Mid-morning / Mid-afternoon Daylight" "knobs this \{src_xy \{0.33243 0.34744\} src_wp_name \"D55\"\}; python -exec nuke.thisNode().knob('calculate_matrix').execute()" whitepoint/D60 "knobs this \{src_xy \{0.32162624 0.337737\} src_wp_name \"D60\"\}; python -exec nuke.thisNode().knob('calculate_matrix').execute()" whitepoint/ACES "knobs this \{src_xy \{0.32168 0.33767\} src_wp_name \"ACES\"\}; python -exec nuke.thisNode().knob('calculate_matrix').execute()" "whitepoint/D65 - 6504k - Noon Daylight: Television, sRGB color space" "knobs this \{src_xy \{0.3127 0.329\} src_wp_name \"D65\"\}; python -exec nuke.thisNode().knob('calculate_matrix').execute()" "whitepoint/D75 - 7504k - North sky Daylight" "knobs this \{src_xy \{0.29903 0.31488\} src_wp_name \"D75\"\}; python -exec nuke.thisNode().knob('calculate_matrix').execute()" "whitepoint/D93 - 9300k" "knobs this \{src_xy \{0.283 0.297\} src_wp_name \"D93\"\}; python -exec nuke.thisNode().knob('calculate_matrix').execute()" "whitepoint/A - 2856k - Incandescent / Tungsten" "knobs this \{src_xy \{0.44757 0.40745\} src_wp_name \"A\"\}; python -exec nuke.thisNode().knob('calculate_matrix').execute()" "whitepoint/B - 4874k - Direct sunlight at noon (deprecated)" "knobs this \{src_xy \{0.34842 0.35161\} src_wp_name \"B\"\}; python -exec nuke.thisNode().knob('calculate_matrix').execute()" "whitepoint/C - 6774k - Average / North sky Daylight (deprecated)" "knobs this \{src_xy \{0.31006 0.31616\} src_wp_name \"C\"\}; python -exec nuke.thisNode().knob('calculate_matrix').execute()" "whitepoint/E - 5454k - Equal energy" "knobs this \{src_xy \{0.333333333333 0.333333333333\} src_wp_name \"E\"\}; python -exec nuke.thisNode().knob('calculate_matrix').execute()" "whitepoint/FL1 - 6430k - Daylight Fluorescent" "knobs this \{src_xy \{0.3131 0.3371\} src_wp_name \"FL1\"\}; python -exec nuke.thisNode().knob('calculate_matrix').execute()" "whitepoint/FL2 - 4230k - Cool White Fluorescent" "knobs this \{src_xy \{0.3721 0.3751\} src_wp_name \"FL2\"\}; python -exec nuke.thisNode().knob('calculate_matrix').execute()" "whitepoint/FL3 - 3450k - White Fluorescent" "knobs this \{src_xy \{0.4091 0.3941\} src_wp_name \"FL3\"\}; python -exec nuke.thisNode().knob('calculate_matrix').execute()" "whitepoint/FL4 - 2940k - Warm White Fluorescent" "knobs this \{src_xy \{0.4402 0.4031\} src_wp_name \"FL4\"\}; python -exec nuke.thisNode().knob('calculate_matrix').execute()" "whitepoint/FL5 - 6350k - Daylight Fluorescent" "knobs this \{src_xy \{0.3138 0.3452\} src_wp_name \"FL5\"\}; python -exec nuke.thisNode().knob('calculate_matrix').execute()" "whitepoint/FL6 - 4150k - Lite White Fluorescent" "knobs this \{src_xy \{0.3779 0.3882\} src_wp_name \"FL6\"\}; python -exec nuke.thisNode().knob('calculate_matrix').execute()" "whitepoint/FL7 - 6500k - D65 simulator, Daylight simulator" "knobs this \{src_xy \{0.3129 0.3292\} src_wp_name \"FL7\"\}; python -exec nuke.thisNode().knob('calculate_matrix').execute()" "whitepoint/FL8 - 5000k - D50 simulator, Sylvania F40 Design 50" "knobs this \{src_xy \{0.3458 0.3586\} src_wp_name \"FL8\"\}; python -exec nuke.thisNode().knob('calculate_matrix').execute()" "whitepoint/FL9 - 4150k - Cool White Deluxe Fluorescent" "knobs this \{src_xy \{0.3741 0.3727\} src_wp_name \"FL9\"\}; python -exec nuke.thisNode().knob('calculate_matrix').execute()" "whitepoint/FL10 - 5000k - Philips TL85, Ultralume 50" "knobs this \{src_xy \{0.3458 0.3588\} src_wp_name \"FL10\"\}; python -exec nuke.thisNode().knob('calculate_matrix').execute()" "whitepoint/FL11 - 4000k - Philips TL84, Ultralume 40" "knobs this \{src_xy \{0.3805 0.3769\} src_wp_name \"FL11\"\}; python -exec nuke.thisNode().knob('calculate_matrix').execute()" "whitepoint/FL12 - 3000k - Philips TL83, Ultralume 30" "knobs this \{src_xy \{0.437 0.4042\} src_wp_name \"FL12\"\}; python -exec nuke.thisNode().knob('calculate_matrix').execute()" whitepoint/FL3.1 "knobs this \{src_xy \{0.4407 0.4033\} src_wp_name \"FL3.1\"\}; python -exec nuke.thisNode().knob('calculate_matrix').execute()" whitepoint/FL3.2 "knobs this \{src_xy \{0.3808 0.3734\} src_wp_name \"FL3.2\"\}; python -exec nuke.thisNode().knob('calculate_matrix').execute()" whitepoint/FL3.3 "knobs this \{src_xy \{0.3153 0.3439\} src_wp_name \"FL3.3\"\}; python -exec nuke.thisNode().knob('calculate_matrix').execute()" whitepoint/FL3.4 "knobs this \{src_xy \{0.4429 0.4043\} src_wp_name \"FL3.4\"\}; python -exec nuke.thisNode().knob('calculate_matrix').execute()" whitepoint/FL3.5 "knobs this \{src_xy \{0.3749 0.3672\} src_wp_name \"FL3.5\"\}; python -exec nuke.thisNode().knob('calculate_matrix').execute()" whitepoint/FL3.6 "knobs this \{src_xy \{0.3488 0.36\} src_wp_name \"FL3.6\"\}; python -exec nuke.thisNode().knob('calculate_matrix').execute()" whitepoint/FL3.7 "knobs this \{src_xy \{0.4384 0.4045\} src_wp_name \"FL3.7\"\}; python -exec nuke.thisNode().knob('calculate_matrix').execute()" whitepoint/FL3.8 "knobs this \{src_xy \{0.382 0.3832\} src_wp_name \"FL3.8\"\}; python -exec nuke.thisNode().knob('calculate_matrix').execute()" whitepoint/FL3.9 "knobs this \{src_xy \{0.3499 0.3591\} src_wp_name \"FL3.9\"\}; python -exec nuke.thisNode().knob('calculate_matrix').execute()" whitepoint/FL3.10 "knobs this \{src_xy \{0.3455 0.356\} src_wp_name \"FL3.10\"\}; python -exec nuke.thisNode().knob('calculate_matrix').execute()" whitepoint/FL3.11 "knobs this \{src_xy \{0.3245 0.3434\} src_wp_name \"FL3.11\"\}; python -exec nuke.thisNode().knob('calculate_matrix').execute()" whitepoint/FL3.12 "knobs this \{src_xy \{0.4377 0.4037\} src_wp_name \"FL3.12\"\}; python -exec nuke.thisNode().knob('calculate_matrix').execute()" whitepoint/FL3.13 "knobs this \{src_xy \{0.383 0.3724\} src_wp_name \"FL3.13\"\}; python -exec nuke.thisNode().knob('calculate_matrix').execute()" whitepoint/FL3.14 "knobs this \{src_xy \{0.3447 0.3609\} src_wp_name \"FL3.14\"\}; python -exec nuke.thisNode().knob('calculate_matrix').execute()" whitepoint/FL3.15 "knobs this \{src_xy \{0.3127 0.3288\} src_wp_name \"FL3.15\"\}; python -exec nuke.thisNode().knob('calculate_matrix').execute()" "whitepoint/HP1 - standard high pressure sodium lamp" "knobs this \{src_xy \{0.533 0.415\} src_wp_name \"HP1\"\}; python -exec nuke.thisNode().knob('calculate_matrix').execute()" "whitepoint/HP2 - colour enhanced high pressure sodium lamp" "knobs this \{src_xy \{0.4778 0.4158\} src_wp_name \"HP2\"\}; python -exec nuke.thisNode().knob('calculate_matrix').execute()" "whitepoint/HP3 - high pressure metal halide lamp" "knobs this \{src_xy \{0.4302 0.4075\} src_wp_name \"HP3\"\}; python -exec nuke.thisNode().knob('calculate_matrix').execute()" "whitepoint/HP4 - high pressure metal halide lamp" "knobs this \{src_xy \{0.3812 0.3797\} src_wp_name \"HP4\"\}; python -exec nuke.thisNode().knob('calculate_matrix').execute()" "whitepoint/HP5 - high pressure metal halide lamp" "knobs this \{src_xy \{0.3776 0.3713\} src_wp_name \"HP5\"\}; python -exec nuke.thisNode().knob('calculate_matrix').execute()" "whitepoint/LED-B1 - 2733k - phosphor-converted blue" "knobs this \{src_xy \{0.45600 0.40780\} src_wp_name \"LED-B1\"\}; python -exec nuke.thisNode().knob('calculate_matrix').execute()" "whitepoint/LED-B2 - 2998k - phosphor-converted blue" "knobs this \{src_xy \{0.43570 0.40120\} src_wp_name \"LED-B2\"\}; python -exec nuke.thisNode().knob('calculate_matrix').execute()" "whitepoint/LED-B3 - 4103k - phosphor-converted blue" "knobs this \{src_xy \{0.37560 0.37230\} src_wp_name \"LED-B3\"\}; python -exec nuke.thisNode().knob('calculate_matrix').execute()" "whitepoint/LED-B4 - 5109k - phosphor-converted blue" "knobs this \{src_xy \{0.34220 0.35020\} src_wp_name \"LED-B4\"\}; python -exec nuke.thisNode().knob('calculate_matrix').execute()" "whitepoint/LED-B5 - 6598k - phosphor-converted blue" "knobs this \{src_xy \{0.31180 0.32360\} src_wp_name \"LED-B5\"\}; python -exec nuke.thisNode().knob('calculate_matrix').execute()" "whitepoint/LED-BH1 - 2851k - mixing of phosphor-converted blue LED and red LED (blue-hybrid)" "knobs this \{src_xy \{0.44740 0.40660\} src_wp_name \"LED-BH1\"\}; python -exec nuke.thisNode().knob('calculate_matrix').execute()" "whitepoint/LED-RGB1 - 2840k - mixing of red, green, and blue LEDs" "knobs this \{src_xy \{0.45570 0.42110\} src_wp_name \"LED-RGB1\"\}; python -exec nuke.thisNode().knob('calculate_matrix').execute()" "whitepoint/LED-V1 - 2724k - phosphor-converted violet" "knobs this \{src_xy \{0.45600 0.45480\} src_wp_name \"LED-V1\"\}; python -exec nuke.thisNode().knob('calculate_matrix').execute()" "whitepoint/LED-V2 - 4070k - phosphor-converted violet" "knobs this \{src_xy \{0.37810 0.37750\} src_wp_name \"LED-V2\"\}; python -exec nuke.thisNode().knob('calculate_matrix').execute()"}}
addUserKnob {35 dst_wp_presets l " preset" t "Destination Whitepoint" -STARTLINE M {whitepoint/DCI-P3 "knobs this \{dst_xy \{0.314 0.351\} dst_wp_name \"DCI-P3\"\}; python -exec nuke.thisNode().knob('calculate_matrix').execute()" "whitepoint/D50 - 5003k - Horizon Light" "knobs this \{dst_xy \{0.3457 0.3585\} dst_wp_name \"D50\"\}; python -exec nuke.thisNode().knob('calculate_matrix').execute()" "whitepoint/ICC D50" "knobs this \{dst_xy \{0.345702914918791 0.358538596679933\} dst_wp_name \"ICC D50\"\}; python -exec nuke.thisNode().knob('calculate_matrix').execute()" "whitepoint/D55 - 5503k - Mid-morning / Mid-afternoon Daylight" "knobs this \{dst_xy \{0.33243 0.34744\} dst_wp_name \"D55\"\}; python -exec nuke.thisNode().knob('calculate_matrix').execute()" whitepoint/D60 "knobs this \{dst_xy \{0.32162624 0.337737\} dst_wp_name \"D60\"\}; python -exec nuke.thisNode().knob('calculate_matrix').execute()" whitepoint/ACES "knobs this \{dst_xy \{0.32168 0.33767\} dst_wp_name \"ACES\"\}; python -exec nuke.thisNode().knob('calculate_matrix').execute()" "whitepoint/D65 - 6504k - Noon Daylight: Television, sRGB color space" "knobs this \{dst_xy \{0.3127 0.329\} dst_wp_name \"D65\"\}; python -exec nuke.thisNode().knob('calculate_matrix').execute()" "whitepoint/D75 - 7504k - North sky Daylight" "knobs this \{dst_xy \{0.29903 0.31488\} dst_wp_name \"D75\"\}; python -exec nuke.thisNode().knob('calculate_matrix').execute()" "whitepoint/D93 - 9300k" "knobs this \{dst_xy \{0.283 0.297\} dst_wp_name \"D93\"\}; python -exec nuke.thisNode().knob('calculate_matrix').execute()" "whitepoint/A - 2856k - Incandescent / Tungsten" "knobs this \{dst_xy \{0.44757 0.40745\} dst_wp_name \"A\"\}; python -exec nuke.thisNode().knob('calculate_matrix').execute()" "whitepoint/B - 4874k - Direct sunlight at noon (deprecated)" "knobs this \{dst_xy \{0.34842 0.35161\} dst_wp_name \"B\"\}; python -exec nuke.thisNode().knob('calculate_matrix').execute()" "whitepoint/C - 6774k - Average / North sky Daylight (deprecated)" "knobs this \{dst_xy \{0.31006 0.31616\} dst_wp_name \"C\"\}; python -exec nuke.thisNode().knob('calculate_matrix').execute()" "whitepoint/E - 5454k - Equal energy" "knobs this \{dst_xy \{0.333333333333 0.333333333333\} dst_wp_name \"E\"\}; python -exec nuke.thisNode().knob('calculate_matrix').execute()" "whitepoint/FL1 - 6430k - Daylight Fluorescent" "knobs this \{dst_xy \{0.3131 0.3371\} dst_wp_name \"FL1\"\}; python -exec nuke.thisNode().knob('calculate_matrix').execute()" "whitepoint/FL2 - 4230k - Cool White Fluorescent" "knobs this \{dst_xy \{0.3721 0.3751\} dst_wp_name \"FL2\"\}; python -exec nuke.thisNode().knob('calculate_matrix').execute()" "whitepoint/FL3 - 3450k - White Fluorescent" "knobs this \{dst_xy \{0.4091 0.3941\} dst_wp_name \"FL3\"\}; python -exec nuke.thisNode().knob('calculate_matrix').execute()" "whitepoint/FL4 - 2940k - Warm White Fluorescent" "knobs this \{dst_xy \{0.4402 0.4031\} dst_wp_name \"FL4\"\}; python -exec nuke.thisNode().knob('calculate_matrix').execute()" "whitepoint/FL5 - 6350k - Daylight Fluorescent" "knobs this \{dst_xy \{0.3138 0.3452\} dst_wp_name \"FL5\"\}; python -exec nuke.thisNode().knob('calculate_matrix').execute()" "whitepoint/FL6 - 4150k - Lite White Fluorescent" "knobs this \{dst_xy \{0.3779 0.3882\} dst_wp_name \"FL6\"\}; python -exec nuke.thisNode().knob('calculate_matrix').execute()" "whitepoint/FL7 - 6500k - D65 simulator, Daylight simulator" "knobs this \{dst_xy \{0.3129 0.3292\} dst_wp_name \"FL7\"\}; python -exec nuke.thisNode().knob('calculate_matrix').execute()" "whitepoint/FL8 - 5000k - D50 simulator, Sylvania F40 Design 50" "knobs this \{dst_xy \{0.3458 0.3586\} dst_wp_name \"FL8\"\}; python -exec nuke.thisNode().knob('calculate_matrix').execute()" "whitepoint/FL9 - 4150k - Cool White Deluxe Fluorescent" "knobs this \{dst_xy \{0.3741 0.3727\} dst_wp_name \"FL9\"\}; python -exec nuke.thisNode().knob('calculate_matrix').execute()" "whitepoint/FL10 - 5000k - Philips TL85, Ultralume 50" "knobs this \{dst_xy \{0.3458 0.3588\} dst_wp_name \"FL10\"\}; python -exec nuke.thisNode().knob('calculate_matrix').execute()" "whitepoint/FL11 - 4000k - Philips TL84, Ultralume 40" "knobs this \{dst_xy \{0.3805 0.3769\} dst_wp_name \"FL11\"\}; python -exec nuke.thisNode().knob('calculate_matrix').execute()" "whitepoint/FL12 - 3000k - Philips TL83, Ultralume 30" "knobs this \{dst_xy \{0.437 0.4042\} dst_wp_name \"FL12\"\}; python -exec nuke.thisNode().knob('calculate_matrix').execute()" whitepoint/FL3.1 "knobs this \{dst_xy \{0.4407 0.4033\} dst_wp_name \"FL3.1\"\}; python -exec nuke.thisNode().knob('calculate_matrix').execute()" whitepoint/FL3.2 "knobs this \{dst_xy \{0.3808 0.3734\} dst_wp_name \"FL3.2\"\}; python -exec nuke.thisNode().knob('calculate_matrix').execute()" whitepoint/FL3.3 "knobs this \{dst_xy \{0.3153 0.3439\} dst_wp_name \"FL3.3\"\}; python -exec nuke.thisNode().knob('calculate_matrix').execute()" whitepoint/FL3.4 "knobs this \{dst_xy \{0.4429 0.4043\} dst_wp_name \"FL3.4\"\}; python -exec nuke.thisNode().knob('calculate_matrix').execute()" whitepoint/FL3.5 "knobs this \{dst_xy \{0.3749 0.3672\} dst_wp_name \"FL3.5\"\}; python -exec nuke.thisNode().knob('calculate_matrix').execute()" whitepoint/FL3.6 "knobs this \{dst_xy \{0.3488 0.36\} dst_wp_name \"FL3.6\"\}; python -exec nuke.thisNode().knob('calculate_matrix').execute()" whitepoint/FL3.7 "knobs this \{dst_xy \{0.4384 0.4045\} dst_wp_name \"FL3.7\"\}; python -exec nuke.thisNode().knob('calculate_matrix').execute()" whitepoint/FL3.8 "knobs this \{dst_xy \{0.382 0.3832\} dst_wp_name \"FL3.8\"\}; python -exec nuke.thisNode().knob('calculate_matrix').execute()" whitepoint/FL3.9 "knobs this \{dst_xy \{0.3499 0.3591\} dst_wp_name \"FL3.9\"\}; python -exec nuke.thisNode().knob('calculate_matrix').execute()" whitepoint/FL3.10 "knobs this \{dst_xy \{0.3455 0.356\} dst_wp_name \"FL3.10\"\}; python -exec nuke.thisNode().knob('calculate_matrix').execute()" whitepoint/FL3.11 "knobs this \{dst_xy \{0.3245 0.3434\} dst_wp_name \"FL3.11\"\}; python -exec nuke.thisNode().knob('calculate_matrix').execute()" whitepoint/FL3.12 "knobs this \{dst_xy \{0.4377 0.4037\} dst_wp_name \"FL3.12\"\}; python -exec nuke.thisNode().knob('calculate_matrix').execute()" whitepoint/FL3.13 "knobs this \{dst_xy \{0.383 0.3724\} dst_wp_name \"FL3.13\"\}; python -exec nuke.thisNode().knob('calculate_matrix').execute()" whitepoint/FL3.14 "knobs this \{dst_xy \{0.3447 0.3609\} dst_wp_name \"FL3.14\"\}; python -exec nuke.thisNode().knob('calculate_matrix').execute()" whitepoint/FL3.15 "knobs this \{dst_xy \{0.3127 0.3288\} dst_wp_name \"FL3.15\"\}; python -exec nuke.thisNode().knob('calculate_matrix').execute()" "whitepoint/HP1 - standard high pressure sodium lamp" "knobs this \{dst_xy \{0.533 0.415\} dst_wp_name \"HP1\"\}; python -exec nuke.thisNode().knob('calculate_matrix').execute()" "whitepoint/HP2 - colour enhanced high pressure sodium lamp" "knobs this \{dst_xy \{0.4778 0.4158\} dst_wp_name \"HP2\"\}; python -exec nuke.thisNode().knob('calculate_matrix').execute()" "whitepoint/HP3 - high pressure metal halide lamp" "knobs this \{dst_xy \{0.4302 0.4075\} dst_wp_name \"HP3\"\}; python -exec nuke.thisNode().knob('calculate_matrix').execute()" "whitepoint/HP4 - high pressure metal halide lamp" "knobs this \{dst_xy \{0.3812 0.3797\} dst_wp_name \"HP4\"\}; python -exec nuke.thisNode().knob('calculate_matrix').execute()" "whitepoint/HP5 - high pressure metal halide lamp" "knobs this \{dst_xy \{0.3776 0.3713\} dst_wp_name \"HP5\"\}; python -exec nuke.thisNode().knob('calculate_matrix').execute()" "whitepoint/LED-B1 - 2733k - phosphor-converted blue" "knobs this \{dst_xy \{0.45600 0.40780\} dst_wp_name \"LED-B1\"\}; python -exec nuke.thisNode().knob('calculate_matrix').execute()" "whitepoint/LED-B2 - 2998k - phosphor-converted blue" "knobs this \{dst_xy \{0.43570 0.40120\} dst_wp_name \"LED-B2\"\}; python -exec nuke.thisNode().knob('calculate_matrix').execute()" "whitepoint/LED-B3 - 4103k - phosphor-converted blue" "knobs this \{dst_xy \{0.37560 0.37230\} dst_wp_name \"LED-B3\"\}; python -exec nuke.thisNode().knob('calculate_matrix').execute()" "whitepoint/LED-B4 - 5109k - phosphor-converted blue" "knobs this \{dst_xy \{0.34220 0.35020\} dst_wp_name \"LED-B4\"\}; python -exec nuke.thisNode().knob('calculate_matrix').execute()" "whitepoint/LED-B5 - 6598k - phosphor-converted blue" "knobs this \{dst_xy \{0.31180 0.32360\} dst_wp_name \"LED-B5\"\}; python -exec nuke.thisNode().knob('calculate_matrix').execute()" "whitepoint/LED-BH1 - 2851k - mixing of phosphor-converted blue LED and red LED (blue-hybrid)" "knobs this \{dst_xy \{0.44740 0.40660\} dst_wp_name \"LED-BH1\"\}; python -exec nuke.thisNode().knob('calculate_matrix').execute()" "whitepoint/LED-RGB1 - 2840k - mixing of red, green, and blue LEDs" "knobs this \{dst_xy \{0.45570 0.42110\} dst_wp_name \"LED-RGB1\"\}; python -exec nuke.thisNode().knob('calculate_matrix').execute()" "whitepoint/LED-V1 - 2724k - phosphor-converted violet" "knobs this \{dst_xy \{0.45600 0.45480\} dst_wp_name \"LED-V1\"\}; python -exec nuke.thisNode().knob('calculate_matrix').execute()" "whitepoint/LED-V2 - 4070k - phosphor-converted violet" "knobs this \{dst_xy \{0.37810 0.37750\} dst_wp_name \"LED-V2\"\}; python -exec nuke.thisNode().knob('calculate_matrix').execute()"}}
addUserKnob {26 colorspace_chromaticities_label l " " T "<b>SRC Whitepoint DST Whitepoint</b>"}
addUserKnob {12 src_xy l " " t "Whitepoint xy chromaticity coordinates in CIE 1931 colorspace."}
addUserKnob {12 dst_xy l "" t "Destination whitepoint" -STARTLINE}
addUserKnob {1 src_wp_name l src +DISABLED}
addUserKnob {1 dst_wp_name l dst -STARTLINE +DISABLED}
addUserKnob {26 sample_label l " " T "<b>Sample Input Pixels"}
addUserKnob {22 calculate_sample l Sample t "Sample average color in selected area of the viewer as a chromaticity coordinate, and populate the src whitepoint. \n\nMake sure to set the color gamut of the input pixels before sampling." -STARTLINE T "node = nuke.thisNode()\nnuke.root().begin()\n\n# Get viewer and connected node to calculate format resolution\nviewer = nuke.activeViewer().node()\nif viewer.input(0):\n viewed_node = viewer.input(0)\n if not nuke.selectedNodes():\n viewed_node.setSelected(1)\nelse:\n viewed_node = nuke.activeViewer().node()\n\n# Get selected sample area\nbboxinfo = nuke.activeViewer().node()\['colour_sample_bbox'].value()\naspect = float(viewed_node.width() * viewed_node.pixelAspect()) / float(viewed_node.height())\ncornerA = \[(bboxinfo\[0]*0.5+0.5) * viewed_node.width(), (((bboxinfo\[1] * 0.5) + (0.5/aspect)) * aspect) * viewed_node.height()]\ncornerB = \[(bboxinfo\[2]*0.5+0.5) * viewed_node.width(), (((bboxinfo\[3] * 0.5) + (0.5/aspect)) * aspect) * viewed_node.height()]\narea = \[cornerB\[0] - cornerA\[0], cornerB\[1] - cornerA\[1]]\ncenter = \[cornerA\[0] + (area\[0]/2), cornerA\[1] + (area\[1] / 2)]\n\n# Sample input colors within box\nnode.begin()\nYxy = nuke.toNode('Yxy')\ncolor_sample = \[Yxy.sample('rgba.green', center\[0], center\[1], area\[0], area\[1]), Yxy.sample('rgba.blue', center\[0], center\[1], area\[0], area\[1])]\n\n# Set white to sampled xy value\nnode\['src_xy'].setValue(color_sample)\nnode\['src_wp_name'].setValue('sampled')\nnuke.root().begin()"}
addUserKnob {26 ""}
addUserKnob {26 blackbody_label l " " T "<b>Color Temperature"}
addUserKnob {7 temp t "Color temperature in Kelvin" R 1500 9300}
temp 5500
addUserKnob {22 calculate_blackbody l Calculate t "Calculate the xy chromaticity coordinates of the specified blackbody color tempurature." T "import nuke\nimport math\n\nfloat3 = nuke.math.Vector3\n\n\n# 360nm to 830nm in 5nm increments \nCIE1931StdObs_x = \[\n 0.000129900000, 0.000232100000, 0.000414900000, 0.000741600000, 0.001368000000, 0.002236000000,\n 0.004243000000, 0.007650000000, 0.014310000000, 0.023190000000, 0.043510000000, 0.077630000000, 0.134380000000, 0.214770000000, 0.283900000000, 0.328500000000,\n 0.348280000000, 0.348060000000, 0.336200000000, 0.318700000000, 0.290800000000, 0.251100000000, 0.195360000000, 0.142100000000, 0.095640000000, 0.057950010000,\n 0.032010000000, 0.014700000000, 0.004900000000, 0.002400000000, 0.009300000000, 0.029100000000, 0.063270000000, 0.109600000000, 0.165500000000, 0.225749900000,\n 0.290400000000, 0.359700000000, 0.433449900000, 0.512050100000, 0.594500000000, 0.678400000000, 0.762100000000, 0.842500000000, 0.916300000000, 0.978600000000,\n 1.026300000000, 1.056700000000, 1.062200000000, 1.045600000000, 1.002600000000, 0.938400000000, 0.854449900000, 0.751400000000, 0.642400000000, 0.541900000000,\n 0.447900000000, 0.360800000000, 0.283500000000, 0.218700000000, 0.164900000000, 0.121200000000, 0.087400000000, 0.063600000000, 0.046770000000, 0.032900000000,\n 0.022700000000, 0.015840000000, 0.011359160000, 0.008110916000, 0.005790346000, 0.004109457000, 0.002899327000, 0.002049190000, 0.001439971000, 0.000999949300,\n 0.000690078600, 0.000476021300, 0.000332301100, 0.000234826100, 0.000166150500, 0.000117413000, 0.000083075270, 0.000058706520, 0.000041509940, 0.000029353260,\n 0.000020673830, 0.000014559770, 0.000010253980, 0.000007221456, 0.000005085868, 0.000003581652, 0.000002522525, 0.000001776509, 0.000001251141]\nCIE1931StdObs_y = \[\n 0.000003917000, 0.000006965000, 0.000012390000, 0.000022020000, 0.000039000000, 0.000064000000,\n 0.000120000000, 0.000217000000, 0.000396000000, 0.000640000000, 0.001210000000, 0.002180000000, 0.004000000000, 0.007300000000, 0.011600000000, 0.016840000000,\n 0.023000000000, 0.029800000000, 0.038000000000, 0.048000000000, 0.060000000000, 0.073900000000, 0.090980000000, 0.112600000000, 0.139020000000, 0.169300000000,\n 0.208020000000, 0.258600000000, 0.323000000000, 0.407300000000, 0.503000000000, 0.608200000000, 0.710000000000, 0.793200000000, 0.862000000000, 0.914850100000,\n 0.954000000000, 0.980300000000, 0.994950100000, 1.000000000000, 0.995000000000, 0.978600000000, 0.952000000000, 0.915400000000, 0.870000000000, 0.816300000000,\n 0.757000000000, 0.694900000000, 0.631000000000, 0.566800000000, 0.503000000000, 0.441200000000, 0.381000000000, 0.321000000000, 0.265000000000, 0.217000000000,\n 0.175000000000, 0.138200000000, 0.107000000000, 0.081600000000, 0.061000000000, 0.044580000000, 0.032000000000, 0.023200000000, 0.017000000000, 0.011920000000,\n 0.008210000000, 0.005723000000, 0.004102000000, 0.002929000000, 0.002091000000, 0.001484000000, 0.001047000000, 0.000740000000, 0.000520000000, 0.000361100000,\n 0.000249200000, 0.000171900000, 0.000120000000, 0.000084800000, 0.000060000000, 0.000042400000, 0.000030000000, 0.000021200000, 0.000014990000, 0.000010600000,\n 0.000007465700, 0.000005257800, 0.000003702900, 0.000002607800, 0.000001836600, 0.000001293400, 0.000000910930, 0.000000641530, 0.000000451810]\nCIE1931StdObs_z = \[\n 0.000606100000, 0.001086000000, 0.001946000000, 0.003486000000, 0.006450001000, 0.010549990000,\n 0.020050010000, 0.036210000000, 0.067850010000, 0.110200000000, 0.207400000000, 0.371300000000, 0.645600000000, 1.039050100000, 1.385600000000, 1.622960000000,\n 1.747060000000, 1.782600000000, 1.772110000000, 1.744100000000, 1.669200000000, 1.528100000000, 1.287640000000, 1.041900000000, 0.812950100000, 0.616200000000,\n 0.465180000000, 0.353300000000, 0.272000000000, 0.212300000000, 0.158200000000, 0.111700000000, 0.078249990000, 0.057250010000, 0.042160000000, 0.029840000000,\n 0.020300000000, 0.013400000000, 0.008749999000, 0.005749999000, 0.003900000000, 0.002749999000, 0.002100000000, 0.001800000000, 0.001650001000, 0.001400000000,\n 0.001100000000, 0.001000000000, 0.000800000000, 0.000600000000, 0.000340000000, 0.000240000000, 0.000190000000, 0.000100000000, 0.000049999990, 0.000030000000,\n 0.000020000000, 0.000010000000, 0.000000000000, 0.000000000000, 0.000000000000, 0.000000000000, 0.000000000000, 0.000000000000, 0.000000000000, 0.000000000000,\n 0.000000000000, 0.000000000000, 0.000000000000, 0.000000000000, 0.000000000000, 0.000000000000, 0.000000000000, 0.000000000000, 0.000000000000, 0.000000000000,\n 0.000000000000, 0.000000000000, 0.000000000000, 0.000000000000, 0.000000000000, 0.000000000000, 0.000000000000, 0.000000000000, 0.000000000000, 0.000000000000,\n 0.000000000000, 0.000000000000, 0.000000000000, 0.000000000000, 0.000000000000, 0.000000000000, 0.000000000000, 0.000000000000, 0.000000000000]\n \n \n \ndef XYZ_2_xyY(XYZ):\n xyY = float3()\n divisor = (XYZ\[0] + XYZ\[1] + XYZ\[2])\n if (divisor == 0.):\n divisor = 1e-10\n xyY.set(XYZ\[0] / divisor, XYZ\[1] / divisor, XYZ\[1])\n return xyY\n\n \n\ndef calculate_whitepoint(temp):\n # Calculate xy chromaticity coordinates from blackbody spectral locus color temperature\n # Returns xy chromaticity coordinates\n # Inspired by: http://www.brucelindbloom.com/index.html?CIESpectralCalculator.html\n # source: http://brucelindbloom.com/javascript/ColorConv.js\n\n C1 = 2.0 * math.pi * 6.626176 * 2.99792458 * 2.99792458\n C2 = (6.626176 * 2.99792458) / 1.380662\n\n XYZ = float3()\n XYZ.set(0.0, 0.0, 0.0)\n\n i = 0\n for nm in xrange(360, 831, 5):\n dWavelengthM = nm * 1.0e-3\n dWavelengthM5 = dWavelengthM * dWavelengthM * dWavelengthM * dWavelengthM * dWavelengthM\n blackbody = C1 / (dWavelengthM5 * 1.0e-12 * (math.pow(math.e, C2 / (temp * dWavelengthM * 1.0e-3)) - 1.0))\n XYZ\[0] += (blackbody * CIE1931StdObs_x\[i]);\n XYZ\[1] += (blackbody * CIE1931StdObs_y\[i]);\n XYZ\[2] += (blackbody * CIE1931StdObs_z\[i]);\n i += 1\n\n XYZ\[0] /= XYZ\[1]\n XYZ\[2] /= XYZ\[1]\n XYZ\[1] = 1.0\n\n return XYZ_2_xyY(XYZ)\n\n\n\ndef start():\n node = nuke.thisNode()\n temp = node\['temp'].getValue()\n xyY = calculate_whitepoint(temp)\n wp_target = node\['wp_target'].value()\n wp_knob = node\[wp_target + '_xy'].setValue(\[xyY\[0], xyY\[1]])\n wp_label = node\[wp_target + '_wp_name'].setValue(str(int(temp)) + 'k')\n node\['calculate_matrix'].execute()\n \n\nif __name__=='__main__':\n start()" +STARTLINE}
addUserKnob {4 wp_target l target t "choose whether to calculate the src or dst whitepoint" -STARTLINE M {src dst "" ""}}
wp_target dst
addUserKnob {26 ""}
addUserKnob {26 calculate_label l " " T <b>Calculate}
addUserKnob {4 method t "Choose the cone response matrix" M {cat02 bradford cmccat2000 xyz_scaling none "" fairchild bianco cat02_brill_cat bianco_pc cmccat97 sharp von_kries}}
method cat02
addUserKnob {6 invert t "Invert direction of matrix: XYZtoRGB" +STARTLINE}
addUserKnob {22 calculate_matrix l "Calculate Matrix" t "Calculate 3x3 matrix based on the specified colorspace chromaticities." T "import nuke\nfloat2 = nuke.math.Vector2\nfloat3 = nuke.math.Vector3\nfloat3x3 = nuke.math.Matrix3\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\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 return cat_mtx\n\n\ndef start():\n node = nuke.thisNode()\n \n invert = node\['invert'].getValue()\n cat_method = node\['method'].value()\n src_xy = float2(node\['src_xy'].getValue()\[0], node\['src_xy'].getValue()\[1])\n dst_xy = (node\['dst_xy'].getValue()\[0], node\['dst_xy'].getValue()\[1])\n\n mtx = calc_cat(src_xy, dst_xy, cat_method)\n\n if invert:\n mtx = mtx.inverse()\n\n node\['matrix'].setValue(mtx)\n\n\nif __name__=='__main__':\n start()\n\n\n\n\n\n\n# References for different xyY whitepoints of different Standard Illuminants\n# http://brucelindbloom.com/index.html?Eqn_ChromAdapt.html\n# https://www.mathworks.com/help/images/ref/whitepoint.html\n# https://rdrr.io/cran/spacesXYZ/man/standardXYZ.html\n# https://en.wikipedia.org/wiki/Standard_illuminant\n\n# XYZ \n# A 1.09850 1.00000 0.35585 Simulates typical, domestic, tungsten-filament lighting with correlated color temperature of 2856 K. \n# B 0.99072 1.00000 0.85223 Simulates average or north sky daylight with correlated color temperature of 6774 K. Deprecated by CIE.\n# C 0.98074 1.00000 1.18232 Useful as a theoretical reference.\n# D50 0.96422 1.00000 0.82521 Simulates warm daylight at sunrise or sunset with correlated color temperature of 5003 K. Also known as horizon light.\n# D55 0.95682 1.00000 0.92149 Simulates mid-morning or mid-afternoon daylight with correlated color temperature of 5500 K. \n# D60 0.95230 1.00000 1.00859 \n# D65 0.95047 1.00000 1.08883 Simulates noon daylight with correlated color temperature of 6504 K. \n# D75 0.94972 1.00000 1.22638\n# E 1.00000 1.00000 1.00000\n# F2 0.99186 1.00000 0.67393\n# F7 0.95041 1.00000 1.08747\n# F11 1.00962 1.00000 0.64350\n\n\n# xy\n# name CIE 1931 2deg kelvin (cct)\n# A 0.44757 0.40745 2856 Incandescent / Tungsten\n# B 0.34842 0.35161 4874 \{obsolete\} Direct sunlight at noon\n# C 0.31006 0.31616 6774 \{obsolete\} Average / North sky Daylight\n# D50 0.34567 0.35850 5003 Horizon Light. ICC profile PCS\n# D55 0.33242 0.34743 5503 Mid-morning / Mid-afternoon Daylight\n# D60 0.32163 0.33774\n# D60.ACES 0.32168 0.33767\n# D65 0.31271 0.32902 6504 Noon Daylight: Television, sRGB color space\n# D75 0.29902 0.31485 7504 North sky Daylight\n# E 1/3 1/3 1/3 1/3 5454 Equal energy\n# F1 0.31310 0.33727 6430 Daylight Fluorescent\n# F2 0.37208 0.37529 4230 Cool White Fluorescent\n# F3 0.40910 0.39430 3450 White Fluorescent\n# F4 0.44018 0.40329 2940 Warm White Fluorescent\n# F5 0.31379 0.34531 6350 Daylight Fluorescent\n# F6 0.37790 0.38835 4150 Lite White Fluorescent\n# F7 0.31292 0.32933 6500 D65 simulator, Daylight simulator\n# F8 0.34588 0.35875 5000 D50 simulator, Sylvania F40 Design 50\n# F9 0.37417 0.37281 4150 Cool White Deluxe Fluorescent\n# F10 0.34609 0.35986 5000 Philips TL85, Ultralume 50\n# F11 0.38052 0.37713 4000 Philips TL84, Ultralume 40\n# F12 0.43695 0.40441 3000 Philips TL83, Ultralume 30\n# LED-B1 0.4560 0.4078 2733 phosphor-converted blue\n# LED-B2 0.4357 0.4012 2998 phosphor-converted blue\n# LED-B3 0.3756 0.3723 4103 phosphor-converted blue\n# LED-B4 0.3422 0.3502 5109 phosphor-converted blue\n# LED-B5 0.3118 0.3236 6598 phosphor-converted blue\n# LED-BH1 0.4474 0.4066 2851 mixing of phosphor-converted blue LED and red LED (blue-hybrid)\n# LED-RGB1 0.4557 0.4211 2840 mixing of red, green, and blue LEDs\n# LED-V1 0.4560 0.4548 2724 phosphor-converted violet\n# LED-V2 0.3781 0.3775 4070 phosphor-converted violet" +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())\nm\['label'].setValue('\{0\} to \{1\}'.format(node\['src_wp_name'].getValue(), node\['dst_wp_name'].getValue()))"}
addUserKnob {41 matrix T CAT_MATRIX.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}
}
Input {
inputs 0
name Input
xpos -40
ypos 192
}
Group {
name GamutToXYZ
label "\[if \{\[value invert]\} \{return \"XYZ to \[value gamut]\"\} else \{return \"\[value gamut] to XYZ\"\}]\n\n"
xpos -40
ypos 245
addUserKnob {20 GamutToXYZ_tab l GamutToXYZ}
addUserKnob {4 gamut t "Choose gamut" M {XYZ ACES ACEScg "Filmlight E-Gamut" Rec709 Rec2020 P3D60 P3D65 P3DCI "Arri AlexaWideGamut" REDDRAGONcolor REDDRAGONcolor2 REDcolor REDcolor2 REDcolor3 REDcolor4 REDWideGamutRGB "GoPro Protune Native" CanonCinemaGamut SonySGamut SonySGamut3Cine PanasonicVGamut "DJI D-Gamut" "Fujifilm F-Gamut" BMDFilmV1 BMD4kFilmV1 BMD4kFilmV3 BMD46kFilmV1 BMD46kFilmV3 BMDWideGamutV4 "AdobeRGB\t" AdobeWideGamutRGB ROMM RIMM ERIMM ProPhotoRGB RusselRGB SharpRGB AppleRGB BestRGB}}
gamut ACEScg
addUserKnob {6 invert +STARTLINE}
addUserKnob {26 ""}
addUserKnob {26 chromaticity_coordinates_label l " " T "<b>Chromaticity Coordinates</b>"}
addUserKnob {41 rxy T ColorMatrix.rxy}
addUserKnob {41 gxy T ColorMatrix.gxy}
addUserKnob {41 bxy T ColorMatrix.bxy}
addUserKnob {41 wxy T ColorMatrix.wxy}
addUserKnob {41 matrix T ColorMatrix.matrix}
}
Input {
inputs 0
name Input
xpos -40
ypos -10
}
ColorMatrix {
matrix {
{{curve(which) 1 0.9525524378 0.6624541879 0.7053968906 0.4123907983 0.6369580626 0.5049495697 0.4865709841 0.4451698363 0.6380076408 0.5070186853 0.4462202489 0.4300414324 0.4581649601 0.4878340662 0.4517004192 0.7352752686 0.5022571683 0.7160496712 0.7064827085 0.5990839601 0.6796444654 0.6481720209 0.6369580626 0.6390493512 0.6141571999 0.3724023998 0.60689044 0.4017650783 0.6065810919 0.5766690373 0.7165006995 0.797760427 0.797760427 0.797760427 0.7976718545 0.7015837431 0.8156226277 0.4496616423 0.6318944097} {curve(which) 0 0 0.1340042055 0.1640413404 0.3575843275 0.1446169019 0.2646814585 0.2656676769 0.2771343887 0.2147038579 0.3587769568 0.3157556653 0.3700728714 0.3832037449 0.3432727158 0.3178463876 0.06860940903 0.2929667532 0.1296834797 0.1288010478 0.2489254922 0.1522114277 0.1940581352 0.1446169019 0.1578372866 0.2825684249 0.4324877858 0.2193847299 0.4560420811 0.2203479856 0.1855582297 0.1010205746 0.1351858526 0.1351858526 0.1351858526 0.1351878047 0.1554162204 0.04716260359 0.3162561059 0.2053879201} {curve(which) 0 9.367863095e-05 0.1561876982 0.08101774752 0.180480808 0.1688809693 0.1830150485 0.1982172877 0.1722826511 0.09774444997 0.0868505761 0.190669477 0.152531758 0.1112773567 0.1215386018 0.1830992699 0.1465712637 0.1552320272 0.1047228053 0.1151721701 0.1024464965 0.1186000481 0.108225815 0.1688809693 0.1516760886 0.05183707923 0.1436725408 0.124180764 0.09264881909 0.123526901 0.1882286519 0.1467743814 0.03134934977 0.03134934977 0.03134934977 0.03133957833 0.09979832917 0.1372147948 0.1845382005 0.1270133406}}
{{curve(which) 0 0.3439664543 0.2722287476 0.2801307142 0.2126390189 0.2627002299 0.237623319 0.2289745659 0.209491685 0.2919537723 0.2207257152 0.1942579001 0.2022213936 0.1694435924 0.2289056629 0.2119505703 0.2866941094 0.1387997568 0.2612613738 0.2709796727 0.2150758505 0.2606855333 0.2830046713 0.2627002299 0.1743051857 0.2365771234 0.1383759677 0.1973138005 0.1721783578 0.2680045366 0.2973450124 0.258728236 0.2880711257 0.2880711257 0.2880711257 0.2880405784 0.3152042925 0.3790788651 0.2446159422 0.2276017666} {curve(which) 1 0.7281661034 0.6740817428 0.8202066422 0.7151686549 0.6779980659 0.6891706586 0.6917385459 0.7215952873 0.8238410354 0.839184761 0.7385566831 0.7585275769 0.8648257852 0.7808576822 0.7230190039 0.8429791331 0.910841465 0.8696421385 0.786606431 0.8850684762 0.7748944759 0.8131960034 0.6779980659 0.951146543 0.8896810412 0.911518693 0.943950057 0.8553914428 0.8326833844 0.6273635626 0.7246823311 0.7118432522 0.7118432522 0.7118432522 0.7118694782 0.6648360491 0.5769088268 0.6720442176 0.7383946776} {curve(which) 0 -0.07213255018 0.05368951708 -0.1003373638 0.07219231874 0.05930171534 0.07320601493 0.07928691059 0.06891305745 -0.1157948226 -0.05991046131 0.06718540192 0.03925102949 -0.03426937759 -0.009763340466 0.06503042579 -0.1296732277 -0.04964122549 -0.1309035122 -0.05758608505 -0.1001443192 -0.03558001295 -0.09620071948 0.05930171534 -0.1254517138 -0.1262581497 -0.04989464581 -0.1412638426 -0.02756982669 -0.1006879359 0.07529145479 0.01658944227 8.565396274e-05 8.565396274e-05 8.565396274e-05 8.991353388e-05 0.01995966583 0.04401229322 0.08333983272 0.0340035744}}
{{curve(which) 0 -3.863927134e-08 -0.005574660841 -0.1037815213 0.01933082007 0 0 0 0 0.0027982709 -0.0544523783 -0.04792318866 -0.0176958181 -0.1061859056 -0.02100777067 -0.01945115253 -0.07968087494 0.07801423222 -0.009676366113 -0.009677864611 -0.03206583485 -0.009310216643 -0.01825834997 0 -0.11669112 -0.02325225808 -0.1602820009 -0.1427432895 -0.10720893 -0.02941203304 0.02703136392 -2.906408625e-08 -3.236030111e-08 -3.236030111e-08 -3.236030111e-08 0 0 -0.01229703799 0.02518104948 0} {curve(which) 0 0 0.004060741514 -0.07290724665 0.1191947311 0.0280726999 0.0449459292 0.04511339962 0.04706057906 -0.06703422964 -0.0003228379355 -0.0002844714036 0.08768811822 0.02554347552 0.01782695204 0.01650637016 -0.3473432064 -0.3148325086 -0.2364816219 0.004600019194 -0.02765839547 -0.004612449091 -0.08316776901 0.0280726999 -0.5518454909 -0.4897170365 -0.171635136 -0.4278847873 0.07809129357 -0.08659287542 0.07068887353 0.05121183768 1.2621717e-08 1.2621717e-08 1.2621717e-08 -1.262213711e-08 0.04317118227 0.01672476344 0.1411857158 0.01001892332} {curve(which) 1 1.008825183 1.010339141 1.265746474 0.950532198 1.060985088 0.9638792276 1.043944359 0.9073553085 1.153293729 1.063571215 1.057001948 0.9388025999 1.089437366 1.01197505 1.011739731 1.51608181 1.325875998 1.335215807 1.094135642 1.148782015 1.102980375 1.190483928 1.060985088 1.745692492 1.590125084 1.409072995 1.65968585 1.118175387 1.205062628 0.9913375378 0.7738927603 0.8251045942 0.8251045942 0.8251045942 0.8248898983 0.8782252669 0.9955722094 0.9226909876 0.8150856495}}
}
invert {{parent.invert}}
name ColorMatrix
label "RGB to XYZ"
xpos -40
ypos 32
addUserKnob {20 Gamut}
addUserKnob {3 which}
which {{parent.gamut}}
addUserKnob {12 rxy}
rxy {{curve(which) 1 0.7347 0.713 0.8 0.64 0.708 0.68 0.68 0.68 0.684 0.7530442228 0.7530444911 0.6997470013 0.8786825105 0.7011810359 0.7011805919 0.780308 0.69848046 0.74 0.73 0.766 0.73 0.71 0.708 0.9173 0.7422 1.0625 0.9175 0.8608 0.7177 0.64 0.7347 0.7347 0.7347 0.7347 0.734699 0.69 0.6898 0.625 0.7351916376} {curve(which) 0 0.2653 0.293 0.3177 0.33 0.292 0.32 0.32 0.32 0.313 0.3278305767 0.3278310295 0.3290469303 0.3249640074 0.3290141556 0.3290136991 0.304253 0.19302645 0.27 0.28 0.275 0.28 0.31 0.292 0.2502 0.2859 0.3948 0.2983 0.3689 0.3171 0.33 0.2653 0.2653 0.2653 0.2653 0.265301 0.31 0.3206 0.34 0.2648083624}}
addUserKnob {12 gxy}
gxy {{curve(which) 0 0 0.165 0.18 0.3 0.17 0.265 0.265 0.265 0.221 0.2995702285 0.2995704905 0.304264039 0.3008887144 0.3006003047 0.3006003955 0.121595 0.32955538 0.17 0.14 0.225 0.165 0.21 0.17 0.2833 0.414 0.3689 0.2983 0.3282 0.228 0.21 0.1152 0.1596 0.1596 0.1596 0.159597 0.18 0.0736 0.28 0.2153361345} {curve(which) 1 1 0.83 0.9 0.6 0.797 0.69 0.69 0.69 0.848 0.700699322 0.7006994156 0.6236411451 0.6790547558 0.6837888343 0.6837888243 1.493994 1.02459662 1.14 0.855 0.8 0.84 0.88 0.797 1.7072 1.3035 0.7775 1.2835 0.6156 0.8616 0.71 0.8264 0.8404 0.8404 0.8404 0.840403 0.77 0.9003 0.595 0.7741596639}}
addUserKnob {12 bxy}
bxy {{curve(which) 0 0.0001 0.128 0.065 0.15 0.131 0.15 0.15 0.15 0.0861 0.07964206674 0.1450115843 0.1349139613 0.09539869461 0.1081544556 0.1453319462 0.095612 0.10844263 0.08 0.1 0.089 0.1 0.09 0.131 0.0856 0.0342 0.0956 0.0756 0.0783 0.1006 0.15 0.1566 0.0366 0.0366 0.0366 0.036598 0.1 0.1166 0.155 0.1301229508} {curve(which) 0 -0.077 0.044 -0.0805 0.06 0.046 0.06 0.06 0.06 -0.102 -0.05493795109 0.05109712509 0.03471744128 -0.02937932683 -0.008688175787 0.05161680362 -0.084589 -0.03467857 -0.1 -0.05 -0.087 -0.03 -0.08 0.046 -0.0708 -0.0833 -0.0332 -0.086 -0.0233 -0.082 0.06 0.0177 0.0001 0.0001 0.0001 0.000105 0.02 0.0374 0.07 0.03483606557}}
addUserKnob {12 wxy}
wxy {{curve(which) 0.33333333 0.32168 0.32168 0.3127 0.3127 0.3127 0.32168 0.3127 0.314 0.3127 0.3216831877 0.3216832104 0.3216832894 0.3216832894 0.3216832104 0.3216832894 0.3127 0.3127 0.3127 0.3127 0.3127 0.3127 0.3127 0.3127 0.3135 0.3135 0.3135 0.3127 0.3127 0.3127 0.3127 0.3457 0.3457 0.3457 0.3457 0.345704 0.33243 0.33333333 0.3127 0.3457} {curve(which) 0.33333333 0.33767 0.33767 0.329 0.329 0.329 0.33767 0.329 0.351 0.329 0.337673316 0.3376736101 0.3376734472 0.3376734472 0.3376736101 0.3376734472 0.329 0.329 0.329 0.329 0.329 0.329 0.329 0.329 0.3305 0.3305 0.3305 0.329 0.329 0.329 0.329 0.3585 0.3585 0.3585 0.3585 0.35854 0.34744 0.33333333 0.329 0.3585}}
}
Output {
name Output
xpos -40
ypos 86
}
end_group
set Naed9a20 [stack 0]
Colorspace {
colorspace_in CIE-XYZ
colorspace_out CIE-Yxy
name Yxy
xpos 97
ypos 278
}
push $Naed9a20
ColorMatrix {
name CAT_MATRIX
xpos -40
ypos 312
}
ColorMatrix {
matrix {
{{parent.GamutToXYZ.ColorMatrix.matrix} {parent.GamutToXYZ.ColorMatrix.matrix} {parent.GamutToXYZ.ColorMatrix.matrix}}
{{parent.GamutToXYZ.ColorMatrix.matrix} {parent.GamutToXYZ.ColorMatrix.matrix} {parent.GamutToXYZ.ColorMatrix.matrix}}
{{parent.GamutToXYZ.ColorMatrix.matrix} {parent.GamutToXYZ.ColorMatrix.matrix} {parent.GamutToXYZ.ColorMatrix.matrix}}
}
invert true
name XYZToGamut
note_font Helvetica
xpos -40
ypos 367
}
Output {
name Output
xpos -40
ypos 435
}
end_group