Nuke Tips – ShuffleCopy any channel to Alpha

shufflecopy_demo

Ok this is more of a demonstration of how ShuffleCopy works instead of a tip since I remember being so clueless to this operation when learning Nuke.

If any of you uses Shake before, it is similar to the SwitchMatte node where any alpha will be swap into your chosen node.

ShuffleCopy does more than that and it allows you to shuffle the channels between two input nodes. This means it is not restricted to the alpha channel only like SwitchMatte.

Think like you are shuffling a card deck to arrange the order that you wanted.

I did this quick script demo to show the ShuffleCopy in action. Just shuffle the alpha checkmark between the RGBA columns and see the result in the premultiply merged node.

To see it in action better, bring in any images you find interesting and pipe it into input 1 of ShuffleCopy. Just bounce around the checkmark and see how it works.

set cut_paste_input [stack 0]
version 8.0 v5
push $cut_paste_input
Roto {
 output {rgba.red -rgba.green -rgba.blue}
 curves {{{v x3f99999a}
  {f 0}
  {n
   {layer Root
    {f 0}
    {t x44800000 x44428000}
    {a}
    {curvegroup Bezier2 512 bezier
     {{cc
       {f 8192}
       {px 1
        {0 0}
        {x444a0000 x44900000}
        {0 0}
        {0 0}
        {x44460000 x44690000}
        {0 0}
        {xc1400000 xc30c0000}
        {x44810000 x44848000}
        {x41400000 x430c0000}}}     idem}
     {tx 1 x445b5555 x44830000}
     {a bm x41400000 osw x41200000 osf 0 str 1 spx x44800000 spy x44428000 sb 1 tt x40800000}}
    {curvegroup Bezier1 512 bezier
     {{cc
       {f 8192}
       {px 1
        {0 0}
        {x43de0000 x43860000}
        {0 0}
        {0 0}
        {x44350000 x43840000}
        {0 0}
        {0 0}
        {x44400000 x442e0000}
        {0 0}
        {0 0}
        {x44b88000 x43860000}
        {0 0}
        {0 0}
        {x44d50000 x44080000}
        {0 0}
        {0 0}
        {x448e8000 x444c0000}
        {0 0}
        {x40800000 xc37c0000}
        {x44b18000 x448d8000}
        {xc0800000 x437c0000}
        {0 0}
        {x448e0000 x44aa8000}
        {0 0}
        {0 0}
        {x44040000 x44ab0000}
        {0 0}}}     idem}
     {tx 1 x4481b8e4 x443aaaab}
     {a osw x41200000 osf 0 str 1 spx x44800000 spy x44428000 sb 1 tt x40800000}}}}}}
 toolbox {selectAll {
  { selectAll str 1 ssx 1 ssy 1 sf 1 }
  { createBezier str 1 ssx 1 ssy 1 sf 1 sb 1 tt 4 }
  { createBezierCusped str 1 ssx 1 ssy 1 sf 1 sb 1 }
  { createBSpline str 1 ssx 1 ssy 1 sf 1 sb 1 }
  { createEllipse str 1 ssx 1 ssy 1 sf 1 sb 1 }
  { createRectangle str 1 ssx 1 ssy 1 sf 1 sb 1 }
  { createRectangleCusped str 1 ssx 1 ssy 1 sf 1 sb 1 }
  { brush str 1 ssx 1 ssy 1 sf 1 sb 1 }
  { eraser src 2 str 1 ssx 1 ssy 1 sf 1 sb 1 }
  { clone src 1 str 1 ssx 1 ssy 1 sf 1 sb 1 }
  { reveal src 3 str 1 ssx 1 ssy 1 sf 1 sb 1 }
  { dodge src 1 str 1 ssx 1 ssy 1 sf 1 sb 1 }
  { burn src 1 str 1 ssx 1 ssy 1 sf 1 sb 1 }
  { blur src 1 str 1 ssx 1 ssy 1 sf 1 sb 1 }
  { sharpen src 1 str 1 ssx 1 ssy 1 sf 1 sb 1 }
  { smear src 1 str 1 ssx 1 ssy 1 sf 1 sb 1 }
} }
 toolbar_brush_hardness 0.200000003
 toolbar_source_transform_scale {1 1}
 toolbar_source_transform_center {1024 778}
 colorOverlay {0 0 0 0}
 blending_mode minus
 lifetime_type "all frames"
 motionblur_shutter_offset_type centred
 source_black_outside true
 createNewTrack {{-1} "-1\t(none)\t-1" "1000\tNew Track Layer\t1000"}
 name Roto_R_Channel
 selected true
 xpos -202
 ypos -255
}
Roto {
 output {-rgba.red rgba.green -rgba.blue}
 curves {{{v x3f99999a}
  {f 0}
  {n
   {layer Root
    {f 0}
    {t x44800000 x44428000}
    {a}
    {curvegroup Bezier1 512 bezier
     {{cc
       {f 8192}
       {px 1
        {xc1400000 x43120000}
        {x449e7fff x446c1999}
        {x43506670 x410666c0}
        {0 0}
        {x44b84ccd x446db334}
        {0 0}
        {x43ba0000 xc0800000}
        {x4481cccd x44b2599a}
        {xc3ba0000 x40800000}
        {x42700000 x43a20000}
        {x43d93334 x4477b334}
        {xc2700000 xc3a20000}
        {xc4044000 x3e4cd000}
        {x4465999a x43894cce}
        {x43ea0168 x3db7a000}
        {xc2246660 xc3959baa}
        {x44b1c000 x44132666}
        {x40accd00 x4380199c}
        {x434f0000 xc15cccc0}
        {x447c999a x444c6667}
        {xc0433800 xc232f650}
        {x40800000 x42600000}
        {x44793332 x4420ccce}
        {x432a0000 xc1000000}
        {xc055ac00 x42e80abc}
        {x44931996 x44094cce}
        {x3fccdc00 xc29cccd4}
        {x435f24f0 xc0a15800}
        {x446a6668 x43e60004}
        {xc30cccc8 x404ccc00}
        {xc2800000 xc3a30000}
        {x441f199a x44593334}
        {x42800000 x43a30000}
        {xc2f0c630 xc028d200}
        {x4470e666 x4497cccd}
        {x4348ccd0 x408ccd00}}}     idem}
     {tx 1 x448dd000 x443ceaab}
     {a osw x41200000 osf 0 str 1 spx x44800000 spy x44428000 sb 1 tt x40800000}}}}}}
 toolbox {selectAll {
  { selectAll str 1 ssx 1 ssy 1 sf 1 }
  { createBezier str 1 ssx 1 ssy 1 sf 1 sb 1 tt 4 }
  { createBezierCusped str 1 ssx 1 ssy 1 sf 1 sb 1 }
  { createBSpline str 1 ssx 1 ssy 1 sf 1 sb 1 }
  { createEllipse str 1 ssx 1 ssy 1 sf 1 sb 1 }
  { createRectangle str 1 ssx 1 ssy 1 sf 1 sb 1 }
  { createRectangleCusped str 1 ssx 1 ssy 1 sf 1 sb 1 }
  { brush str 1 ssx 1 ssy 1 sf 1 sb 1 }
  { eraser src 2 str 1 ssx 1 ssy 1 sf 1 sb 1 }
  { clone src 1 str 1 ssx 1 ssy 1 sf 1 sb 1 }
  { reveal src 3 str 1 ssx 1 ssy 1 sf 1 sb 1 }
  { dodge src 1 str 1 ssx 1 ssy 1 sf 1 sb 1 }
  { burn src 1 str 1 ssx 1 ssy 1 sf 1 sb 1 }
  { blur src 1 str 1 ssx 1 ssy 1 sf 1 sb 1 }
  { sharpen src 1 str 1 ssx 1 ssy 1 sf 1 sb 1 }
  { smear src 1 str 1 ssx 1 ssy 1 sf 1 sb 1 }
} }
 toolbar_brush_hardness 0.200000003
 toolbar_source_transform_scale {1 1}
 toolbar_source_transform_center {1024 778}
 colorOverlay {0 0 0 0}
 lifetime_type "all frames"
 motionblur_shutter_offset_type centred
 source_black_outside true
 createNewTrack {{-1} "-1\t(none)\t-1" "1000\tNew Track Layer\t1000"}
 name Roto_G_Channel
 selected true
 xpos -202
 ypos -200
}
Roto {
 output {-rgba.red -rgba.green rgba.blue}
 curves {{{v x3f99999a}
  {f 0}
  {n
   {layer Root
    {f 0}
    {t x44800000 x44428000}
    {a}
    {curvegroup Bezier3 512 bezier
     {{cc
       {f 8192}
       {px 1
        {0 0}
        {x44510002 x44250000}
        {0 0}
        {0 0}
        {x444e0002 x43d00001}
        {0 0}
        {x40800000 xc317fff8}
        {x44858001 x44060000}
        {xc0800000 x43180000}}}     idem}
     {tx 1 x445f5555 x4487aaab}
     {a bm x41400000 osw x41200000 osf 0 str 1 spx x44800000 spy x44428000 sb 1 tt x40800000}}
    {curvegroup Bezier2 512 bezier
     {{cc
       {f 8192}
       {px 1
        {0 0}
        {x444d0000 x44970000}
        {0 0}
        {0 0}
        {x444a0000 x44710000}
        {0 0}
        {x40800000 xc3180000}
        {x44838000 x44878000}
        {xc0800000 x43180000}}}     idem}
     {tx 1 x445f5555 x4487aaab}
     {a bm x41400000 osw x41200000 osf 0 str 1 spx x44800000 spy x44428000 sb 1 tt x40800000}}
    {curvegroup Bezier1 512 bezier
     {{cc
       {f 8192}
       {px 1
        {0 0}
        {x44030000 x44ab8000}
        {0 0}
        {0 0}
        {x43f00000 x43600000}
        {0 0}
        {0 0}
        {x44998000 x43640000}
        {0 0}
        {xc1c00000 xc3640000}
        {x44bcffff x43f40000}
        {x41c00000 x43640000}
        {0 0}
        {x44868000 x44450000}
        {0 0}
        {xc1400000 xc35c0000}
        {x44ba8000 x44858000}
        {x41400000 x435c0000}
        {x42b00000 xc1000000}
        {x449f7fff x44aa8000}
        {xc2b00000 x41000000}}}     idem}
     {tx 1 x44898000 x4443b6db}
     {a osw x41200000 osf 0 str 1 spx x44800000 spy x44428000 sb 1 tt x40800000}}}}}}
 toolbox {selectAll {
  { selectAll str 1 ssx 1 ssy 1 sf 1 }
  { createBezier str 1 ssx 1 ssy 1 sf 1 sb 1 tt 4 }
  { createBezierCusped str 1 ssx 1 ssy 1 sf 1 sb 1 }
  { createBSpline str 1 ssx 1 ssy 1 sf 1 sb 1 }
  { createEllipse str 1 ssx 1 ssy 1 sf 1 sb 1 }
  { createRectangle str 1 ssx 1 ssy 1 sf 1 sb 1 }
  { createRectangleCusped str 1 ssx 1 ssy 1 sf 1 sb 1 }
  { brush str 1 ssx 1 ssy 1 sf 1 sb 1 }
  { eraser src 2 str 1 ssx 1 ssy 1 sf 1 sb 1 }
  { clone src 1 str 1 ssx 1 ssy 1 sf 1 sb 1 }
  { reveal src 3 str 1 ssx 1 ssy 1 sf 1 sb 1 }
  { dodge src 1 str 1 ssx 1 ssy 1 sf 1 sb 1 }
  { burn src 1 str 1 ssx 1 ssy 1 sf 1 sb 1 }
  { blur src 1 str 1 ssx 1 ssy 1 sf 1 sb 1 }
  { sharpen src 1 str 1 ssx 1 ssy 1 sf 1 sb 1 }
  { smear src 1 str 1 ssx 1 ssy 1 sf 1 sb 1 }
} }
 toolbar_brush_hardness 0.200000003
 toolbar_source_transform_scale {1 1}
 toolbar_source_transform_center {1024 778}
 colorOverlay {0 0 0 0}
 blending_mode minus
 lifetime_type "all frames"
 motionblur_shutter_offset_type centred
 source_black_outside true
 createNewTrack {{-1} "-1\t(none)\t-1" "1000\tNew Track Layer\t1000"}
 name Roto_B_Channel
 selected true
 xpos -202
 ypos -151
}
Roto {
 output alpha
 curves {{{v x3f99999a}
  {f 0}
  {n
   {layer Root
    {f 0}
    {t x44800000 x44428000}
    {a}
    {curvegroup Bezier2 512 bezier
     {{cc
       {f 8192}
       {px 1
        {0 0}
        {x447a0002 x44918000}
        {0 0}
        {0 0}
        {x44640000 x44550000}
        {0 0}
        {0 0}
        {x44910001 x44530000}
        {0 0}
        {0 0}
        {x448a0000 x44918000}
        {0 0}}}     idem}
     {tx 1 x4480e000 x447b4000}
     {a osw x41200000 osf 0 str 1 spx x44800000 spy x44428000 sb 1 tt x40800000 bm x41400000}}
    {curvegroup Bezier1 512 bezier
     {{cc
       {f 8192}
       {px 1
        {0 0}
        {x43f5fffe x4387fffe}
        {0 0}
        {0 0}
        {x44380000 x436c0000}
        {0 0}
        {0 0}
        {x445c0000 x441c0000}
        {0 0}
        {0 0}
        {x44958000 x441d0000}
        {0 0}
        {0 0}
        {x449d7ffe x4389fffe}
        {0 0}
        {0 0}
        {x44c67ffe x438ffffe}
        {0 0}
        {0 0}
        {x449f8000 x44ad0000}
        {0 0}
        {0 0}
        {x445a0002 x44ad8000}
        {0 0}}}     idem}
     {tx 1 x4482f000 x441c6000}
     {a osw x41200000 osf 0 str 1 spx x44800000 spy x44428000 sb 1 tt x40800000}}}}}}
 toolbox {selectAll {
  { selectAll str 1 ssx 1 ssy 1 sf 1 }
  { createBezier str 1 ssx 1 ssy 1 sf 1 sb 1 tt 4 }
  { createBezierCusped str 1 ssx 1 ssy 1 sf 1 sb 1 }
  { createBSpline str 1 ssx 1 ssy 1 sf 1 sb 1 }
  { createEllipse str 1 ssx 1 ssy 1 sf 1 sb 1 }
  { createRectangle str 1 ssx 1 ssy 1 sf 1 sb 1 }
  { createRectangleCusped str 1 ssx 1 ssy 1 sf 1 sb 1 }
  { brush str 1 ssx 1 ssy 1 sf 1 sb 1 }
  { eraser src 2 str 1 ssx 1 ssy 1 sf 1 sb 1 }
  { clone src 1 str 1 ssx 1 ssy 1 sf 1 sb 1 }
  { reveal src 3 str 1 ssx 1 ssy 1 sf 1 sb 1 }
  { dodge src 1 str 1 ssx 1 ssy 1 sf 1 sb 1 }
  { burn src 1 str 1 ssx 1 ssy 1 sf 1 sb 1 }
  { blur src 1 str 1 ssx 1 ssy 1 sf 1 sb 1 }
  { sharpen src 1 str 1 ssx 1 ssy 1 sf 1 sb 1 }
  { smear src 1 str 1 ssx 1 ssy 1 sf 1 sb 1 }
} }
 toolbar_brush_hardness 0.200000003
 toolbar_source_transform_scale {1 1}
 toolbar_source_transform_center {1024 778}
 colorOverlay {0 0 0 0}
 lifetime_type "all frames"
 motionblur_shutter_offset_type centred
 source_black_outside true
 createNewTrack {{-1} "-1\t(none)\t-1" "1000\tNew Track Layer\t1000"}
 name Roto_A_Channel
 selected true
 xpos -202
 ypos -91
}
ColorWheel {
 inputs 0
 gamma 0.45
 name ColorWheel1
 selected true
 xpos -44
 ypos -199
}
ShuffleCopy {
 inputs 2
 name ShuffleCopy1
 selected true
 xpos -44
 ypos -85
}
Premult {
 name Premult1
 selected true
 xpos -44
 ypos -21
}
Constant {
 inputs 0
 channels rgb
 color {0.102 -0.04824 -0.2591 0}
 color_panelDropped true
 name Constant1
 selected true
 xpos 93
 ypos -130
}
Merge2 {
 inputs 2
 name Merge1
 selected true
 xpos 93
 ypos -21
}
Viewer {
 frame 1
 input_process false
 name Viewer1
 selected true
 xpos 69
 ypos 70
}

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.