Advertisement
Totheroo

Nuke - Roughen Edges Nodes

Oct 22nd, 2021
2,899
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
TCL 4.86 KB | None | 0 0
  1. set cut_paste_input [stack 0]
  2. version 12.2 v7
  3. push $cut_paste_input
  4. Group {
  5.  name roughenEdges1_1
  6.  help "Takes the alpha and distorts it using a random noise pattern. If you have a solid rotoshape which looks too smooth, this will give it a rough edge."
  7.  addUserKnob {20 User l "Edge Roughen"}
  8.  addUserKnob {41 noiseSize l "Noise size" t "Smaller number gives a fine, grainy edge. Large number gives blobbier edges." T Noise3.size}
  9.  addUserKnob {7 myEvo l "Noise Evolution (Z)" R 0 100}
  10.  addUserKnob {12 myNoisePos l "Noise Position"}
  11.  addUserKnob {26 ""}
  12.  addUserKnob {41 distortAmount l "Distort Amount" t "Low number barely effects the image, higher numbers increase the 'reach' of the effect, spreading the shape out further." T IDistort2.uv_scale}
  13.  addUserKnob {41 coreMix l "Core Mix back" t "To stop the effect eating into the shape too much, you can bring back the core." T Merge4.mix}
  14.  addUserKnob {7 eroder l "Pre Erode/Dilate" t "If the roughened edge spreads too far out of your intended area, this will erode the shape a little before the roughening is applied." R -5 5}
  15.  addUserKnob {41 blurSize l "Extra Blur" t "Adds a blur on the end." T Blur2.size}
  16.  addUserKnob {26 ""}
  17.  addUserKnob {6 shuffleRGB l "Shuffle A to RGBA" +STARTLINE}
  18.  shuffleRGB true
  19. }
  20.  Input {
  21.   inputs 0
  22.   name Input1
  23.   xpos 400
  24.   ypos -329
  25.  }
  26.  Dilate {
  27.   channels alpha
  28.   size {{parent.eroder}}
  29.   name Dilate2
  30.   xpos 400
  31.   ypos -269
  32.  }
  33.  Dot {
  34.   name Dot2
  35.   xpos 434
  36.   ypos -198
  37.  }
  38. set Nb3d3fc00 [stack 0]
  39.  Dot {
  40.   name Dot1
  41.   xpos 544
  42.   ypos -198
  43.  }
  44.  Dilate {
  45.   channels alpha
  46.   size -2.6
  47.   name Dilate1
  48.   xpos 510
  49.   ypos -13
  50.  }
  51.  Blur {
  52.   channels alpha
  53.   size 5
  54.   name Blur1
  55.   label "\[value size]"
  56.   xpos 510
  57.   ypos 46
  58.  }
  59. push $Nb3d3fc00
  60.  Shuffle {
  61.   red black
  62.   green black
  63.   blue black
  64.   alpha black
  65.   name Shuffle1
  66.   xpos 290
  67.   ypos -201
  68.  }
  69.  Noise {
  70.   size 1.15
  71.   zoffset {{parent.myEvo}}
  72.   octaves 1
  73.   lacunarity 6.7
  74.   gain 0.96
  75.   translate {{parent.myNoisePos} {parent.myNoisePos}}
  76.   center {960 540}
  77.   name Noise3
  78.   selected true
  79.   xpos 290
  80.   ypos -137
  81.  }
  82. push $Nb3d3fc00
  83.  Copy {
  84.   inputs 2
  85.   from0 rgba.alpha
  86.   to0 forward.u
  87.   from1 rgba.alpha
  88.   to1 forward.v
  89.   name Copy3
  90.   xpos 400
  91.   ypos -146
  92.  }
  93.  IDistort {
  94.   channels alpha
  95.   uv {forward.u -forward.v}
  96.   uv_offset 0.28
  97.   uv_scale {{parent.IDistort2.uv_scale i}}
  98.   name IDistort1
  99.   xpos 400
  100.   ypos -77
  101.  }
  102.  IDistort {
  103.   channels alpha
  104.   uv {-forward.u forward.v}
  105.   uv_offset 0.0105
  106.   uv_scale 7.8
  107.   name IDistort2
  108.   xpos 400
  109.   ypos -13
  110.  }
  111.  Merge2 {
  112.   inputs 2
  113.   operation screen
  114.   mix 0
  115.   name Merge4
  116.   xpos 400
  117.   ypos 55
  118.  }
  119.  Blur {
  120.   channels alpha
  121.   size 1.8
  122.   name Blur2
  123.   label "\[value size]"
  124.   xpos 400
  125.   ypos 110
  126.  }
  127.  Shuffle {
  128.   red alpha
  129.   green alpha
  130.   blue alpha
  131.   name Shuffle2
  132.   xpos 400
  133.   ypos 183
  134.   disable {{1-parent.shuffleRGB}}
  135.  }
  136.  Output {
  137.   name Output1
  138.   xpos 400
  139.   ypos 279
  140.  }
  141. end_group
  142. push $cut_paste_input
  143. Group {
  144.  name roughenEdges2_1
  145.  addUserKnob {20 User}
  146.  addUserKnob {16 Border}
  147.  Border 0.05
  148.  addUserKnob {7 EdgeSharpness}
  149.  EdgeSharpness 0.1
  150.  addUserKnob {7 Scale}
  151.  Scale 0.01
  152.  addUserKnob {12 Offset}
  153.  addUserKnob {12 Center}
  154.  addUserKnob {16 Size}
  155.  Size 1
  156.  addUserKnob {7 Evolution}
  157.  Evolution 0.5
  158. }
  159.  Input {
  160.   inputs 0
  161.   name Input1
  162.   selected true
  163.   xpos -466
  164.   ypos -364
  165.  }
  166.  Unpremult {
  167.   name Unpremult1
  168.   xpos -466
  169.   ypos -305
  170.  }
  171. set Naf8ecc00 [stack 0]
  172.  Blur {
  173.   channels alpha
  174.   name Blur9
  175.   xpos -466
  176.   ypos -258
  177.  }
  178. set Naf8ec800 [stack 0]
  179.  Dilate {
  180.   channels alpha
  181.   size {{-parent.Border*30 i}}
  182.   name Dilate1
  183.   xpos -466
  184.   ypos -164
  185.  }
  186. set Naf8ec400 [stack 0]
  187. push $Naf8ec400
  188. push $Naf8ec800
  189.  Merge2 {
  190.   inputs 2
  191.   operation stencil
  192.   name Merge6
  193.   xpos -356
  194.   ypos -158
  195.  }
  196. push $Naf8ec800
  197.  Shuffle {
  198.   alpha black
  199.   name Shuffle1
  200.   xpos -363
  201.   ypos -252
  202.  }
  203.  Noise {
  204.   size {{parent.Scale*10 i}}
  205.   zoffset {{parent.Evolution i}}
  206.   lacunarity 1
  207.   gain 1
  208.   gamma 0
  209.   translate {{parent.Offset i} {parent.Offset i}}
  210.   scale {{parent.Size*6 i}}
  211.   center {{parent.Center i} {parent.Center i}}
  212.   name Noise6
  213.   xpos -246
  214.   ypos -252
  215.  }
  216.  Merge2 {
  217.   inputs 2
  218.   operation mask
  219.   name Merge7
  220.   xpos -246
  221.   ypos -158
  222.  }
  223.  Merge2 {
  224.   inputs 2
  225.   name Merge9
  226.   xpos -466
  227.   ypos -80
  228.  }
  229.  Blur {
  230.   channels alpha
  231.   size {{parent.EdgeSharpness*40 i}}
  232.   name Blur4
  233.   xpos -466
  234.   ypos -36
  235.  }
  236.  ColorCorrect {
  237.   channels alpha
  238.   contrast 4
  239.   gamma 0.2
  240.   name ColorCorrect5
  241.   xpos -466
  242.   ypos 13
  243.  }
  244.  Clamp {
  245.   name Clamp2
  246.   xpos -466
  247.   ypos 68
  248.  }
  249. push $Naf8ecc00
  250.  Dot {
  251.   name Dot2
  252.   xpos -506
  253.   ypos -302
  254.  }
  255.  Dot {
  256.   name Dot1
  257.   xpos -506
  258.   ypos 129
  259.  }
  260.  ShuffleCopy {
  261.   inputs 2
  262.   name ShuffleCopy1
  263.   xpos -466
  264.   ypos 126
  265.  }
  266.  Premult {
  267.   name Premult1
  268.   xpos -466
  269.   ypos 150
  270.  }
  271.  Output {
  272.   name Output1
  273.   xpos -466
  274.   ypos 243
  275.  }
  276. end_group
  277.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement