1set cut_paste_input [stack 0]
2version 9.0 v7
3push $cut_paste_input
4Group {
5name vignette
6tile_color 0x421010ff
7selected true
8xpos 321
9ypos 27
10addUserKnob {20 User l vignette}
11addUserKnob {4 priority M {"highlight priority" "color priority" "" "" ""}}
12addUserKnob {7 amount R -1 1}
13amount -0.4
14addUserKnob {7 midpoint R -1 1}
15addUserKnob {7 roundness R -1 1}
16addUserKnob {7 feather}
17feather 0.2
18addUserKnob {7 highlights l "highlight recovery"}
19highlights 0.2
20addUserKnob {26 ""}
21addUserKnob {26 lbl l "" +STARTLINE T "Vignette v1.3"}
22addUserKnob {22 btn l DerekVFX.ca T "nuke.tcl('start', 'https://derekvfx.ca')" +STARTLINE}
23}
24Input {
25inputs 0
26name Input
27xpos 447
28ypos 61
29}
30set Nf274b000 [stack 0]
31push $Nf274b000
32Dot {
33name Dot4
34xpos 239
35ypos 178
36}
37set Nf274ac00 [stack 0]
38Dot {
39name Dot5
40xpos -13
41ypos 178
42}
43set Nf274a800 [stack 0]
44Colorspace {
45colorspace_out Cineon
46name Colorspace1
47xpos -170
48ypos 239
49}
50Expression {
51temp_name0 avg
52temp_expr0 (r+g+b)/3
53expr3 smoothstep(1/avg,0,pow(highlights,2.4))
54name Expression2
55xpos -170
56ypos 305
57}
58push $Nf274a800
59Expression {
60temp_name0 radial
61temp_expr0 "sqrt((x*round-(w*round)/2)**2 + ((y/round)/pax-((h/round)/pax)/2)**2)/diagonal"
62temp_name1 remap
63temp_expr1 lerp(clamp(smoothstep(mp,1,radial)),clamp(lerp(0,1-mp,radial)),feather)
64temp_name2 profile
65temp_expr2 1/(((remap)**2)+1)
66temp_name3 o
67temp_expr3 lerp(profile,profile*-1+2,(amount*2+1)/2)
68expr0 o
69expr1 o
70expr2 o
71expr3 remap
72name Expression1
73selected true
74xpos -47
75ypos 283
76addUserKnob {20 User}
77addUserKnob {7 round l roundness}
78round {{lerp(-1,.9,1,1.1,roundness)}}
79addUserKnob {7 mp}
80mp {{lerp(-1,0,1,1,midpoint)}}
81addUserKnob {7 le l "long edge"}
82le {{"(w >= h ? w : h)"}}
83addUserKnob {7 diagonal R 0 4000}
84diagonal {{(sqrt(w**2+h**2)/2)}}
85addUserKnob {7 aspect R 0.5 2.5}
86aspect {{input.width/input.height}}
87addUserKnob {7 w R 0 4000}
88w {{input.width}}
89addUserKnob {7 h R 0 4000}
90h {{input.height}}
91addUserKnob {7 pax R 0 2}
92pax {{input.pixel_aspect}}
93}
94push $Nf274ac00
95Merge2 {
96inputs 2+1
97operation multiply
98output {rgba.red rgba.green rgba.blue -rgba.alpha}
99name Merge1
100xpos -47
101ypos 416
102}
103set Nfc9eb000 [stack 0]
104Colorspace {
105colorspace_out CIE-LCH
106name Colorspace2
107xpos 94
108ypos 590
109}
110set Cfc9eac00 [stack 0]
111push $Nf274ac00
112clone $Cfc9eac00 {
113xpos 205
114ypos 589
115selected false
116}
117Copy {
118inputs 2
119from0 rgba.red
120to0 rgba.red
121name Copy1
122xpos 205
123ypos 666
124}
125Colorspace {
126colorspace_in CIE-LCH
127name Colorspace3
128xpos 205
129ypos 725
130}
131push $Nfc9eb000
132Dot {
133name Dot1
134xpos -13
135ypos 913
136}
137Switch {
138inputs 2
139which {{priority}}
140name Switch1
141xpos 205
142ypos 909
143}
144CopyBBox {
145inputs 2
146name CopyBBox1
147xpos 447
148ypos 997
149}
150Output {
151name Output1
152xpos 447
153ypos 1055
154}
155end_group
156