A fairly common question among Nuke users is whether transformation nodes concatenate in Nuke, which nodes do and don't, and how can one tell.
The subject can be particularly confusing for artists who had used Shake before and liked the way it gave a visual clue of nodes that were concatenating.
So, hopefully, the following guide will shed some light on how concatenation is handled in Nuke, from the very basic concept to some not-so-obvious cases, and help people come up with the best strategy to apply multiple transformations to an image.
1. FREQUENT QUESTIONS
Q. Basics first, please. What is a concatenated transformation, and why should I care about it?
Concatenation is the ability of a transformation node to ask whether its input is also performing a transformation and, if so, combine all the transforms together in order to produce a single filtering operation. Technically, transform nodes produce their own transformation matrix, and ask their input whether they're also producing a transformation matrix.
Usually you'll want to preserve that ability, and avoid breaking concatenation wherever possible, in order to get the best quality and performance out of the transformations you apply to an image.
Here's a very basic example of a concatenated versus non-concatenated stack of transforms:
Q. Ok, so do all transformation nodes concatenate? How can I tell?
Most of them do, but not all of them. Since Nuke provides no visual aid to help us what nodes are concatenating, the best, fail-proof way to check if something is concatenating is to try breaking it (by adding any non-concatenating node between the others) and checking the results :)
However, it is useful to know which ones do and don't, and under what circumstances.
If we look at all the nodes from the "Transform" tab in the nodes toolbar, we can divide them into 3 categories:
C. Nodes that DON'T concatenate, even if they're in the "Transform" menu.
Q. How do I know which node belongs to each of those groups?
There's a list of nodes for each category further down in this document, but generally you can use this rule of thumb, which will make it a lot easier than having to remember what's the behaviour of each node.
- If a node has a "filter" knob, showing the list of standard filters for transformations, the node is most likely certain to concatenate, at least UPSTREAM.
- If, besides a filter knob, the node also has motionblur knobs, then the node can concatenate its transformation both upstream and propagate it downstream.
There's 2 notable exceptions to this rule:
- the Reformat node belongs to this group (concatenates both up and downstream), but doesn't have any motionblur knobs because it doesn't have any animatable parameters.
- the TransformMasked node ONLY concatenates upstream, even if it does have motionblur knobs.
- If a node doesn't have filtering or motionblur knobs, then it's very likely that it will NOT concatenate with other transforms.
Q. What happens when I have multiple transform nodes with different filter settings?
If you have a set of nodes that concatenate together, the last node is the one that sets the filter that will be applied to the whole transformation.
Also worth mentioning, if your last node has motionblur turned on, then none of the filtering options have any effect, since motionblur will force the transforms to use a special algorithm/filter for motionblur.
Q. Is there anything else that will prevent nodes from concatenating?
Yes. Even with nodes that normally concatenate, certain combinations of motionblur settings can break concatenation.
There's 2 basic rules for this behavior:
- In a stack of transforms, when there's a change from motionblur turned OFF to motionblur turned ON, concatenation will stop at that point... UNLESS all the following transforms also have motionblur turned ON.
- When the change is from motionblur ON to motionblur OFF, then those 2 nodes can't concatenate together.
This is probably easier to see with a visual example of the different combinations:
2. CONCATENATION BETWEEN 2D AND 3D TRANSFORMS
One really cool feature that's worth highlighting is the ability of geometry to look up its texture while preserving concatenation with 2D transforms connected immediately above it. (Thanks to Frank Rueter for opening my eyes to this a long time ago!)
This means that, on a standard 3D setup as the one below, you could be scaling down your texture using 2D transforms, and then get really close to the textured object again through the render camera, and it would all happen within a single filtering hit.
This is a feature that doesn't get a lot of press, but is indeed very powerful. This ability to concatenate with input transforms is even preserved through Shaders, which means it'll still work if you're texturing your object using a projection, for example...
... or even for more than one input through a MergeMaterial node!
3. THE LIST
For reference, here's a list of the different nodes that appear under the "Transform" menu on a standard Nuke install, based on their ability to concatenate transformations with other nodes.
Nodes that concatenate both
UPSTREAM and DOWNSTREAM
Nodes that concatenateUPSTREAM only
Nodes that DON'T concatenate
*Dot, NoOp, Switch