-
Notifications
You must be signed in to change notification settings - Fork 26
/
n6Vibrance.nk
421 lines (421 loc) · 8.58 KB
/
n6Vibrance.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
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
set cut_paste_input [stack 0]
push $cut_paste_input
Group {
name N6Vibrance
tile_color 0x536177ff
addUserKnob {20 Vibrance_tab l Vibrance}
addUserKnob {26 about_label l " " T "<style> a:link \{ color: #ccc \}</style>\n<font color=#ccc>\n<b>Notorious Six Vibrance</b> created by Jed Smith\n<br>v0.0.3 | <a href=https://github.com/jedypod/open-display-transform/tree/main/look-transforms>documentation</a><br>"}
addUserKnob {7 mgl l global R -1 1}
addUserKnob {7 my l yellow R -1 1}
addUserKnob {7 mr l red R -1 1}
addUserKnob {7 mm l magenta R -1 1}
addUserKnob {7 mb l blue R -1 1}
addUserKnob {7 mc l cyan R -1 1}
addUserKnob {7 mg l green R -1 1}
addUserKnob {7 mcu l custom R -1 1}
addUserKnob {7 cuh l "custom hue" t "hue angle center for custom hue extraction. 0 is green." R 0 360}
cuh 100
addUserKnob {7 cuw l "custom width" t "width for custom hue angle extraction"}
cuw 0.3
addUserKnob {26 ""}
addUserKnob {7 hl l hue-linear}
hl 0.5
addUserKnob {6 ze l "zone extract" t "effect a limited range of luminance." +STARTLINE}
ze true
addUserKnob {4 zr l "" -STARTLINE M {low high ""}}
addUserKnob {7 zp l "zone range" t "set range affected: higher values affect a larger range" R -4 4}
addUserKnob {26 ""}
addUserKnob {41 maskChannelMask l mask -STARTLINE T NodeWrapper1.maskChannelMask}
addUserKnob {41 invert_mask l invert -STARTLINE T NodeWrapper1.invert_mask}
addUserKnob {41 mix T NodeWrapper1.mix}
}
Input {
inputs 0
name Inputmask
xpos 290
ypos 230
number 1
}
Input {
inputs 0
name Input
xpos 180
ypos -322
}
Dot {
name Dot104
xpos 214
ypos -270
}
set Na64fcf00 [stack 0]
Dot {
name Dot24
xpos 104
ypos -270
}
set Na64fc800 [stack 0]
Dot {
name Dot105
xpos -6
ypos -270
}
Expression {
channel0 rgba
expr0 max(r,g,b)
channel3 none
name Norm
xpos -40
ypos -250
}
Dot {
name Dot21
xpos -6
ypos -198
}
set Na2713200 [stack 0]
Dot {
name Dot106
xpos -6
ypos 114
}
set Na2712b00 [stack 0]
push $Na64fc800
Dot {
name Dot27
xpos 104
ypos 66
}
set Na2712400 [stack 0]
MergeExpression {
inputs 2
temp_name0 n
temp_expr0 max(1e-12,Ar)
temp_name1 to
temp_expr1 (n*n/(n+fl))
temp_name2 flow
temp_expr2 pow((to/(to+1))/n,p)
temp_name3 fhi
temp_expr3 1-pow((n/(n+1))/n,p)
channel0 {rgba.red -rgba.green -rgba.blue none}
expr0 r
expr1 g
expr2 b
expr3 zr?fhi:flow
name Extract
xpos 70
ypos 158
addUserKnob {20 Params}
addUserKnob {7 fl R 0 0.02}
fl 0.004
addUserKnob {7 p R 0 64}
p {{pow(2,-zp)}}
}
push $Na2712b00
push $Na2713200
push $Na64fcf00
MergeExpression {
inputs 2
temp_name0 n
temp_expr0 Ar
temp_name1 mn
temp_expr1 -1
expr0 n==0?0:max(mn,r/n)
expr1 n==0?0:max(mn,g/n)
expr2 n==0?0:max(mn,b/n)
name RGBRatios
xpos 180
ypos -202
}
Dot {
name Dot4
xpos 214
ypos -150
}
set Na2710f00 [stack 0]
Expression {
temp_name0 C
temp_expr0 1-min(r,g,b)
channel0 {rgba.red rgba.green rgba.blue none}
expr0 (C==0?0:r==1?((g-b)/C+6)%6:g==1?(b-r)/C+2:b==1?(r-g)/C+4:0)
expr3 C
name hue
xpos 510
ypos -154
}
Dot {
name Dot5
xpos 544
ypos -102
}
set Na2710100 [stack 0]
Dot {
name Dot6
xpos 544
ypos -54
}
set Na6f63900 [stack 0]
Dot {
name Dot7
xpos 544
ypos -6
}
Expression {
temp_name0 h
temp_expr0 (r+o)%6
channel0 {rgba.red rgba.green rgba.blue none}
expr0 (h<e1?clamp((h-e0)/(e1-e0)):clamp((h-e3)/(e2-e3)))*a
name LinearWindow1
label Custom
xpos 400
ypos -16
addUserKnob {20 Param}
addUserKnob {7 o l offset R 0 6}
o {{cuh/60}}
addUserKnob {7 e0 R 0 4}
e0 {{2-cuw}}
addUserKnob {7 e1 R 0 4}
e1 2
addUserKnob {7 e2 R 0 4}
e2 2
addUserKnob {7 e3 R 0 4}
e3 {{2+cuw}}
}
set Na6f62b00 [stack 0]
push $Na6f63900
Expression {
temp_name0 h0
temp_expr0 (r+o0)%6
temp_name1 h1
temp_expr1 (r+o1)%6
temp_name2 h2
temp_expr2 (r+o2)%6
expr0 clamp(h0>c0?(h0-c0-f0)/(c0-(c0+f0)):(h0-(c0-f0))/(c0-(c0-f0)))*a
expr1 clamp(h1>c1?(h1-c1-f1)/(c1-(c1+f1)):(h1-(c1-f1))/(c1-(c1-f1)))*a
expr2 clamp(h2>c2?(h2-c2-f2)/(c2-(c2+f2)):(h2-(c2-f2))/(c2-(c2-f2)))*a
channel3 none
name LerpWindow4
label CMY
xpos 400
ypos -64
addUserKnob {20 Param}
addUserKnob {7 o0 R 0 6}
o0 5
addUserKnob {7 o1 R 0 6}
o1 3
addUserKnob {7 o2 R 0 6}
o2 1
addUserKnob {26 ""}
addUserKnob {7 c0 R 1 3}
c0 2
addUserKnob {7 f0 R 0.2 1.2}
f0 1
addUserKnob {7 c1 R 1 3}
c1 2
addUserKnob {7 f1 R 0.2 1.2}
f1 1
addUserKnob {7 c2 R 1 3}
c2 2
addUserKnob {7 f2 R 0.2 1.2}
f2 1
}
set Na6f62400 [stack 0]
push $Na2710100
Expression {
temp_name0 h0
temp_expr0 (r+o0)%6
temp_name1 h1
temp_expr1 (r+o1)%6
temp_name2 h2
temp_expr2 (r+o2)%6
expr0 clamp(h0>c0?(h0-c0-f0)/(c0-(c0+f0)):(h0-(c0-f0))/(c0-(c0-f0)))*a
expr1 clamp(h1>c1?(h1-c1-f1)/(c1-(c1+f1)):(h1-(c1-f1))/(c1-(c1-f1)))*a
expr2 clamp(h2>c2?(h2-c2-f2)/(c2-(c2+f2)):(h2-(c2-f2))/(c2-(c2-f2)))*a
channel3 none
name LerpWindow2
label RGB
xpos 400
ypos -112
addUserKnob {20 Param}
addUserKnob {7 o0 R 0 6}
o0 2
addUserKnob {7 o1 R 0 6}
o1 6
addUserKnob {7 o2 R 0 6}
o2 4
addUserKnob {26 ""}
addUserKnob {7 c0 R 1 3}
c0 2
addUserKnob {7 f0 R 0.2 1.2}
f0 1
addUserKnob {7 c1 R 1 3}
c1 2
addUserKnob {7 f1 R 0.2 1.2}
f1 1
addUserKnob {7 c2 R 1 3}
c2 2
addUserKnob {7 f2 R 0.2 1.2}
f2 1
}
set Na6f61d00 [stack 0]
push $Na2710f00
MergeExpression {
inputs 2
temp_name0 m
temp_expr0 1.1
temp_name1 c
temp_expr1 Aa
temp_name3 f
temp_expr3 c==0||c>1?1:((1-pow(1-c,p0))*Ar+(1-pow(1-c,p1))*Ag+(1-pow(1-c,p2))*Ab+c*(1-(Ar+Ag+Ab)))/c
channel0 {rgba.red -rgba.green -rgba.blue none}
expr0 m*(1-f)+r*f
expr1 m*(1-f)+g*f
expr2 m*(1-f)+b*f
expr3 f
name vihl_rgb
xpos 180
ypos -106
addUserKnob {20 Params}
addUserKnob {7 p0 R 0 4}
p0 {{3**mr*3**mgl}}
addUserKnob {7 p1 R 0 4}
p1 {{3**mg*3**mgl}}
addUserKnob {7 p2 R 0 4}
p2 {{3**mb*3**mgl}}
}
MergeExpression {
inputs 2
temp_name0 m
temp_expr0 1
temp_name1 c
temp_expr1 Aa
temp_name3 f
temp_expr3 c==0?1:((1-pow(1-c,p0))*Ar+(1-pow(1-c,p1))*Ag+(1-pow(1-c,p2))*Ab+c*(1-(Ar+Ag+Ab)))/c
channel0 {rgba.red -rgba.green -rgba.blue none}
expr0 m*(1-f)+r*f
expr1 m*(1-f)+g*f
expr2 m*(1-f)+b*f
name vihl_cmy
xpos 180
ypos -58
addUserKnob {20 Params}
addUserKnob {7 p0 R 0 4}
p0 {{3**mc*3**mgl}}
addUserKnob {7 p1 R 0 4}
p1 {{3**mm*3**mgl}}
addUserKnob {7 p2 R 0 4}
p2 {{3**my*2**mgl}}
}
MergeExpression {
inputs 2
temp_name0 m
temp_expr0 1
temp_name1 c
temp_expr1 Aa
temp_name3 f
temp_expr3 c==0?1:((1-pow(1-c,p))*Ar+c*(1-Ar))/c
channel0 {rgba.red -rgba.green -rgba.blue none}
expr0 m*(1-f)+r*f
expr1 m*(1-f)+g*f
expr2 m*(1-f)+b*f
name vihl_cu
xpos 180
ypos -10
addUserKnob {20 Params}
addUserKnob {7 p R 0 4}
p {{3**mcu}}
}
push $Na6f62b00
push $Na6f62400
push $Na6f61d00
push $Na2710f00
MergeExpression {
inputs 2
channel0 {rgba.red -rgba.green -rgba.blue none}
expr0 pow(r,p0)*Ar+pow(r,p1)*Ag+pow(r,p2)*Ab+r*(1-(Ar+Ag+Ab))
expr1 pow(g,p0)*Ar+pow(g,p1)*Ag+pow(g,p2)*Ab+g*(1-(Ar+Ag+Ab))
expr2 pow(b,p0)*Ar+pow(b,p1)*Ag+pow(b,p2)*Ab+b*(1-(Ar+Ag+Ab))
name vi_rgb
xpos 290
ypos -82
addUserKnob {20 Params}
addUserKnob {7 p0 R 0 4}
p0 {{parent.vihl_rgb.p0}}
addUserKnob {7 p1 R 0 4}
p1 {{parent.vihl_rgb.p1}}
addUserKnob {7 p2 R 0 4}
p2 {{parent.vihl_rgb.p2}}
}
MergeExpression {
inputs 2
channel0 {rgba.red -rgba.green -rgba.blue none}
expr0 pow(r,p0)*Ar+pow(r,p1)*Ag+pow(r,p2)*Ab+r*(1-(Ar+Ag+Ab))
expr1 pow(g,p0)*Ar+pow(g,p1)*Ag+pow(g,p2)*Ab+g*(1-(Ar+Ag+Ab))
expr2 pow(b,p0)*Ar+pow(b,p1)*Ag+pow(b,p2)*Ab+b*(1-(Ar+Ag+Ab))
name vi_cmy
xpos 290
ypos -34
addUserKnob {20 Params}
addUserKnob {7 p0 R 0 4}
p0 {{parent.vihl_cmy.p0}}
addUserKnob {7 p1 R 0 4}
p1 {{parent.vihl_cmy.p1}}
addUserKnob {7 p2 R 0 4}
p2 {{parent.vihl_cmy.p2}}
}
MergeExpression {
inputs 2
channel0 {rgba.red -rgba.green -rgba.blue none}
expr0 pow(r,p0)*Ar+r*(1-Ar)
expr1 pow(g,p0)*Ar+g*(1-Ar)
expr2 pow(b,p0)*Ar+b*(1-Ar)
name vi_cu
xpos 290
ypos 17
addUserKnob {20 Params}
addUserKnob {7 p0 R 0 4}
p0 {{parent.vihl_cu.p}}
}
Dissolve {
inputs 2
channels rgb
which {{hl}}
name Mix_hue_linear
xpos 180
ypos 63
}
MergeExpression {
inputs 2
temp_name0 n
temp_expr0 Ar
expr0 n*r
expr1 n*g
expr2 n*b
name Recombine
xpos 180
ypos 110
}
MergeExpression {
inputs 2
temp_name0 f
temp_expr0 ze?Aa:1
expr0 Ar*(1-f)+Br*f
expr1 Ag*(1-f)+Bg*f
expr2 Ab*(1-f)+Bb*f
name Mix
xpos 180
ypos 158
}
push $Na2712400
NodeWrapper {
inputs 2+1
channels rgb
name NodeWrapper1
xpos 180
ypos 230
}
Output {
name Output
xpos 180
ypos 302
}
end_group