No Description
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

SHA_Dummy.gimmick 15KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495
  1. set cut_paste_input [stack 0]
  2. version 11.3 v5
  3. push $cut_paste_input
  4. Dot {
  5. name Dot1
  6. label BG
  7. note_font_size 24
  8. selected true
  9. xpos 1315
  10. ypos -317
  11. }
  12. Retime {
  13. input.first 1001
  14. input.last 1221
  15. output.first 1001
  16. output.last 1111
  17. speed 2
  18. shutter 0
  19. time ""
  20. name Retime3
  21. selected true
  22. xpos 1281
  23. ypos -253
  24. }
  25. Reformat {
  26. format "3200 1800 0 0 3200 1800 1 "
  27. name Reformat2
  28. selected true
  29. xpos 1281
  30. ypos -218
  31. }
  32. Transform {
  33. translate {1128 -470}
  34. scale {{FOV_Calculator2.factor x1001 0 x1018 0}}
  35. center {1580 916}
  36. name Transform2
  37. selected true
  38. xpos 1281
  39. ypos -160
  40. }
  41. set Nc5e51400 [stack 0]
  42. push 0
  43. push 0
  44. Dot {
  45. name Dot2
  46. label FG
  47. note_font_size 24
  48. selected true
  49. xpos 1654
  50. ypos -309
  51. }
  52. Group {
  53. name LensMeta1
  54. selected true
  55. xpos 1620
  56. ypos -202
  57. addUserKnob {20 User}
  58. addUserKnob {7 focallength l "focal length"}
  59. focallength {{"\[metadata \"ext/Lens Focal Length\"]"}}
  60. addUserKnob {7 focusdistance l "focus distance"}
  61. focusdistance {{"\[metadata \"ext/Lens Focus Distance\"]"}}
  62. }
  63. Input {
  64. inputs 0
  65. name Input1
  66. xpos 0
  67. }
  68. Output {
  69. name Output1
  70. xpos 0
  71. ypos 300
  72. }
  73. end_group
  74. Group {
  75. name FOV_Calculator2
  76. selected true
  77. xpos 1620
  78. ypos -157
  79. addUserKnob {20 User}
  80. addUserKnob {26 BG_info l "Panasonic GH5s" T "has a sensor size of 17.3 x 13 mm"}
  81. addUserKnob {7 lengthBG l "length BG" R 0 100}
  82. lengthBG 17.3
  83. addUserKnob {7 focallengthBG l "focal length BG" R 0 200}
  84. focallengthBG 10
  85. addUserKnob {7 angleBG l "angle BG" t "\t\t\t\t\t\t" R 0 180}
  86. angleBG {{"2 * atan (lengthBG / 2 / focallengthBG) * 180 / pi"}}
  87. addUserKnob {26 ""}
  88. addUserKnob {26 FG_Info l "Alexa Mini" T "has a sensor size of 26.4 x 14.85 mm"}
  89. addUserKnob {26 Lens_Info l "Vantage One" T "Lenses: 17.5 21 25 32 40 50 65 90 120"}
  90. addUserKnob {7 lengthFG l "length FG" R 0 100}
  91. lengthFG 26.4
  92. addUserKnob {7 focallengthFG l "focal length FG" R 0 200}
  93. focallengthFG {{"\[metadata \"ext/Lens Focal Length\"]"}}
  94. addUserKnob {7 angleFG l "angle FG" R 0 180}
  95. angleFG {{"2 * atan (lengthFG / 2 / focallengthFG) * 180 / pi"}}
  96. addUserKnob {26 ""}
  97. addUserKnob {7 factor l "scaling factor for BG" R 0 5}
  98. factor {{angleBG/angleFG}}
  99. }
  100. Input {
  101. inputs 0
  102. name Input1
  103. selected true
  104. xpos 1
  105. ypos 237
  106. }
  107. Output {
  108. name Output1
  109. xpos 1
  110. ypos 299
  111. }
  112. end_group
  113. IBKGizmoV3 {
  114. inputs 3
  115. name IBKGizmoV3_2
  116. xpos 1620
  117. ypos 111
  118. st pick
  119. colour {0.02357788756 0.03127772361 0.1555380225}
  120. }
  121. Constant {
  122. inputs 0
  123. color 100
  124. format "3200 1800 0 0 3200 1800 1 "
  125. name Constant1
  126. selected true
  127. xpos 980
  128. ypos -314
  129. }
  130. Dot {
  131. name Dot4
  132. label Depth
  133. note_font_size 24
  134. selected true
  135. xpos 1014
  136. ypos -121
  137. }
  138. Dot {
  139. name Dot3
  140. selected true
  141. xpos 1014
  142. ypos 78
  143. }
  144. push $Nc5e51400
  145. Copy {
  146. inputs 2
  147. from0 rgba.alpha
  148. to0 depth.Z
  149. name Copy2
  150. selected true
  151. xpos 1281
  152. ypos 68
  153. }
  154. Group {
  155. name OpticalZDefocus2
  156. help "<b>OpticalZDefocus</b> is a physically accurate ZDefocus, which controls circle of confusion (coc) size based on lens geometry using the depth of field equation. \n\nSet your lens and film-back characteristics, your focus distance, and adjust the size of your bokeh with the aperture size, just like a real lens."
  157. tile_color 0xcc804eef
  158. selected true
  159. xpos 1281
  160. ypos 127
  161. addUserKnob {20 OpticalZDefocus}
  162. addUserKnob {41 channels T _ZDEFOCUS_.channels}
  163. addUserKnob {41 useGPUIfAvailable l "Use GPU if available" T _ZDEFOCUS_.useGPUIfAvailable}
  164. addUserKnob {26 ""}
  165. addUserKnob {41 depth_channel l "depth channel" t "Choose the channel that contains your Z-Depth" T CHANNEL_CHOOSER_DEPTH.Zchan}
  166. addUserKnob {26 spacer l " &nbsp; &nbsp; " -STARTLINE T " "}
  167. addUserKnob {6 unpremult_z l " &nbsp; &nbsp; <b>unpremult</b> by" t "Unpremultiply the depth layer by the selected channel" -STARTLINE}
  168. addUserKnob {41 depth_alpha l "" -STARTLINE T CHANNEL_CHOOSER_ALPHA.Zchan}
  169. addUserKnob {22 set_z l "Sample Z" t "Sets the focal distance to the Z channel value at the current focal point on the current frame." T "from __future__ import with_statement\n\nn = nuke.thisNode()\ns = n\['s']\nz_coord = n\['sample_z']\n\nwith n:\n ds = nuke.toNode('DepthSampler')\n zsample = ds.sample('red', z_coord.getValue(0), z_coord.getValue(1))\n\nif s.isAnimated():\n s.setValueAt(zsample, nuke.frame())\nelse:\n s.setValue(zsample)" +STARTLINE}
  170. addUserKnob {12 sample_z l "&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; sample position: " t "Allows you to sample the Z channel at a specific 2d position." -STARTLINE}
  171. sample_z {3418 1254}
  172. addUserKnob {4 depth_unit l "depth unit" t "Set the unit of your zdepth." M {mm cm dm m inch ft}}
  173. depth_unit m
  174. addUserKnob {26 spacer2 l "" t " " -STARTLINE T " "}
  175. addUserKnob {6 show_coc l "show coc" t "Output the calculated direct circle of confusion size map that is used to drive the ZDefocus in direct mode.\n\nUseful for troubleshooting." -STARTLINE}
  176. addUserKnob {6 invert_depth l depth=1/z t "Invert the depth if your input is Nuke ScanlineRender style 1/Z" -STARTLINE}
  177. addUserKnob {26 divider l " " T " "}
  178. addUserKnob {26 ""}
  179. addUserKnob {26 dof_control_label l " " T "<font color=#ddd><b>Depth of Field Control"}
  180. addUserKnob {41 constant_defocus l "constant defocus" t "If enabled, depth-varying defocus is disabled and defocus amount is controlled directly by the max defocus slider." T _ghost_whisper_.constant_defocus}
  181. addUserKnob {7 s l "focus distance" t "Set the focus distance" R 10 1000}
  182. s {{LensMeta1.focusdistance}}
  183. addUserKnob {7 N l f-stop t "Controls the aperture of your lens.\n\nBigger number = greater depth of field. \n\nSmaller numbers = shallower depth of field." R 0.8 44}
  184. N 2.8
  185. addUserKnob {41 max_size l "max defocus" t "Set the max defocus size allowed" T _ZDEFOCUS_.max_size}
  186. addUserKnob {26 ""}
  187. addUserKnob {26 lens_geometry_label l " " T "<font color=#ddd><b>Lens Geometry"}
  188. addUserKnob {22 get_selected_camera l "Get Selected Camera" t "Set the parameters using the selected camera." T "from __future__ import with_statement\n\ndef get_camera():\n ozdef = nuke.thisNode()\n with nuke.root():\n root_par = nuke.root().format().pixelAspect()\n cam = nuke.selectedNodes()\n if len(cam) != 1:\n nuke.message('Please select a single camera node.')\n return\n elif len(cam) == 0:\n nuke.message('Please select a single camera node.')\n return\n else:\n cam = cam\[0]\n if 'Camera2' not in cam.Class():\n nuke.message('Please select a camera node.')\n return\n ozdef\['f'].setValue(cam\['focal'].getValue())\n ozdef\['N'].setValue(cam\['fstop'].getValue())\n # Assuming anamorphic shows have physical haperture*2\n ozdef\['haperture'].setValue(cam\['haperture'].getValue()/root_par)\n\nif __name__ == \"__main__\":\n get_camera()" +STARTLINE}
  189. addUserKnob {41 use_camera_input l "use camera input" -STARTLINE T _ghost_whisper_.use_camera_input}
  190. addUserKnob {7 f l "focal length" t "Set the focal length of the camera" R 0 500}
  191. f {{LensMeta1.focallength}}
  192. addUserKnob {7 haperture t "Horizontal aperture of the film-back / sensor" R 0 50}
  193. haperture 26.4
  194. addUserKnob {26 ""}
  195. addUserKnob {7 min_zdepth l "min zdepth" t "If ZDepth = 0, ZDepth will be set to the specified value.\n\nThe ZDefocus node can be very slow to calculate if you have zero values in your zdepth, for example if you have areas that have transparent alpha. \n\nSet min zdepth to a value slightly smaller than the nearest object in your scene to speed up processing time." R 0 20}
  196. min_zdepth 1
  197. addUserKnob {41 autoLayerSpacing l "automatic layer spacing" T _ZDEFOCUS_.autoLayerSpacing}
  198. addUserKnob {41 layers l "depth layers" T _ZDEFOCUS_.layers}
  199. addUserKnob {41 layerCurve l "layer curve" T _ZDEFOCUS_.layerCurve}
  200. addUserKnob {26 ""}
  201. addUserKnob {20 Filter}
  202. addUserKnob {41 filter_type_1 l "filter type" T _ZDEFOCUS_.filter_type}
  203. addUserKnob {7 aspect_ratio R 0 2}
  204. aspect_ratio 1
  205. addUserKnob {7 filter_shape}
  206. filter_shape 1
  207. addUserKnob {3 blades}
  208. blades 9
  209. addUserKnob {7 roundness}
  210. roundness 0.2
  211. }
  212. ZBlur {
  213. inputs 0
  214. channels rgba
  215. shape 1
  216. name CHANNEL_CHOOSER_DEPTH
  217. xpos -442
  218. ypos 230
  219. disable true
  220. }
  221. ZBlur {
  222. channels rgba
  223. Zchan rgba.alpha
  224. shape 1
  225. name CHANNEL_CHOOSER_ALPHA
  226. xpos -442
  227. ypos 270
  228. disable true
  229. }
  230. Input {
  231. inputs 0
  232. name Input
  233. label "\[value number]"
  234. xpos -308
  235. ypos -16
  236. }
  237. Dot {
  238. name _ghost_whisper_
  239. knobChanged "\n\n\nthisknob = nuke.thisKnob()\nnode = nuke.thisNode()\nnuke.root().begin()\nparent_node = nuke.toNode(node.fullName().split('.')\[0])\nparent_node.begin()\n\ndef enable_knobs(enabled=True, caminput=False):\n if caminput:\n knobs = \['get_selected_camera', 'f', 'haperture']\n else:\n knobs = \['min_zdepth', 'get_selected_camera', 'f', 's', 'N', 'haperture']\n for knob in knobs:\n parent_node\[knob].setEnabled(enabled)\n\nif thisknob.name() == 'constant_defocus':\n is_const = node\['constant_defocus'].getValue()\n if is_const:\n enable_knobs(False)\n else:\n enable_knobs()\n\nif thisknob.name() == 'use_camera_input':\n if thisknob.getValue():\n enable_knobs(False, True)\n cam_input = nuke.nodes.Input(name='InputCamera', xpos=228, ypos=-16)\n parent_node\['f'].setExpression('\[topnode input2].focal')\n parent_node\['haperture'].setExpression('\[topnode input2].haperture')\n if not thisknob.getValue():\n if not parent_node\['constant_defocus'].getValue():\n enable_knobs(True, True)\n parent_node.setInput(2, None)\n nuke.delete(nuke.toNode('InputCamera'))\n parent_node\['f'].clearAnimated()\n parent_node\['haperture'].clearAnimated()\n\n\n"
  240. tile_color 0x129000ff
  241. note_font_size 42
  242. note_font_color 0x7f7f7f01
  243. xpos -274
  244. ypos 114
  245. addUserKnob {20 User}
  246. addUserKnob {6 constant_defocus t "Disables depth-varying defocus. \nBokeh size is directly controlled by max defocus." +STARTLINE}
  247. addUserKnob {6 use_camera_input l "use camera input" t "Creates a camera input pipe instead so that no user action is required." +STARTLINE}
  248. }
  249. set Nc5eb6000 [stack 0]
  250. Dot {
  251. name Dot7
  252. note_font_size 42
  253. note_font_color 0x7f7f7f01
  254. xpos -542
  255. ypos 114
  256. }
  257. AddChannels {
  258. channels depth
  259. channels2 rgba
  260. name AddChannels1
  261. xpos -576
  262. ypos 144
  263. }
  264. set Nc5ef3800 [stack 0]
  265. push $Nc5ef3800
  266. Copy {
  267. inputs 2
  268. from0 {{{CHANNEL_CHOOSER_DEPTH.Zchan}}}
  269. to0 rgba.red
  270. from1 {{{CHANNEL_CHOOSER_ALPHA.Zchan}}}
  271. to1 rgba.alpha
  272. bbox B
  273. name _CHOOSE_CHANNELS_
  274. xpos -576
  275. ypos 218
  276. disable {{hasError}}
  277. }
  278. Unpremult {
  279. name _UNPREMULT_Z_
  280. xpos -576
  281. ypos 310
  282. disable {{!parent.unpremult_z}}
  283. }
  284. Expression {
  285. temp_name3 max_dist
  286. temp_expr3 100000
  287. expr0 "r == 0 ? max_dist : 1/r"
  288. channel1 none
  289. channel2 none
  290. name DepthInvert
  291. xpos -576
  292. ypos 350
  293. disable {{!parent.invert_depth}}
  294. }
  295. set Nc5ef2c00 [stack 0]
  296. Multiply {
  297. channels rgb
  298. value {{"parent.depth_unit == 1 ? 10 : parent.depth_unit == 2 ? 100 : parent.depth_unit == 3 ? 1000 : parent.depth_unit == 4 ? 25.4 : parent.depth_unit == 5 ? 304.8 : 1"}}
  299. name _UNIT_MULTIPLIER_
  300. xpos -576
  301. ypos 390
  302. addUserKnob {20 User}
  303. addUserKnob {7 depth_unit_divider R 0 500}
  304. depth_unit_divider {{"parent.depth_unit == 1 ? 10 : parent.depth_unit == 2 ? 100 : parent.depth_unit == 3 ? 1000 : parent.depth_unit == 4 ? 25.4 : parent.depth_unit == 5 ? 304.8 : 1"}}
  305. }
  306. Expression {
  307. temp_name0 zdepth
  308. temp_expr0 "r < parent.min_zdepth* _UNIT_MULTIPLIER_.value ? parent.min_zdepth* _UNIT_MULTIPLIER_.value : r"
  309. temp_name1 focus_dist
  310. temp_expr1 "s * _UNIT_MULTIPLIER_.value"
  311. temp_name2 coc
  312. temp_expr2 "(fabs(focus_dist - zdepth) * pow(f,2) / (N * zdepth * (focus_dist - f)))"
  313. temp_name3 coc_px
  314. temp_expr3 "fabs(coc / haperture * input.width / 2)"
  315. channel0 rgba
  316. expr0 "parent.constant_defocus ? parent.max_size : coc_px"
  317. channel1 none
  318. name Generate_Direct_Z
  319. selected true
  320. xpos -576
  321. ypos 429
  322. addUserKnob {20 Optical l "Optical Characteristics"}
  323. addUserKnob {7 f l "focal length" R 0 500}
  324. f {{parent.f}}
  325. addUserKnob {7 N l f-stop R 0 44}
  326. N {{parent.N}}
  327. addUserKnob {7 haperture R 0 50}
  328. haperture {{parent.haperture}}
  329. addUserKnob {7 s l "focus distance" R 0 1000}
  330. s {{parent.s}}
  331. }
  332. Dot {
  333. name Dot3
  334. note_font_size 42
  335. note_font_color 0x7f7f7f01
  336. xpos -542
  337. ypos 514
  338. }
  339. set Nc5ef2000 [stack 0]
  340. Dot {
  341. name Dot2
  342. note_font_size 42
  343. note_font_color 0x7f7f7f01
  344. xpos -542
  345. ypos 1034
  346. }
  347. Input {
  348. inputs 0
  349. name InputFilter
  350. label "\[value number]"
  351. xpos 94
  352. ypos -16
  353. number 1
  354. }
  355. Reformat {
  356. type scale
  357. scale {1 {1/parent.aspect_ratio}}
  358. resize distort
  359. name _aspect_ratio_1
  360. xpos 94
  361. ypos 390
  362. }
  363. Dot {
  364. inputs 0
  365. name Dot1
  366. label " Default Filter Input"
  367. note_font "Helvetica Bold Bold Bold Bold Bold Bold Bold Bold Bold Bold Bold Bold Bold Bold Bold Bold Bold Bold Bold Bold Bold Bold Bold Bold Bold Bold Bold Bold Bold Bold Bold Bold Bold Bold Bold Bold Bold"
  368. note_font_size 24
  369. note_font_color 0xff000000
  370. xpos 262
  371. ypos 314
  372. }
  373. Reformat {
  374. type "to box"
  375. box_fixed true
  376. name Reformat1
  377. xpos 228
  378. ypos 390
  379. }
  380. Flare {
  381. position {{width/2} {height/2}}
  382. radius {75 88 91}
  383. inner_color 1
  384. name Flare3
  385. xpos 228
  386. ypos 430
  387. }
  388. Reformat {
  389. type scale
  390. scale {1 {1/parent.aspect_ratio}}
  391. resize distort
  392. name _aspect_ratio_2
  393. xpos 228
  394. ypos 470
  395. }
  396. Shuffle {
  397. alpha red
  398. name Shuffle1
  399. label "\[value in]"
  400. xpos 228
  401. ypos 504
  402. }
  403. Switch {
  404. inputs 2
  405. which {{"\[exists parent.input1]"}}
  406. name Switch3
  407. xpos 94
  408. ypos 510
  409. }
  410. Dot {
  411. name Dot6
  412. label " "
  413. note_font "Helvetica Bold Bold Bold Bold Bold Bold Bold Bold Bold Bold Bold Bold Bold Bold Bold Bold Bold Bold Bold Bold Bold Bold Bold Bold Bold Bold Bold Bold Bold Bold Bold Bold Bold Bold Bold Bold Bold"
  414. note_font_size 24
  415. note_font_color 0xff000000
  416. xpos 128
  417. ypos 594
  418. }
  419. push $Nc5ef2000
  420. push $Nc5eb6000
  421. Dot {
  422. name Dot4
  423. label " "
  424. note_font "Helvetica Bold Bold Bold Bold Bold Bold Bold Bold Bold"
  425. note_font_size 24
  426. note_font_color 0xa5a5a501
  427. xpos -274
  428. ypos 434
  429. }
  430. add_layer {opticalzdefocus opticalzdefocus.Z}
  431. Copy {
  432. inputs 2
  433. from0 rgba.red
  434. to0 opticalzdefocus.Z
  435. bbox B
  436. name _Copy_ZDepth_
  437. xpos -308
  438. ypos 504
  439. }
  440. ZDefocus2 {
  441. inputs 2
  442. channels rgba
  443. z_channel opticalzdefocus.Z
  444. math direct
  445. focal_point {16540 12700}
  446. size 1
  447. max_size 100
  448. legacy_resize_mode false
  449. show_legacy_resize_mode false
  450. use_input_channels true
  451. aspect {{parent.aspect_ratio}}
  452. blades {{parent.blades}}
  453. roundness {{parent.roundness}}
  454. inner_feather 0.28
  455. catadioptric_size 0.375
  456. name _ZDEFOCUS_
  457. xpos -308
  458. ypos 584
  459. }
  460. Remove {
  461. channels opticalzdefocus
  462. name Remove1
  463. xpos -308
  464. ypos 659
  465. }
  466. Switch {
  467. inputs 2
  468. which {{parent.show_coc}}
  469. name _SHOW_COC_
  470. xpos -308
  471. ypos 1030
  472. }
  473. Output {
  474. name Output1
  475. xpos -308
  476. ypos 1230
  477. }
  478. push $Nc5ef2c00
  479. NoOp {
  480. name DepthSampler
  481. xpos -710
  482. ypos 350
  483. addUserKnob {20 User}
  484. addUserKnob {7 sval R 0 1000}
  485. }
  486. end_group
  487. Merge2 {
  488. inputs 2
  489. name Merge2
  490. selected true
  491. xpos 1281
  492. ypos 334
  493. }
  494. # Creation Time=Tue May 5 12:19:08 2020
  495. # Creator=ne