Nessuna descrizione
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.

ndg_STMapper.gimmick 12KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476
  1. set cut_paste_input [stack 0]
  2. version 10.5 v3
  3. push $cut_paste_input
  4. Group {
  5. name ndg_STMapper
  6. selected true
  7. xpos -94
  8. ypos -196
  9. hide_input true
  10. addUserKnob {20 User l STMapper}
  11. addUserKnob {1 distortionName l "Distortion node"}
  12. distortionName name
  13. addUserKnob {41 mode T settings.mode}
  14. addUserKnob {41 refFrame l " reference frame" -STARTLINE T settings.refFrame}
  15. addUserKnob {41 setCurrFrame l "set current" -STARTLINE T settings.setCurrFrame}
  16. addUserKnob {26 ""}
  17. addUserKnob {41 typeDist l "distortion type" T settings.typeDist}
  18. addUserKnob {26 ""}
  19. addUserKnob {41 overscan T settings.overscan}
  20. addUserKnob {26 ""}
  21. addUserKnob {41 STMap l "output STMap" T settings.STMap}
  22. addUserKnob {26 Prerender}
  23. addUserKnob {41 usePrerender l "Use pre-rendered ST map" T settings.usePrerender}
  24. addUserKnob {41 file l "exr file" T WriteSTMap.file}
  25. addUserKnob {41 Render T WriteSTMap.Render}
  26. addUserKnob {26 ""}
  27. addUserKnob {26 camNote l Note: T "Please connect cam directly without nodes inbetween."}
  28. }
  29. BackdropNode {
  30. inputs 0
  31. name BackdropNode1
  32. tile_color 0x1f1f1fff
  33. label matchmove
  34. note_font_size 22
  35. xpos -101
  36. ypos 1332
  37. bdwidth 324
  38. bdheight 469
  39. }
  40. BackdropNode {
  41. inputs 0
  42. name BackdropNode2
  43. tile_color 0x1f1f1fff
  44. label stabilize
  45. note_font_size 22
  46. xpos 317
  47. ypos 1331
  48. bdwidth 348
  49. bdheight 470
  50. }
  51. BackdropNode {
  52. inputs 0
  53. name BackdropNode3
  54. tile_color 0x1f1f1fff
  55. label "get data"
  56. note_font_size 42
  57. xpos -473
  58. ypos 472
  59. bdwidth 1593
  60. bdheight 164
  61. }
  62. Input {
  63. inputs 0
  64. name Cam
  65. xpos 627
  66. ypos 580
  67. }
  68. Camera2 {
  69. matrix {
  70. {{settings.mode?Cam.parent.input.matrix(refFrame):Cam.parent.input.matrix} {settings.mode?Cam.parent.input.matrix(refFrame):Cam.parent.input.matrix} {settings.mode?Cam.parent.input.matrix(refFrame):Cam.parent.input.matrix} {settings.mode?Cam.parent.input.matrix(refFrame):Cam.parent.input.matrix}}
  71. {{settings.mode?Cam.parent.input.matrix(refFrame):Cam.parent.input.matrix} {settings.mode?Cam.parent.input.matrix(refFrame):Cam.parent.input.matrix} {settings.mode?Cam.parent.input.matrix(refFrame):Cam.parent.input.matrix} {settings.mode?Cam.parent.input.matrix(refFrame):Cam.parent.input.matrix}}
  72. {{settings.mode?Cam.parent.input.matrix(refFrame):Cam.parent.input.matrix} {settings.mode?Cam.parent.input.matrix(refFrame):Cam.parent.input.matrix} {settings.mode?Cam.parent.input.matrix(refFrame):Cam.parent.input.matrix} {settings.mode?Cam.parent.input.matrix(refFrame):Cam.parent.input.matrix}}
  73. {{settings.mode?Cam.parent.input.matrix(refFrame):Cam.parent.input.matrix} {settings.mode?Cam.parent.input.matrix(refFrame):Cam.parent.input.matrix} {settings.mode?Cam.parent.input.matrix(refFrame):Cam.parent.input.matrix} {settings.mode?Cam.parent.input.matrix(refFrame):Cam.parent.input.matrix}}
  74. }
  75. focal {{"\[value Cam.parent.input.focal]"}}
  76. haperture {{"\[value Cam.parent.input.haperture]*settings.overscan"}}
  77. vaperture {{"\[value Cam.parent.input.vaperture]*settings.overscan"}}
  78. name masterCam
  79. xpos 555
  80. ypos 784
  81. }
  82. set N2c5f800 [stack 0]
  83. Dot {
  84. name Dot2
  85. xpos 579
  86. ypos 1407
  87. }
  88. set N2c5f400 [stack 0]
  89. FrameHold {
  90. first_frame {{settings.refFrame}}
  91. name FrameHold2
  92. xpos 545
  93. ypos 1561
  94. }
  95. Dot {
  96. name Dot7
  97. xpos 579
  98. ypos 1635
  99. }
  100. push $N2c5f400
  101. push $N2c5f800
  102. Input {
  103. inputs 0
  104. name Source
  105. xpos -407
  106. ypos 553
  107. number 1
  108. }
  109. set N2c5ec00 [stack 0]
  110. Shuffle {
  111. red black
  112. green black
  113. blue black
  114. alpha black
  115. name Shuffle1
  116. xpos -227
  117. ypos 719
  118. }
  119. Reformat {
  120. type scale
  121. scale {{settings.overscan}}
  122. resize none
  123. black_outside true
  124. name Reformat1
  125. xpos -227
  126. ypos 772
  127. }
  128. set N2c5e400 [stack 0]
  129. Expression {
  130. expr0 (x+0.5)/(width)
  131. expr1 (y+0.5)/(height)
  132. name Expression2
  133. xpos -29
  134. ypos 837
  135. }
  136. NoOp {
  137. name UNDISTORT
  138. xpos -29
  139. ypos 910
  140. }
  141. set N3f817800 [stack 0]
  142. Dot {
  143. name Dot11
  144. xpos -139
  145. ypos 914
  146. }
  147. Dot {
  148. name Dot10
  149. xpos -139
  150. ypos 1035
  151. }
  152. push $N3f817800
  153. LensDistortion {
  154. serializeKnob ""
  155. serialiseKnob "22 serialization::archive 9 0 0 0 0 0 0 0 0 0 0 0 0"
  156. invertDistortion true
  157. name nukeLensDistortion
  158. xpos 143
  159. ypos 938
  160. }
  161. push $N3f817800
  162. LD_3DE4_Radial_Standard_Degree_4 {
  163. channels {rgba.red rgba.green -rgba.blue none}
  164. field_of_view_xa_unit {{"\[value \[value parent.distortionName].field_of_view_xa_unit]"}}
  165. field_of_view_ya_unit {{"\[value \[value parent.distortionName].field_of_view_ya_unit]"}}
  166. field_of_view_xb_unit {{"\[value \[value parent.distortionName].field_of_view_xb_unit]"}}
  167. field_of_view_yb_unit {{"\[value \[value parent.distortionName].field_of_view_yb_unit]"}}
  168. tde4_focal_length_cm {{"\[value \[value parent.distortionName].tde4_focal_length_cm]"}}
  169. tde4_custom_focus_distance_cm {{"\[value \[value parent.distortionName].tde4_custom_focus_distance_cm]"}}
  170. tde4_filmback_width_cm {{"\[value \[value parent.distortionName].tde4_filmback_width_cm]"}}
  171. tde4_filmback_height_cm {{"\[value \[value parent.distortionName].tde4_filmback_height_cm]"}}
  172. tde4_lens_center_offset_x_cm {{"\[value \[value parent.distortionName].tde4_lens_center_offset_x_cm]"}}
  173. tde4_lens_center_offset_y_cm {{"\[value \[value parent.distortionName].tde4_lens_center_offset_y_cm]"}}
  174. tde4_pixel_aspect {{"\[value \[value parent.distortionName].tde4_pixel_aspect]"}}
  175. Distortion_Degree_2 {{"\[value \[value parent.distortionName].Distortion_Degree_2]"}}
  176. U_Degree_2 {{"\[value \[value parent.distortionName].U_Degree_2]"}}
  177. V_Degree_2 {{"\[value \[value parent.distortionName].V_Degree_2]"}}
  178. Quartic_Distortion_Degree_4 {{"\[value \[value parent.distortionName].Quartic_Distortion_Degree_4]"}}
  179. U_Degree_4 {{"\[value \[value parent.distortionName].U_Degree_4]"}}
  180. V_Degree_4 {{"\[value \[value parent.distortionName].V_Degree_4]"}}
  181. Phi_Cylindric_Direction {{"\[value \[value parent.distortionName].Phi_Cylindric_Direction]"}}
  182. B_Cylindric_Bending {{"\[value \[value parent.distortionName].B_Cylindric_Bending]"}}
  183. name threeDEqualizerDistortion
  184. xpos -29
  185. ypos 936
  186. }
  187. Switch {
  188. inputs 3
  189. which {{typeDist}}
  190. name Switch3
  191. xpos -29
  192. ypos 1031
  193. }
  194. set N2c46900 [stack 0]
  195. Project3D2 {
  196. inputs 2
  197. name Project3D1
  198. xpos 405
  199. ypos 1031
  200. }
  201. Project3D2 {
  202. inputs 2
  203. name Project3D3
  204. xpos 405
  205. ypos 1442
  206. }
  207. Input {
  208. inputs 0
  209. name Geo
  210. xpos 1025
  211. ypos 586
  212. number 2
  213. }
  214. Dot {
  215. name Dot4
  216. xpos 1059
  217. ypos 1499
  218. }
  219. set N3f857800 [stack 0]
  220. Dot {
  221. name Dot5
  222. xpos 1059
  223. ypos 1549
  224. }
  225. ApplyMaterial {
  226. inputs 2
  227. name ApplyMaterial2
  228. selected true
  229. xpos 405
  230. ypos 1545
  231. }
  232. push $N2c5e400
  233. Dot {
  234. name Dot6
  235. xpos -193
  236. ypos 1635
  237. }
  238. set N3f856c00 [stack 0]
  239. Dot {
  240. name Dot1
  241. xpos -193
  242. ypos 1739
  243. }
  244. ScanlineRender {
  245. inputs 3
  246. conservative_shader_sampling false
  247. motion_vectors_type distance
  248. name ScanlineRender1
  249. xpos 405
  250. ypos 1735
  251. }
  252. push $N2c5f400
  253. Dot {
  254. name Dot16
  255. xpos 267
  256. ypos 1407
  257. }
  258. set N40669c00 [stack 0]
  259. Dot {
  260. name Dot17
  261. xpos 267
  262. ypos 1635
  263. }
  264. push $N40669c00
  265. FrameHold {
  266. first_frame {{settings.refFrame}}
  267. name FrameHold1
  268. xpos 90
  269. ypos 1397
  270. }
  271. push $N2c46900
  272. Project3D2 {
  273. inputs 2
  274. name Project3D2
  275. xpos -29
  276. ypos 1403
  277. }
  278. push $N3f857800
  279. ApplyMaterial {
  280. inputs 2
  281. name ApplyMaterial1
  282. xpos -29
  283. ypos 1495
  284. }
  285. push $N3f856c00
  286. ScanlineRender {
  287. inputs 3
  288. conservative_shader_sampling false
  289. motion_vectors_type distance
  290. name ScanlineRender2
  291. xpos -29
  292. ypos 1631
  293. }
  294. Switch {
  295. inputs 2
  296. which {{settings.mode}}
  297. name Switch1
  298. xpos -29
  299. ypos 1883
  300. }
  301. NoOp {
  302. name DISTORT
  303. xpos -29
  304. ypos 2129
  305. }
  306. set N4026f400 [stack 0]
  307. Dot {
  308. name Dot12
  309. xpos -139
  310. ypos 2131
  311. }
  312. Dot {
  313. name Dot13
  314. xpos -139
  315. ypos 2252
  316. }
  317. push $N4026f400
  318. Dot {
  319. name Dot15
  320. xpos 160
  321. ypos 2133
  322. }
  323. LensDistortion {
  324. serializeKnob ""
  325. serialiseKnob "22 serialization::archive 9 0 0 0 0 0 0 0 0 0 0 0 0"
  326. name nukeLensDistortion1
  327. xpos 126
  328. ypos 2248
  329. }
  330. push $N4026f400
  331. LD_3DE4_Radial_Standard_Degree_4 {
  332. channels {rgba.red rgba.green -rgba.blue none}
  333. direction distort
  334. field_of_view_xa_unit {{"\[value \[value parent.distortionName].field_of_view_xa_unit]"}}
  335. field_of_view_ya_unit {{"\[value \[value parent.distortionName].field_of_view_ya_unit]"}}
  336. field_of_view_xb_unit {{"\[value \[value parent.distortionName].field_of_view_xb_unit]"}}
  337. field_of_view_yb_unit {{"\[value \[value parent.distortionName].field_of_view_yb_unit]"}}
  338. tde4_focal_length_cm {{"\[value \[value parent.distortionName].tde4_focal_length_cm]"}}
  339. tde4_custom_focus_distance_cm {{"\[value \[value parent.distortionName].tde4_custom_focus_distance_cm]"}}
  340. tde4_filmback_width_cm {{"\[value \[value parent.distortionName].tde4_filmback_width_cm]"}}
  341. tde4_filmback_height_cm {{"\[value \[value parent.distortionName].tde4_filmback_height_cm]"}}
  342. tde4_lens_center_offset_x_cm {{"\[value \[value parent.distortionName].tde4_lens_center_offset_x_cm]"}}
  343. tde4_lens_center_offset_y_cm {{"\[value \[value parent.distortionName].tde4_lens_center_offset_y_cm]"}}
  344. tde4_pixel_aspect {{"\[value \[value parent.distortionName].tde4_pixel_aspect]"}}
  345. Distortion_Degree_2 {{"\[value \[value parent.distortionName].Distortion_Degree_2]"}}
  346. U_Degree_2 {{"\[value \[value parent.distortionName].U_Degree_2]"}}
  347. V_Degree_2 {{"\[value \[value parent.distortionName].V_Degree_2]"}}
  348. Quartic_Distortion_Degree_4 {{"\[value \[value parent.distortionName].Quartic_Distortion_Degree_4]"}}
  349. U_Degree_4 {{"\[value \[value parent.distortionName].U_Degree_4]"}}
  350. V_Degree_4 {{"\[value \[value parent.distortionName].V_Degree_4]"}}
  351. Phi_Cylindric_Direction {{"\[value \[value parent.distortionName].Phi_Cylindric_Direction]"}}
  352. B_Cylindric_Bending {{"\[value \[value parent.distortionName].B_Cylindric_Bending]"}}
  353. name threeDEqualizerDistortion1
  354. xpos -29
  355. ypos 2155
  356. }
  357. Switch {
  358. inputs 3
  359. which {{typeDist}}
  360. name Switch4
  361. xpos -29
  362. ypos 2248
  363. }
  364. set N2c47680 [stack 0]
  365. Dot {
  366. name Dot14
  367. xpos 5
  368. ypos 2481
  369. }
  370. set N402bdc00 [stack 0]
  371. Reformat {
  372. type "to box"
  373. format "3200 1800 0 0 3200 1800 1 3200_1800"
  374. box_width {{Source.width}}
  375. box_height {{Source.height}}
  376. resize none
  377. pbb true
  378. name Reformat2
  379. xpos -29
  380. ypos 2645
  381. }
  382. Dot {
  383. name Dot8
  384. label "ST map out"
  385. note_font_size 22
  386. xpos 5
  387. ypos 3002
  388. }
  389. Dot {
  390. name Dot3
  391. xpos 5
  392. ypos 3080
  393. }
  394. push $N402bdc00
  395. push $N2c5ec00
  396. Reformat {
  397. type scale
  398. scale {{settings.overscan}}
  399. resize none
  400. pbb true
  401. name Reformat7
  402. xpos -407
  403. ypos 776
  404. }
  405. STMap {
  406. inputs 2
  407. channels rgba
  408. uv rgb
  409. name STMap2
  410. xpos -407
  411. ypos 2477
  412. }
  413. Reformat {
  414. type "to box"
  415. format "3200 1800 0 0 3200 1800 1 3200_1800"
  416. box_width {{Source.width}}
  417. box_height {{Source.height}}
  418. resize none
  419. pbb true
  420. name Reformat8
  421. xpos -407
  422. ypos 2652
  423. }
  424. Dot {
  425. name Dot9
  426. label "RGBA out"
  427. note_font_size 22
  428. xpos -373
  429. ypos 2997
  430. }
  431. Switch {
  432. inputs 2
  433. which {{settings.STMap}}
  434. name Switch2
  435. xpos -407
  436. ypos 3076
  437. }
  438. Output {
  439. name Output1
  440. xpos -407
  441. ypos 3248
  442. }
  443. NoOp {
  444. inputs 0
  445. name settings
  446. xpos 98
  447. ypos 590
  448. hide_input true
  449. addUserKnob {20 User}
  450. addUserKnob {6 usePrerender l "Use prerender" +STARTLINE}
  451. addUserKnob {6 STMap l "output STMap" +STARTLINE}
  452. addUserKnob {22 setCurrFrame l "set current" T "frame = nuke.frame()\n\nnuke.thisNode()\['refFrame'].setValue(frame)" +STARTLINE}
  453. addUserKnob {4 mode M {matchmove stabilize}}
  454. mode stabilize
  455. addUserKnob {4 typeDist l "distortion type" M {3de nuke none}}
  456. typeDist none
  457. addUserKnob {3 refFrame l "reference frame"}
  458. refFrame 1015
  459. addUserKnob {7 overscan}
  460. overscan 1.1
  461. }
  462. push $N2c47680
  463. Write {
  464. file_type exr
  465. reading {{settings.usePrerender}}
  466. checkHashOnRead false
  467. version 6
  468. beforeRender createWriteDir.createWriteDir()
  469. name WriteSTMap
  470. xpos 78
  471. ypos 2299
  472. postage_stamp true
  473. }
  474. end_group
  475. # Creation Time=Thu Jul 27 10:12:05 2017
  476. # Creator=Andy