Transform lets you not only translate elements, but also rotate, scale, and skew them from a single control panel.
You can also create this node by pressing T on the Node Graph.
Connection Type |
Connection Name |
Function |
Input |
unnamed |
The image to translate, rotate, scale, or skew. |
Control (UI) |
Knob (Scripting) |
Default Value |
Function |
Transform Tab |
|||
translate x, y |
translate |
0, 0 |
Translates the image along the x and y axes. You can also adjust translate values by dragging the transform handle in the Viewer. |
rotate |
rotate |
0 |
Rotates the image around the center x y coordinates. You can also adjust rotate values by dragging the transform handle in the Viewer. |
scale |
scale |
1 |
Scales the image width and height around the center x y coordinates. |
skew X |
skewX |
0 |
Skews the image on the x axis. |
skew Y |
skewY |
0 |
Skews the image on the y axis. |
skew order |
skew_order |
XY |
Sets the order in which skew transforms are applied to the image: • XY • YX |
center x, y |
center |
N/A |
Sets the center of rotation and scale on the x and y axes. |
invert |
invert_matrix |
disabled |
When enabled, any transform you applied using the translate xy, rotate, scale, skew, or center xy controls is inverted. |
filter |
filter |
Cubic |
Select the filtering algorithm to use when remapping pixels from their original positions to new positions. This allows you to avoid problems with image quality, particularly in high contrast areas of the frame (where highly aliased, or jaggy, edges may appear if pixels are not filtered and retain their original values). • Impulse - remapped pixels carry their original values. • Cubic - remapped pixels receive some smoothing. • Keys - remapped pixels receive some smoothing, plus minor sharpening (as shown by the negative -y portions of the curve). • Simon - remapped pixels receive some smoothing, plus medium sharpening (as shown by the negative -y portions of the curve). • Rifman - remapped pixels receive some smoothing, plus significant sharpening (as shown by the negative -y portions of the curve). • Mitchell - remapped pixels receive some smoothing, plus blurring to hide pixelation. • Parzen - remapped pixels receive the greatest smoothing of all filters. • Notch - remapped pixels receive flat smoothing (which tends to hide moire patterns). • Lanczos4, Lanczos6, and Sinc4 - remapped pixels receive sharpening which can be useful for scaling down. Lanczos4 provides the least sharpening and Sinc4 the most. |
clamp |
clamp |
disabled |
When using filters that employ sharpening, such as Rifman and Lanczos, you may see a haloing effect. If necessary, check clamp to correct this problem. |
black outside |
black_outside |
enabled |
This renders as black pixels outside the image boundary, making it easier to layer the element over another. If you uncheck this control, the outside area is filled with the outermost pixels of the image sequence. In most cases, you should keep black outside checked. However, you may want to turn this off for camera shake, or if you want to texture-map or intersect the output with a similar shape. NOTE: Enabling black outside also adds a solid alpha covering the input image area if no alpha is present. |
motionblur |
motionblur |
0 |
Sets the number of motion blur samples. A value of 1 should produce reasonable results for most sequences. Increase the value to produce more samples for higher quality, or decrease it to shorten the processing time. The higher the value, the smoother the result. |
shutter |
shutter |
0.5 |
Enter the number of frames the shutter stays open when motion blurring. For example, a value of 0.5 corresponds to half a frame. Increasing the value produces more blur, and decreasing the value less. |
shutter offset |
shutteroffset |
start |
Controls how the shutter behaves with respect to the current frame value: • centred - center the shutter around the current frame. For example, if you set the shutter value to 1 and your current frame is 30, the shutter stays open from frame 29,5 to 30,5. • start - open the shutter at the current frame. For example, if you set the shutter value to 1 and your current frame is 30, the shutter stays open from frame 30 to 31. • end - close the shutter at the current frame. For example, if you set the shutter value to 1 and your current frame is 30, the shutter stays open from frame 29 to 30. • custom - open the shutter at the time you specify. In the field next to the dropdown menu, enter a value (in frames) you want to add to the current frame. To open the shutter before the current frame, enter a negative value. For example, a value of - 0.5 would open the shutter half a frame before the current frame. |
shuttercustomoffset |
0 |
If the shutter offset control is set to custom, this field is used to set the time that the shutter opens by adding it to the current frame. Values are in frames, so -0.5 would open the shutter half a frame before the current frame. |
Working with Transforms - Step Up to Nuke Tutorial 4 from The Foundry on Vimeo.
We are now ready to move on to the transformations in Nuke and, in fact, Nuke does require a node to transform. In fact, there is a node called Transform. For example, if I select Read2 for this spaceship render, I can right-mouse-button-click and choose Transform > Transform, or press the T key, and there’s a Transform node. As soon as the node has its properties open in the properties panel, you will see an interactive handle in the Viewer. Let me disconnect the B input from Merge, so you can see that better. There it is. Now, you can either transform this interactively or change the properties. For example, you can rotate or scale. There is also a center x and y. This is a point in screen space where the transform handle rests and the transformations happen from. Now, it might be nice to get this handle in the center of the ship. You can do that by changing the center x and y values. So, there is 1100 and 500 for x and y, and now the handle is here. You can also move this handle interactively. If you click+drag in the center of the circle, you can translate. If you click+drag the long arm on the right, that rotates. If you click+drag one of the arcs of the circle, that will scale evenly in the x and y. Or you can click+drag one of the dots on the circle to scale unevenly, and also skew, which is a trapezoidal distortion, by grabbing the short lines. Now, you can animate all of these properties over time. In fact, we will discuss that in the next video.
For now, I want to talk about a few other issues associated with transformations, which are useful to know. So, let’s go ahead and hook up the background once again, and I will zoom out. You will notice, because I have changed some of the transformation of the ship, its bounding box overhangs the bounding box of the background. That’s OK. Now there is a tool to help you keep track of where the edges of the frame are. There is a guide button right here. If you click that, you can turn on one of these guides, for example action safe. So I know if I move my ship too close to the edge, past the white line, it might get cut off on certain TVs or screens. There is also a title safe. Now, if you don’t want to see any guides, simply turn it back to no guides. A new feature of version 7 is the mask button. You can use it by going to mask ratio and picking a new mask ratio that is different to your current one. Now, the current ratio is 16:9 - it is basically high definition widescreen. If I pick a different ratio - 4:3, which is standard television - and then turn on my masks, like half, you will see this crops off the corners. This shows you what would happen if you had to convert the 16:9 to 4:3. Now if you want to turn it off, return that button to no mask.
Another issue associated with transformations is reformatting. Reformatting is something you can do when you are working with footage that has different resolutions. Let me go to Read1 and bring in a different background. I am going to grab another image, this one is just called Sky, and because it is a different size and different resolution, my frame looks different. My new sky is only 1280x960, which is much smaller. You can solve that, though, by reformatting. If I choose the Read1 node, I can right-mouse-button-click and Transform > Reformat. Reformat will force the sky to be the same size as the ship. Now, the fact I have a Transform on the ship node, is going to continue to give me an overhanging bounding box, but now if I go ahead and delete my Transform, let’s see what happens. I will zoom in, the ship and the reformatted sky are the same size, so everything fits perfectly and there are no overhanging images. The Reformat works by simply scaling. If you look at the properties up here at the top, you can see that is scaled to the current root format, which is basically the resolution determined by the Project Settings - 1920x1080. By default, it resizes it by stretching it out in the width. Now, part of the image might be cut off that way, but you can also select some different options for resize type. For example, you can choose to distort it, which distorts the image, so all 4 corners match the proper resolution.
We are now ready to move on to animation.