# Concatenation of transforms in Nuke

Written by Ivan Busquets on .

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:

A. Nodes that concatenate both UPSTREAM and DOWNSTREAM

You can combine any nodes from this group in any order, and they will concatenate together. (Ex. Transform, CornerPin)

B.  Nodes that concatenate ONLY with other transforms UPSTREAM, but not downstream

Usually you'll want to use these only at the end of a transformation stack. These are nodes that are capable of concatenating with other transforms upstream, but will stop concatenation at this point in the tree.
It is actually quite amazing that some of these nodes have the ability to concatenate upstream in the first place (Ex. STMap, GridWarp, ScanlineRender), but there's one side effect to be aware of: when concatenating with nodes that have motionblur ON

C. Nodes that DON'T concatenate, even if they're in the "Transform" menu.

This can be misleading, but some nodes from the Transform menu will NOT concatenate, and will in fact break concatenation when used between other nodes that do concatenate. The easiest way to identify these nodes is the fact that they don't have any filtering options. (Ex. Position, Mirror)

###### 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.

#### * Note: Dot, NoOp and Switch nodes are not transformation nodes themselves, but it's worth noting that they will not break concatenation.

# frank rueter 2012-04-11 17:29
brilliant, this should be very helpful for many artists. thanks!

+1 # Rich Bobo 2012-04-11 19:25
Awesomely helpful explanations and illustrations, Ivan. Thanks!

Rich

+1 # Pedro Tejada 2012-04-14 23:41
Awesome man! Thanks a lot!

# cho sungku 2012-04-15 18:53
I will try to study hader, thanks!!

# David Wahlberg 2012-04-16 07:28
Nice one Ivan!
Cheers

# chris menz 2012-04-28 16:43
might be worth noting that a switch node do not break concatenation either as far as my testing goes.
++ chris

# Ivan Busquets 2012-04-30 11:10
Thanks Chris,

Yes, you're right. Switch nodes don't break concatenation either. I just edited the final list for the sake of completeness. Thanks for pointing it out.

Cheers,
Ivan

# Tobias Kussel 2012-05-05 09:05
Thaks, Ivan! That is amazing.

# Caro Lasil 2012-05-06 03:14
Thanks a lot ! Really usefull, a dark subject finally highlighted !

# Michael Habenicht 2012-05-07 10:03

Also Groups are not breaking concatenation. That is good news because I am pretty sure it wasn't the case in earlier versions. The same with gizmos.

# Sri kanth 2012-08-02 03:49
Excellent stuff..! Thank you so much!

# Aymeric Perceval 2012-09-21 16:00
Great article! Thank you very much.

However, I still don't understand why a simple merge node breaks a concatination of 2D transforms...
When you want to apply a matchmove (with a tracker node for example) to several elements moving thanks to a set of transform nodes and you want all this to concatinate, you've got to place a tracker after each set of transform instead of a single one after a merge of all this.

Unless...

# Frank Rueter 2012-09-21 21:05
agreed and I believe there is a feature request logged for this. is you could send mail to Foundry's support team about this it can only help to get this bumped up in priority.

# Aymeric Perceval 2012-09-21 22:04
Will sure do

# Marty Blumen 2012-09-30 13:47
On point 2. 'MergeMat'

It's a great feature but at first use it's almost impossible to layout a collage using it, as there is no quick and easy way to view the resulting 'merge'.

Is there a better way than connecting the MergeMat to a card, moving the card back in space and using vals:Card2.z and panning/viewing through a locked default camera?

thanks!

# Ivan Busquets 2012-09-30 14:53
Hi Marty,

I know what you mean. It is unfortunate that MergeMat doesn't have a way to toggle between "shader mode" and "regular image merge mode", as it would make situations like that much easier.

Plugging into a card that's locked to a camera view is one way to view the result of MergeMat, but you can also keep a separate stream using regular merges, where you lay out, transform, etc. all your textures as you would in 2D. Then simply replace any Merges with MergeMats.

Hope that helps.
Cheers,
Ivan

# Marty Blumen 2012-09-30 16:20
Thanks Ivan

# Andreas Opferkuch 2012-11-15 05:18
Isn't there something missing here?

"but there's one side effect to be aware of: when concatenating with nodes that have motionblur ON"

... yes? What happens in that case?

# sagar patil 2014-04-15 17:40
Very well explained,Thank s a lot

# Lorenzo Marconi 2016-05-01 11:18
Hi, I've a question. If I apply a Transform node after a Scanlinerender, this will be still concatenated?

Thanks a lot

+1 # Frank Rueter 2016-05-01 22:30
No it doesn't. You can use the window translate, scale and roll in the camera though to apply additional transforms that will not incur an extra filter hit

# Daniel Mermelstein 2016-11-17 18:05
I couldnt have SplineWarp concatenate either upstream or otherwise... anything im doing wrong ? Thanks

# nikolai michaleski 2017-10-02 19:19
Question. Will the concatenation of transforms be taken into account with the motion blur? Say I have transform A with a 100px movement in X and then Transform B has a 100px movement in Y. How do I get motion blur to process the transforms together to produce a single 45 degree blur rather than two opposing 0 and 90 degree blurs?

Hope this makes sense.

+1 # Jimmy Chen 2019-04-19 15:24
Thanks this amazing stuff above...!!!
What I discover that new version Nuke has two versions of Mirror node, the new Mirror node can be concatenation up and down stream! great update!

# Daniel Dupre 2020-11-20 06:14
Awesome article.

You have no rights to post comments

We have 4092 guests and 75 members online