comp_V01

STMap Reference Frame v1.1

Jan 7th, 2020
167
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. version 11.3 v2
  2. Group {
  3. name STMapRefFrame
  4. addUserKnob {20 stmap}
  5. addUserKnob {41 format l "set input format" T Reformat1.format}
  6. addUserKnob {26 ""}
  7. addUserKnob {41 ref_frame l "New Reference Frame" T FrameHold1.first_frame}
  8. addUserKnob {41 setframe l "Set to this frame" -STARTLINE T Controller.setframe}
  9. addUserKnob {41 precision T Controller.precision}
  10. addUserKnob {41 remove_outside l "remove unusable areas" t "your input stmap needs an alpha for this to work" T Controller.remove_outside}
  11. addUserKnob {26 "" +STARTLINE}
  12. addUserKnob {26 info l "" +STARTLINE T "Your input stmap needs an alpha channel."}
  13. addUserKnob {20 advanced l reverse_stmap}
  14. addUserKnob {41 scale l "warp resolution" t "1 equals an reverse stmap resolution of 1000 square" T Reformat3.scale}
  15. addUserKnob {26 ""}
  16. addUserKnob {26 copyright l "" +STARTLINE T "© STMap_Ref_Frame v1.1 | by Marcel Pichert"}
  17. }
  18. Camera2 {
  19. inputs 0
  20. translate {0.5 0.5 1}
  21. projection_mode orthographic
  22. focal 25
  23. haperture 25
  24. vaperture 25
  25. near 0.5
  26. far 1.5
  27. name Camera1
  28. xpos -308
  29. ypos 610
  30. addUserKnob {20 User}
  31. addUserKnob {22 reveal l "reveal in explorer" -STARTLINE T "from nuke_utils import reveal_in_explorer;reveal_in_explorer.reveal(nuke.thisNode())"}
  32. }
  33. Input {
  34. inputs 0
  35. name Input1
  36. xpos -537
  37. ypos -394
  38. }
  39. Dot {
  40. name Dot28
  41. xpos -503
  42. ypos -263
  43. }
  44. set N82296c00 [stack 0]
  45. Dot {
  46. name Dot26
  47. xpos -503
  48. ypos 103
  49. }
  50. set N822a9000 [stack 0]
  51. FrameHold {
  52. first_frame 1001
  53. name FrameHold1
  54. xpos -340
  55. ypos 93
  56. }
  57. Dot {
  58. name Dot8
  59. xpos -102
  60. ypos 103
  61. }
  62. set N822a9400 [stack 0]
  63. push $N82296c00
  64. Dot {
  65. name Dot29
  66. xpos 876
  67. ypos -263
  68. }
  69. Expression {
  70. expr0 (x+0.5)/width
  71. expr1 (y+0.5)/height
  72. name Expression3
  73. label st-map
  74. xpos 842
  75. ypos -94
  76. }
  77. set N822a9c00 [stack 0]
  78. Merge2 {
  79. inputs 2
  80. operation from
  81. bbox B
  82. Bchannels {rgba.red rgba.green -rgba.blue -rgba.alpha}
  83. output {rgba.red rgba.green -rgba.blue}
  84. name Merge1
  85. label "\[if \{\[value mix]<1\} \{ value mix \}]"
  86. xpos 842
  87. ypos 99
  88. }
  89. Dot {
  90. name Dot9
  91. xpos 876
  92. ypos 333
  93. }
  94. set N822a6400 [stack 0]
  95. Expression {
  96. expr0 r*-1
  97. expr1 g*-1
  98. name Expression1
  99. xpos 217
  100. ypos 329
  101. }
  102. push $N822a9400
  103. ShuffleCopy {
  104. inputs 2
  105. red red
  106. green green
  107. blue blue
  108. alpha alpha2
  109. out2 forward
  110. name ShuffleCopy1
  111. label "\[value in] -> \[value out]"
  112. xpos -135
  113. ypos 323
  114. }
  115. PositionToPoints2 {
  116. display textured
  117. render_mode textured
  118. P_channel forward
  119. detail {{Reformat3.width/this.width+0.2}}
  120. pointSize 1
  121. name PositionToPoints1
  122. xpos -135
  123. ypos 472
  124. disable {{Controller.precision}}
  125. }
  126. Reformat {
  127. inputs 0
  128. format "1024 1024 0 0 1024 1024 1 square_1K"
  129. name Reformat2
  130. xpos 43
  131. ypos 537
  132. }
  133. Reformat {
  134. type scale
  135. name Reformat3
  136. xpos 43
  137. ypos 630
  138. scale 0.5
  139. }
  140. ScanlineRender {
  141. inputs 3
  142. conservative_shader_sampling false
  143. max_tessellation 1
  144. shutteroffset centred
  145. motion_vectors_type distance
  146. name ScanlineRender1
  147. label "\[if \{\[value samples]>1\} \{ value samples \} ] \[if \{\[value samples]>1\} \{ return samples \} ]\n\[if \{\[value projection_mode] != \"render camera\"\} \{ value projection_mode \}]\n"
  148. xpos -135
  149. ypos 630
  150. }
  151. Reformat {
  152. resize distort
  153. name Reformat1
  154. xpos -135
  155. ypos 748
  156. }
  157. FrameHold {
  158. first_frame {{parent.FrameHold1.knob.first_frame}}
  159. name FrameHold2
  160. xpos -135
  161. ypos 851
  162. }
  163. Dot {
  164. name Dot6
  165. xpos -101
  166. ypos 982
  167. }
  168. set N822a4800 [stack 0]
  169. push $N822a9c00
  170. Dot {
  171. name Dot7
  172. xpos 557
  173. ypos -84
  174. }
  175. Merge2 {
  176. inputs 2
  177. operation from
  178. bbox B
  179. name Merge2
  180. label "\[if \{\[value mix]<1\} \{ value mix \}]"
  181. xpos 523
  182. ypos 978
  183. }
  184. push $N822a9000
  185. Dot {
  186. name Dot3
  187. xpos -503
  188. ypos 1175
  189. }
  190. set N822a5400 [stack 0]
  191. Dot {
  192. name Dot4
  193. xpos -269
  194. ypos 1175
  195. }
  196. set N822a5800 [stack 0]
  197. STMap {
  198. inputs 2
  199. channels {rgba.red rgba.green -rgba.blue none}
  200. uv rgb
  201. name STMap1
  202. xpos 523
  203. ypos 1165
  204. }
  205. push $N822a6400
  206. STMap {
  207. inputs 2
  208. channels {rgba.red rgba.green -rgba.blue none}
  209. uv rgb
  210. name STMap2
  211. xpos 842
  212. ypos 1165
  213. disable {{parent.Controller.precision_toggle}}
  214. }
  215. Dot {
  216. name Dot27
  217. xpos 876
  218. ypos 1648
  219. }
  220. set N822a2400 [stack 0]
  221. Dot {
  222. name Dot2
  223. xpos 876
  224. ypos 1815
  225. }
  226. push $N822a4800
  227. Dot {
  228. name Dot5
  229. xpos -101
  230. ypos 1467
  231. }
  232. push $N822a5800
  233. ChannelMerge {
  234. inputs 2
  235. operation in
  236. name ChannelMerge2
  237. xpos -303
  238. ypos 1450
  239. disable {{parent.Controller.precision_toggle}}
  240. }
  241. ChannelMerge {
  242. inputs 2
  243. operation in
  244. name ChannelMerge1
  245. xpos -303
  246. ypos 1798
  247. }
  248. Dot {
  249. name Dot1
  250. xpos -269
  251. ypos 1990
  252. }
  253. push $N822a2400
  254. push $N822a5400
  255. Merge2 {
  256. inputs 2
  257. operation plus
  258. bbox B
  259. output rgb
  260. name Merge7
  261. label "\[if \{\[value mix]<1\} \{ value mix \}]"
  262. xpos -537
  263. ypos 1644
  264. }
  265. Multiply {
  266. inputs 1+1
  267. channels rgba
  268. value 0
  269. invert_mask true
  270. name Multiply1
  271. label "\[value value]"
  272. xpos -537
  273. ypos 1980
  274. disable {{1-Controller.remove_outside}}
  275. }
  276. Output {
  277. name Output1
  278. xpos -537
  279. ypos 2197
  280. }
  281. NoOp {
  282. inputs 0
  283. name Controller
  284. note_font_size 74
  285. xpos 1125
  286. ypos 1672
  287. addUserKnob {20 User}
  288. addUserKnob {22 setframe l "Set to this frame" T "nuke.toNode(\"FrameHold1\")\[\"first_frame\"].setValue(nuke.frame())" +STARTLINE}
  289. addUserKnob {6 precision_toggle l "precision toggle" +STARTLINE}
  290. precision_toggle {{this.precision}}
  291. addUserKnob {4 precision M {"high (slow)" "low (can cause sliding)" ""}}
  292. precision "low (causes sliding)"
  293. addUserKnob {6 remove_outside l "remove unusable areas" +STARTLINE}
  294. remove_outside false
  295. }
  296. end_group
RAW Paste Data