forked from openNuke/toolset
-
Notifications
You must be signed in to change notification settings - Fork 0
/
despillMadness.nk
393 lines (393 loc) · 8.31 KB
/
despillMadness.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
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
#http://www.nukepedia.com/gizmos/keyer/despillmadness v3.0 Andreas Frickinger
set cut_paste_input [stack 0]
version 9.0 v2
push $cut_paste_input
Group {
name DespillMadness
note_font "Bitstream Vera Sans"
selected true
xpos 498
ypos 5874
mapsize {0.15 0.15}
addUserKnob {20 DespillMadness l "Despill Settings"}
addUserKnob {41 screenType l "screen type" T GizmoControl.screenType}
addUserKnob {41 algorithm l "despill algorithm" T GizmoControl.algorithm}
addUserKnob {41 LimitPercentage l "fine tune" T RedLimitsGreen.LimitPercentage}
addUserKnob {26 ""}
addUserKnob {26 text_2 l "" +STARTLINE T "spill area correction"}
addUserKnob {26 spacer l " " T " "}
addUserKnob {6 sourceLuma l "restore source luminance" t "Restores luminance of original image." +STARTLINE}
sourceLuma true
addUserKnob {41 saturation T CC_SpillMap.saturation}
addUserKnob {41 gamma T CC_SpillMap.gamma}
addUserKnob {41 offset T CC_SpillMap.offset}
addUserKnob {26 ""}
addUserKnob {41 spillMatteOut l "output spill matte in alpha" T GizmoControl.spillMatteOut}
addUserKnob {26 ""}
addUserKnob {41 maskChannel l mask T KeymixMask.maskChannel}
addUserKnob {6 invmsk l invert -STARTLINE}
addUserKnob {41 which l mix T mix.which}
addUserKnob {26 ""}
addUserKnob {20 Info}
addUserKnob {22 documentation l " Documentation / Feedback " T "import webbrowser\nwebbrowser.open(\"http://opennuke.github.io/despillMadness_nk/\")" +STARTLINE}
addUserKnob {26 ""}
addUserKnob {26 version l version: T "0.1 Stable"}
addUserKnob {26 created l created: T "19/02/2013 by Andreas Frickinger"}
addUserKnob {26 modified l "modified: " T " "}
addUserKnob {26 source l source: T "<a href='http://www.nukepedia.com/gizmos/keyer/despillmadness'> nukepedia v3.0</a>"}
addUserKnob {26 licence l licence: T "<a href=\"https://github.com/openNuke/toolset/blob/master/LICENCE\">READ ME</a>"}
}
Input {
inputs 0
name img
xpos 262
ypos -342
}
Dot {
name Dot6
xpos 296
ypos -186
}
set N1b3fade0 [stack 0]
Dot {
name Dot2
xpos 296
ypos -71
}
set N36cd2f00 [stack 0]
Dot {
name Dot3
xpos 626
ypos -71
}
set N36cd4b00 [stack 0]
Expression {
expr2 b>g*LimitPercentage?g*LimitPercentage:b
expr3 b-g*LimitPercentage
name GreenLimitsBlue1
xpos 728
ypos 44
addUserKnob {20 User}
addUserKnob {7 LimitPercentage l "fine tune" R 0.5 1.5}
LimitPercentage {{RedLimitsGreen.LimitPercentage i}}
}
push $N36cd4b00
Expression {
expr2 b>r*LimitPercentage?r*LimitPercentage:b
expr3 b-r*LimitPercentage
name RedLimitsBlue
xpos 592
ypos 44
addUserKnob {20 User}
addUserKnob {7 LimitPercentage l "fine tune" R 0.5 1.5}
LimitPercentage {{RedLimitsGreen.LimitPercentage i}}
}
push $N36cd4b00
Expression {
expr2 b>(g+2*r)/2*LimitPercentage?(g+2*r)/2*LimitPercentage:b
expr3 b-(2*r+g)*LimitPercentage/2
name DoubleRedAve2
xpos 1125
ypos 43
addUserKnob {20 User}
addUserKnob {7 LimitPercentage l "fine tune" R 0.5 1.5}
LimitPercentage {{RedLimitsGreen.LimitPercentage i}}
}
push $N36cd4b00
Expression {
expr2 b>(2*g+r)/2*LimitPercentage?(2*g+r)/2*LimitPercentage:b
expr3 b-(r+2*g)*LimitPercentage/2
name DoubleGreenAve
xpos 998
ypos 44
addUserKnob {20 User}
addUserKnob {7 LimitPercentage l "fine tune" R 0.5 1.5}
LimitPercentage {{RedLimitsGreen.LimitPercentage}}
}
push $N36cd4b00
Expression {
expr2 b>(g+r)/2*LimitPercentage?(g+r)/2*LimitPercentage:b
expr3 b-(r+g)*LimitPercentage/2
name RedAndGreenLimitBlue
xpos 862
ypos 44
addUserKnob {20 User}
addUserKnob {7 LimitPercentage l "fine tune" R 0.5 1.5}
LimitPercentage {{RedLimitsGreen.LimitPercentage i}}
}
Switch {
inputs 5
which {{GizmoControl.algorithm i}}
name SwitchBlue
xpos 728
ypos 190
}
Dot {
name Dot5
xpos 762
ypos 370
}
push $N36cd2f00
Dot {
name Dot1
xpos 164
ypos -71
}
set N37704740 [stack 0]
Expression {
expr1 g>b*LimitPercentage?b*LimitPercentage:g
expr3 g-b*LimitPercentage
name BlueLimitsGreen
xpos -15
ypos 44
addUserKnob {20 User}
addUserKnob {7 LimitPercentage l "fine tune" R 0.5 1.5}
LimitPercentage {{RedLimitsGreen.LimitPercentage i}}
}
push $N37704740
Expression {
expr1 g>r*LimitPercentage?r*LimitPercentage:g
expr3 g-r*LimitPercentage
name RedLimitsGreen
xpos -160
ypos 44
addUserKnob {20 User}
addUserKnob {7 LimitPercentage l "fine tune" R 0.5 1.5}
LimitPercentage 0.94
}
push $N37704740
Expression {
expr1 g>(b+2*r)/3*LimitPercentage?(b+2*r)/3*LimitPercentage:g
expr3 g-(r+b)*LimitPercentage/2
name DoubleRedAve
xpos 370
ypos 42
addUserKnob {20 User}
addUserKnob {7 LimitPercentage l "fine tune" R 0.5 1.5}
LimitPercentage {{RedLimitsGreen.LimitPercentage i}}
}
push $N37704740
Expression {
expr1 g>(2*b+r)/3*LimitPercentage?(2*b+r)/3*LimitPercentage:g
expr3 g-(r+b)*LimitPercentage/2
name DoubleBlueAve
xpos 257
ypos 42
addUserKnob {20 User}
addUserKnob {7 LimitPercentage l "fine tune" R 0.5 1.5}
LimitPercentage {{RedLimitsGreen.LimitPercentage i}}
}
push $N37704740
Expression {
expr1 g>(b+r)/2*LimitPercentage?(b+r)/2*LimitPercentage:g
expr3 g-(r+b)*LimitPercentage/2
name RedAveBlueLimitsGreen
xpos 130
ypos 44
addUserKnob {20 User}
addUserKnob {7 LimitPercentage l "fine tune" R 0.5 1.5}
LimitPercentage {{RedLimitsGreen.LimitPercentage i}}
}
Switch {
inputs 5
which {{GizmoControl.algorithm i}}
name SwitchGreen
xpos -15
ypos 199
}
Dot {
name Dot4
xpos 19
ypos 370
}
Switch {
inputs 2
which {{GizmoControl.screenType i}}
name SwitchMain
xpos 257
ypos 366
}
Clamp {
channels alpha
name Clamp1
xpos 257
ypos 408
}
ColorCorrect {
maskChannelInput rgba.alpha
name CC_SpillMap
note_font Verdana
xpos 257
ypos 468
}
set N377566c0 [stack 0]
Dot {
name Dot9
xpos 440
ypos 478
}
Dot {
name Dot10
xpos 440
ypos 1389
}
Input {
inputs 0
name mask
xpos -696
ypos -348
number 1
}
Expression {
channel0 {-rgba.red -rgba.green -rgba.blue none}
expr0 0
channel1 {-rgba.red -rgba.green -rgba.blue none}
expr1 0
channel2 {-rgba.red -rgba.green -rgba.blue none}
expr2 0
channel3 {rgba.alpha none none rgba.alpha}
expr3 a==0?0:a
name AlphaFix1
label "To avid Gizmo being in state of\nerror without something plugged in input."
xpos -696
ypos 861
}
set N3649d830 [stack 0]
push $N3649d830
Copy {
inputs 2
from0 rgba.alpha
to0 rgba.alpha
name CopyMask
xpos -296
ypos 867
}
Invert {
name Invert1
xpos -296
ypos 943
disable {{parent.invmsk i}}
}
push $N1b3fade0
Dot {
name Dot7
xpos -345
ypos -186
}
Dot {
name Dot8
xpos -345
ypos 551
}
Expression {
channel0 {-rgba.red -rgba.green -rgba.blue none}
expr0 0
channel1 {-rgba.red -rgba.green -rgba.blue none}
expr1 0
channel2 {-rgba.red -rgba.green -rgba.blue none}
expr2 0
channel3 {rgba.alpha none none rgba.alpha}
expr3 a==0?0:a
name AlphaFix
label "To avid Gizmo being in state of\nerror without something plugged in input."
xpos -27
ypos 534
}
set N364c9780 [stack 0]
Dot {
name Dot11
xpos -113
ypos 614
}
Dot {
name Dot12
xpos -113
ypos 818
}
set N364da1c0 [stack 0]
push $N364c9780
push $N364c9780
push $N377566c0
Copy {
inputs 2
from0 rgba.alpha
to0 rgba.alpha
from3 rgba.alpha
to3 rgba.alpha
name CopyAlpha
xpos 257
ypos 534
}
set N364de650 [stack 0]
Merge2 {
inputs 2
operation minus
name Merge3
xpos -27
ypos 672
}
Clamp {
name Clamp2
xpos -27
ypos 698
}
Saturation {
saturation 0
name Saturation2
xpos -27
ypos 736
}
push $N364de650
Merge2 {
inputs 2
operation plus
name RestoreLuma
xpos 257
ypos 736
disable {{!parent.sourceLuma i}}
}
Keymix {
inputs 3
maskChannel -rgba.alpha
name KeymixMask
xpos 257
ypos 943
}
push $N364da1c0
Dot {
name Dot13
xpos -113
ypos 1087
}
Dissolve {
inputs 2
which 1
name mix
xpos 257
ypos 1077
}
Switch {
inputs 2
which {{GizmoControl.spillMatteOut i}}
name SwitchSpillMap
xpos 257
ypos 1385
}
Output {
name Output1
xpos 257
ypos 1485
}
NoOp {
inputs 0
name GizmoControl
selected true
xpos 875
ypos 414
addUserKnob {20 User}
addUserKnob {26 version l v1.0}
addUserKnob {4 screenType l "screen type" M {green blue}}
addUserKnob {4 algorithm l "despill algorithm" M {average "double green/blue average" "double red average" "red limit" "green/blue limit" ""}}
addUserKnob {6 spillMatteOut l "output spill matte in alpha" +STARTLINE}
}
end_group