Advertisement
nistaani

Nuke - DeadFrame

Feb 19th, 2019
108
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.59 KB | None | 0 0
  1. set cut_paste_input [stack 0]
  2. version 11.2 v4
  3. push $cut_paste_input
  4. Group {
  5. name DeadFrame
  6. help "This tool fixes broken frames from a render or otherwise. Generally speaking the FrameBlend method is the most reliable way to use this tool, but occasionally one of the motion estimation methods will give good results, especially when using Kronos under nuke 9.\n\nEnter or select the number of the Dead Frame, then you can choose from the following Fix Methods:\n- Frame Blend (aka mix at .5) the previous and next frames\n- Hold the previous frame\n- Hold the next frame\n- Motion Estimate - creates a new frame based on the motion between the previous and next frames using an Oflow node.\n- Motion Estimate (Kronos...) - creates a new frame based on the motion between the previous and next frames using a Kronos node. (this setting is for NukeX 9 only.)"
  7. knobChanged "\nk = nuke.thisKnob()\nif k.name() == 'fixMethod':\n if k.getValue() == 4.0:\n if nuke.NUKE_VERSION_MAJOR != 9:\n k.setValue(3)\n nuke.message('This feature is only available in NukeX 9 or higher')\n"
  8. tile_color 0x557fffff
  9. selected true
  10. xpos -423
  11. ypos 1571
  12. addUserKnob {20 DeadFrameTab l DeadFrame}
  13. addUserKnob {3 deadFrame l "Dead Frame"}
  14. deadFrame 1001
  15. addUserKnob {4 fixMethod l "Fix Method" t "Frame Blend: Dissolves previous and next frames.\nHold Frame Before: Holds the frame before the dead frame\nHold Frame After: Holds the frame after the dead frame\t\nMotion Estimate (Oflow): tries to rebuild the dead frame from the frames around it (beta)" -STARTLINE M {"Frame Blend" "Hold Frame Before" "Hold Frame After" "Motion Estimate (Oflow)" "Motion Estimate (Kronos Nukex 9 only)" "" "" ""}}
  16. addUserKnob {22 setCurrentFrame l "Set to Current Frame" T "n = nuke.thisNode()\nn\['deadFrame'].setValue(nuke.frame())" +STARTLINE}
  17. }
  18. BackdropNode {
  19. inputs 0
  20. name BackdropNode1
  21. tile_color 0x7171c600
  22. label "Motion Estimate\n(Oflow)"
  23. note_font_size 42
  24. xpos 829
  25. ypos -520
  26. bdwidth 288
  27. bdheight 430
  28. }
  29. BackdropNode {
  30. inputs 0
  31. name BackdropNode2
  32. tile_color 0xaaaaaa00
  33. label "Frame Blend\n"
  34. note_font_size 42
  35. xpos -2
  36. ypos -514
  37. bdwidth 251
  38. bdheight 419
  39. }
  40. BackdropNode {
  41. inputs 0
  42. name BackdropNode3
  43. tile_color 0xaaaaaa00
  44. label "Hold Frame \nBefore"
  45. note_font_size 42
  46. xpos 284
  47. ypos -513
  48. bdwidth 232
  49. bdheight 417
  50. }
  51. BackdropNode {
  52. inputs 0
  53. name BackdropNode4
  54. tile_color 0xaaaaaa00
  55. label "Hold Frame\nAfter"
  56. note_font_size 42
  57. xpos 554
  58. ypos -515
  59. bdwidth 232
  60. bdheight 417
  61. }
  62. BackdropNode {
  63. inputs 0
  64. name BackdropNode5
  65. tile_color 0x7171c600
  66. label "Motion Estimate\n(Kronos NukeX 9)"
  67. note_font_size 42
  68. xpos 1162
  69. ypos -519
  70. bdwidth 353
  71. bdheight 440
  72. }
  73. Input {
  74. inputs 0
  75. name Input1
  76. xpos -169
  77. ypos -692
  78. }
  79. Dot {
  80. name Dot10
  81. xpos -135
  82. ypos -573
  83. }
  84. set N21491220 [stack 0]
  85. Dot {
  86. name Dot2
  87. xpos 114
  88. ypos -573
  89. }
  90. set Nd8f5f30 [stack 0]
  91. Dot {
  92. name Dot1
  93. xpos 408
  94. ypos -573
  95. }
  96. set Ne8d5330 [stack 0]
  97. Dot {
  98. name Dot4
  99. xpos 663
  100. ypos -573
  101. }
  102. set N1f0335c0 [stack 0]
  103. Dot {
  104. name Dot5
  105. xpos 901
  106. ypos -573
  107. }
  108. FrameHold {
  109. first_frame {{frame==deadFrame?frame-1:frame}}
  110. name FrameHold5
  111. xpos 867
  112. ypos -372
  113. }
  114. Dot {
  115. name Dot6
  116. xpos 901
  117. ypos -322
  118. }
  119. set Nd7b3060 [stack 0]
  120. Dot {
  121. name Dot7
  122. xpos 1332
  123. ypos -322
  124. }
  125. Kronos {
  126. input.first 240
  127. input.last 341
  128. Advanced 1
  129. flickerCompensation true
  130. name Kronos1
  131. xpos 1298
  132. ypos -227
  133. }
  134. push $Nd7b3060
  135. OFXuk.co.thefoundry.time.oflow_v100 {
  136. method Motion
  137. timing "Source Frame"
  138. timingFrame {{frame==deadFrame?frame+.5:frame}}
  139. timingSpeed 0.5
  140. filtering Normal
  141. warpMode Normal
  142. correctLuminance false
  143. automaticShutterTime false
  144. shutterTime 0
  145. shutterSamples 1
  146. vectorDetail 0.2
  147. smoothness 0.5
  148. blockSize 1
  149. Tolerances 0
  150. weightRed 0.3
  151. weightGreen 0.6
  152. weightBlue 0.1
  153. showVectors false
  154. cacheBreaker false
  155. name OFlow3
  156. xpos 867
  157. ypos -229
  158. }
  159. push $N1f0335c0
  160. FrameHold {
  161. first_frame {{frame==deadFrame?frame+1:frame}}
  162. name FrameHold4
  163. label "Hold Frame After"
  164. xpos 629
  165. ypos -372
  166. }
  167. push $Ne8d5330
  168. FrameHold {
  169. first_frame {{frame==deadFrame?frame-1:frame}}
  170. name FrameHold7
  171. label "Hold Frame Before"
  172. xpos 374
  173. ypos -371
  174. }
  175. push $Nd8f5f30
  176. FrameHold {
  177. first_frame {{frame==deadFrame?frame-1:frame}}
  178. name FrameHold1
  179. xpos 80
  180. ypos -372
  181. }
  182. TimeWarp {
  183. lookup {{frame==deadFrame?frame+.5:frame C x1 1 x100 100}}
  184. time ""
  185. name TimeWarp1
  186. selected true
  187. xpos 80
  188. ypos -236
  189. }
  190. Switch {
  191. inputs 5
  192. which {{fixMethod}}
  193. name Switch2
  194. xpos 74
  195. ypos 252
  196. }
  197. Dot {
  198. name Dot3
  199. xpos 108
  200. ypos 322
  201. }
  202. push $N21491220
  203. Switch {
  204. inputs 2
  205. which {{frame==deadFrame?1:0}}
  206. name Switch1
  207. xpos -169
  208. ypos 319
  209. }
  210. Output {
  211. name Output1
  212. xpos -169
  213. ypos 396
  214. }
  215. end_group
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement