People getting started with Nuke, even experienced Compositors coming from other software, often seem confused about the Shuffle Node.
Prerequisite knowledge
The first thing to understand, is that in Nuke you’re not limited by 1 RGBA layer.
You will sometime see the word Channel and Layer used interchangeably (example: Multichannel EXR), I prefer to use Channel for single channels: R, G, B and A for example, each of it contained in a Layer: RGBA in this case.
So you can have many Layers.
Each layer contains Channels. Usually each layer would contain 3 or 4 channels (RGB or RGBA), but it could contain up to 8 channels.
Each Channel contains pixels data, which you can thing of as a black and white image.
For the purpose of displaying an image, Nuke displays the first Channel as Red, the second as Green, and the third as Blue. However, the data itself is independent to the Channel, which is merely a container, or a label.
The data can be copied or moved to a different channel, the easiest way to do so is to use a shuffle.
Using the Shuffle node
This is what the interface of the Shuffle node looks like. It’s a lot of boxes, and can be a bit confusing at first.
Let’s simplify it for the purpose of learning:
That’s better already.
On the top, you have the in knob, where you can pick a layer to shuffle from, along with it’s first 4 channels listed horizontally. Here r, g, b, a.
There is also a 0, which corresponds to full black, or no data; and 1, which corresponds to white, or fill the whole channel with a value of 1.
On the right side, you have the output, with it’s out knob, where you can pick where the data will go.
In the above example, each shuffle is going back into it’s own channel.
Let’s look at the a channel and follow the arrow: as we go down, we find a checked box. Once we find a checked box, the data flows to the right side, in this case back to the alpha channel.
We’ve put the data from alpha into alpha, which I like to write as a->a.
As this is a default shuffle, it also does: r->r, g->g and b->b. Let’s mix things out.
So, I’m back to a full view of the node, but the concept is still the same, we just follow the arrow.
Let’s look at the green here: We’re putting the data from g into the red channel. What used to be displayed as green will now be displayed as red.
We’re also putting the data of g into a different layer called depth, into a channel called Z.
This basically means that the data from the green channel has been duplicated, and copied into both channels.
We could put green into every single channel if we wanted to, which would result as an image being displayed as monochrome, equivalent to the original data of green.
Here, if we look at every channel, we have:
g -> r
r -> g
a -> b
0 -> a
g -> Z
While you can check as many boxes as you’d like per column, you can only have one checked per line: While you can copy data to multiple channels, each channel can only contain 1 set of data.
Let’s play a game
You can practice using the interface by playing a little game I made.
- It works the same way as the Shuffle interface, but the data is represented by a liquid.
- The liquid comes from pipes and has to be put in the right truck.
- Follow the “orders” on the board on the right.
- Click the valves to send the liquid in the right truck, then click “Check” or press Enter.
- You have 60s per game. Faster order deliveries get more points.
- I haven’t included touch screen support yet, so for now you cannot play on mobile.
If for some reason (small screen for example) the game doesn’t display properly, you can open it in it’s own tab by CLICKING HERE
AWESOME!!!!!!!!
I may just be really high, but I don’t think this will help anyone understand shuffle.
You might be really right on top of being really high. I like to have a visual representation of abstract concepts, and I thought pipes were a good representation. Not everyone will relate.
thank you……..
Thank you for trying to explain this node. As a longtime After Effects user I’ve been endlessly searching for someone to demystify it. Unfortunately, almost nobody seems capable of explaining it completely, simply and clearly. In particular, I don’t understand what the second column of boxes does (one tutorial says this is simply because they used the same UI for the Shuffle and Shuffle Copy nodes and the right hand set is redundant, in which case WTF?). Also, what’s the difference between unchecking the individual channel boxes, versus checking the 0 box next to that row? Isn’t that the same thing? As a longtime CG artist, I’m finding even grasping the basics of Nuke ridiculously difficult.
You have 2 columns and 2 rows because you are able to shuffle channels from up to 2 layers at once (both in and out)
For example you might want to shuffle your r to r,g,b AND depth.Z. In this case your “in 1” would be rgba, and your first out would be rgba and second would be depth.
Additionally in the same shuffle, you might want to shuffle your mask into alpha. You’d pick “mask” in “in 2”.
It just allows you to shuffle more things around in one node.
As for your question about the difference between not checking anything and checking black, checking black explicitly shuffles black in the channel, while unchecking seems to do whatever last box was checked (not sure what will happen next launch).
Thanks Erwan for breaking this down. It really cleared up the shuffle node for me… a channel is in a set which is in a layer. The redlines were helpful not to mention the truck game. Well done.
big help, thank you so much but the game is not working with the other link too. I guess my mac has problem.
I’m sorry the game is not working for you. I have never tried it on a mac, it may not be compatible. To be fair it’s not the most exciting game in the world, so don’t sweat too much about it 🙂
Wow ..Thanks … I did my own examples with rectangles trying to simulate your game .. and now I really understand the node. Thanks so much ! Now I really understand the shuffle node .. Actually is pretty easy.
Thanks Erwan. I’v obsessed with this game! It’s very helpful for me.
Thanks Brandy. Not too useful anymore since Shuffle2 came out though.
si seulement j’avais eu ce jeu quand j’ai commencé mon apprentissage de nuke ………c’etait le seul node qui me prenait la tête
I would really still love to learn this more in depth .. it was fun but need to find something more in depth
Thank you though !! 🙂
What are you hoping to learn more in depth? There’s not much depth to the shuffle.