Digital Compositing With Nuke 101 (PDFDrive)
Digital Compositing With Nuke 101 (PDFDrive)
Digital Compositing With Nuke 101 (PDFDrive)
published by
Level 1
Certification
Fatbars Limited
Flat / Room 2510 , 25/F Hopewell Center
183 Queen’s Road East, Wanchai,
Hong Kong, SAR China
Tel : 852 64383480 Fax : 852 30113207
Email : training@thefoundrytrainingcentral-asia
Website : http://www.fatbars.tv
Website : http://www.thefoundrytrainingcentral-asia.com
Notice of Rights
All intellectual property rights relating thereto are and shall remain the sole property of Fatbars Limited, Hong Kong,
SAR China. Fatbars Limited assumes no responsibility or liability for any errors or inaccuracies that may appear in this
Training Guide and this Training Guide is subject to change without notice. All Rights Reserved.
Nuke™ compositing software © 2008 The Foundry Visionmongers Ltd. All Rights Reserved.
Nuke™ is a trademark of The Foundry Visionmongers Ltd.
Digital Domain ® is a registered trademark of Digital Domain, Inc.
Primatte™ keyer tool © 1997-2008 Photron USA, Inc. All Rights Reserved.
Primatte™ is a trademark of IMAGICA Corp.
Primatte™ patent is held by IMAGICA Corp.
Maya ® is a registered trademark of Autodesk, Inc., in the USA and other countries.
Houdini ® is a registered trademark of Side Effects Software, Inc.
Boujou is a trademark of 2d3 Ltd.
Framecycler ® is a registered trademark of Iridas, Inc.
Cineon™ is a trademark of Eastman Kodak Company.
ISBN 978-988-18465-1-8
Printed and bound in Hong Kong , SAR, China
The Nuke End User Certification Program is designed to be taught in a instructor-led training course at Authorised
training locations in the following regions : Hong Kong, Macao, Taiwan, China. Thailand, South Korea, Vietnam, Malaysia,
Indonesia, Philippines and Singapore. Fatbars Limited has been appointed by The Foundry to set up The Foundry
Authorised Training Central Asia for The Foundry’s products. Standardizing all training programs for The Foundry’s Nuke,
includes the production of the official training courseware, certification deployment and training support for participating
Authorised Training Centres, Authorised Educational Institutes and Certified Trainers.
The goal of the program is to offer customers, from beginners to professionals, quality training delivered in a consistent
professional manner. Upon completing the course material in this book, you can become a Certified End User by taking
the certification exam at an Authorised Training Center. Differentiate yourself to employers and prospective clients as a
Certified Nuke End User. By passing certification exams, you become a Certified Nuke End User for a chosen level.
To find an Authorised Training Center, Authorised Education Institute and Certified Trainer in your region, go to www.
thefoundrytrainingcentral-asia.com.
LESSON 3 : KEYING
• Keying Video 45
• What Is Premultiply? 46
• Sampling White And Black Points With The Grade Node 47
• Define With Grade: 47
• How Primatte Works 49
• Primatte Controls 50
• Auto-Compute 50
• Select Background Colour 51
• Dealing With Spills 53
LESSON 5 : TRANSFORMATION
• Using The 2D Transformation Overlay 67
• Using The Transform Node 67
• The Card3D Transform Node 67
• Animating Parameters 69
• Set Keyframes 69
• To Delete A Single Keyframe : 70
• Using The Curve Editor 70
• To Remove A Curve From The Editor : 70
• To Zoom In Or Out In The Editor : 71
• To Add Points To A Curve : 71
• To Select Points On A Curve : 71
• To Interpolate Parts Of A Curve : 71
• To Repeat A Portion Of The Curve Throughout The Curve : 72
• To Reverse A Curve : 72
• Adding Motion Blur 72
• Choosing A Filtering Algorithm 72
• Bring in the Stars 75
LESSON 6 : PAINT
• Using Paint 77
• Stroke/Shape List 79
• The Clone and Reveal Tool 79
• Drawing Shapes 80
• Selecting the Output Format and Channels 80
• Setting the Project 81
LESSON 7 : TRACKING
• Tracking And Stabilising 86
• Tracking An Image 86
• Positioning Track Anchors 86
• One-Point, Two-Point, Three-Point and Four-Point 86
• Tracking And Trackers 87
• Calculating The Track 88
• Re-tracking Part Of A Track 88
• Manipulating Track Curves And Smoothing Tracks 89
• Moving Track Points With Curves: 89
• Smoothing Tracks 89
• Applying Tracking Data Using Tracker Controls 89
• Using the <Stabilize2D> Node 90
• Stabilising Elements 90
• PreProcess_Graphics Group 93
LESSON 8 : 3D COMPOSITING
• Overview 101
• Camera Views 104
• The Scene Node 104
• The ScanlineRender Node 105
• 3D Scene Geometry 105
• Transform Handles Of A 3D Object 106
• Working with Cards 106
• Deforming Card Objects 106
• Modifying Objects Using an Image 106
• Modifying Objects Using A Perlin Noise Function 107
• Adding Lights 108
• Direct Light 108
• Point Light 109
• Spot Light 109
• Environment Light 109
• Projection Cameras 110
• Projecting Textures With The Project3D Node 110
• Parallax Scene 112
• Animating the Camera 114
• Adding Elements 115
• Adding The Snow 116
• Importing Camera Data 116
• Understanding Gizmos 118
• Applying The TimeBlur Filter 119
LESSON 10 : WARPING
• Warping 130
• Warping Images Using The GridWarp Node 130
• Morphing 134
• Setting Up The Warp 135
• FrameRange And AppendClip Node 136
• Wrapping The Elements 138
• Warping An Image Using The SplineWarp Node 138
• Keyframing The Warp 140
• Keyframing The Watch Band 141
• Finishing The Comp 142
LESSON 12 : RENDERING
• Previewing In A Nuke Viewer 151
• Flipbooking Within Nuke 151
• Flipbooking within FrameCycler 152
• FrameCycler 153
• Rendering Output 154
• Render Resolution and Format 154
• Output (Write) Nodes 154
• Executing Renders 155
• Supported Image Formats 155
When you save a Nuke project, the Nuke project files are saved as plain text file. You will see a series of sequential
commands by using a text editor which are interpreted and executed when you render the output.
Viewer Pane
Properties / Script
Editor Pane
By default, there is a Node Graph panel in the lower left corner, a Viewer panel in the top left corner, and a Properties
Bin on the right.
Menu Bar
The menu bar is located on top of the Nuke window. Its menus, such as the File or Edit menu, let you perform more
general actions related to the whole script, the viewers, or editing, rather than certain individual nodes.
File Commands for disk operations, including loading, saving, and importing scripts.
Edit Editing functions, preferences, and project settings.
Layout Restoring and saving layouts.
Viewer Adding and connecting viewers.
Render Rendering the output.
Help Accessing a list of Hotkeys, user documentation, training resources, tutorial files, and Nuke-related
e-mail lists.
Tool Bar
The tool bar is located on the left-hand side of the Nuke window. By default, it consists of thirteen icons. The different
nodes are grouped under these icons based on their functions. You use the tool bar to add nodes to the Node Graph.
To make selections from the tool bar, click on an icon and select an option from the menu that appears. To quickly
browse through the menus in the tool bar, click and drag over the icons. Nuke opens and closes the menus as you
drag over them, making it easy to search for a particular node or find out what the available menus contain.
You can press the middle mouse button on a menu icon to repeat the last item used from that menu. For example,
if you first select a <Blur> node from the Filter menu, you can then add another <Blur> node by simply pressing the
middle mouse button on the Filter icon.
IMAGE Image read and write nodes, built-in Nuke elements, and Viewer nodes.
DRAW Roto shapes, paint tools, film grain, fills, lens flares, sparkles, other vector-based
image tools.
FILTER Applying convolve filters, such as blur, sharpen, edge detect, and erode.
VIEWS Nodes for working with views and stereoscopic or multi-view material.
To display a tool tip that explains the icon’s function, move your mouse pointer over the icon.
Selecting Nodes
Nuke offers a number of options for selecting nodes. Selected nodes display in a highlight colour defined in your
preferences. The default highlight colour is light yellow.
• To select a single node: Click once on the node.
• To select multiple nodes: Press Shift while clicking on each node you want to select or drag on the workspace to
draw a marquee. Nuke selects all nodes inscribed by the marquee.
• To select all upstream nodes: Press Control (pc) / Command (mac) while dragging on a node . Nuke selects all
nodes that feed data to the selected node.
• Press Control + click (pc) / Command + click (mac) on the selected node’s control panel.
Viewer Pane
Properties / Script
Editor Pane
To select all nodes in a script: Select Edit > Select all (or press Control (pc) + A / Command (mac) + A).
To select nodes by name: Choose Edit > Search, or press forward slash (/), and the node’s name . A dialog appears.
Type ‘Primatte’ and Click, OK. The <Primatte> node in your node graph will be highlighted as light yellow.
Netvigation Window
Getting Around Your Node Graph
1. When you have huge scripts, you will need to zoom into the node graph. Once your node graphs is not fully viewed
in the Node Graph pane, the small navigator map on the lower right will appear. Click and drag the top left corner of
the navigator map to enlarge it.
2. Click inside the small window on the shaded area to move around your script.
Center this Node in the center of the Node Graph Node Colour Assignment
Node Notes
1. You can leave comments and change the font name and colour of your node. This is a great way to leave
information for someone who is taking over your script.
2. In the properties panel, click the <Node> tab at the top of the dialog. Its attributes appear.
3. Type any comments regarding the node in the label field. These will appear on the surface of the node. From the
font pull down menu, select the font type for any text on the node.
4. Use the buttons on the right to bold or emphasize the text.
5. Enter the font size in the font size field.
6. Click colour to choose a new font colour. The Select colour dialog appears, allowing you to select the desired
colour.
7. There 4 tick box at the bottom of the node information panel. When selected:
• Hide input - hide the arrows coming into this selected node. (check the results on the node graph)
• Cached - will always keep the output result in memory, so that it can be read quickly when changing things
connected to it.
• Postage stamp - It will create a small image in the selected node indicating its output.
• Disable - ignore this node when processing. Using the Hotkey ‘D’ will have the same result. The node has a cross
over it to indicate that it has been disabled.
Maximum Number Of
Empty The Properties Bin
Properties Panels
When you lock the Properties panel , all the new control panels will float. To empty the Properties Bin and close all the
properties panels in it, click the remove all panels button.
1. Let’s add a <HueShift> node to change the colour of the stage node. Click off and do not select any node.
2. There are 3 ways of adding a node.
3. You can select by using the tool bar. Click on the colour icon and side menu will come out and you can select
<HueShift> to insert the node into the node graph view.
4. The faster way is to right click on the node graph pane and open the contextual menu. Simply right click on any
empty gray area in the node graph to activate it.
Assigned Hotkey
Assigned Hotkey
5. If the node has Hotkey assigned, then simple type the Hotkey to bring in the node. If not, simply press ‘tab’ and
start typing ‘HueShift’. As you do, nodes that have Hue will start displaying inside the box. Select HueShift from the
selection and the node will be added into the node graph pane.
6. Your node at the moment not connected to any script. Simply select the node and bring it between the stage and
the <Primatte> node. When their paths are crossed, the arrow connecting will highlight. Once you released the mouse,
the <HueShift> node will be connected to the tree.
7. To disconnect a node: Drag the head or tail of the connecting arrow to an empty area of the workspace OR Select
the lower node in the tree and press Control + D (pc) / Command + D (mac).
8. To reconnect a node: Drag on the head or tail of the connecting arrow and drop it over the centre of the node to
which you want to connect.
9. Some nodes like <Light Wrap> and <Merge> node has labels A and B. Nuke distinguishes the dual inputs that
may run into a <Merge> node with the labels A and B. A refers to the foreground element, and B to the background
element. Nuke always copies from the A input to the B. This means that if you later decide to disable the node
associated with an A input, the data stream will keep flowing, because it will, by default, use the B input.
10. To delete nodes: Select the node or nodes you want to delete. Select Edit > Erase (or press Delete).
11. To duplicate a connecting arrow: Shift + drag the connecting arrow on top of the node you want to create a
connection to. Nuke duplicates the connecting arrow, leaving the original connection untouched.
12. To bend connecting arrows: Select the node before the connector you want to bend. From the tool bar, select
Other > Dot. A dot appears after the selected node, causing a bend in the connector. Drag the dot as necessary to
reposition the bend. You can also add a dot to an existing connection by pressing Control (pc) / Command (mac) and
clicking on the yellow dot that appears on the connecting arrow.
Indicators On Nodes
Some nodes have tiny indicators, like the small A on the top right hand side of <guitar_Maskaa> node. There are
several indicators that can appear on the nodes in the Node Graph, depending on what you are doing. The following
table describes what each indicator means.
The node’s effect is limited by a mask from the either the node’s primary input
or output.
The node has been disabled by pressing D or clicking the Disable button.
The node has been cloned. The indicator appears on both the parent and the
child node.
You are working with a multi view project and have split off one or more views
in the node’s controls.
The full effect of the node is not in use, because you have adjusted the mix
slider in the node’s controls.
Grouping Nodes
You can group nodes in the Node Graph using the <Backdrop> node or the <Group> node. The <Backdrop> node
adds a background box behind the nodes, separating the nodes visually from the rest of the node tree. A <Group>
node, instead, combines a set of nodes into a single node, acting as a nesting container for those nodes.
Box title
Triangle to resize
4. Put the backdrop behind the above nodes and now you can move them together.
Cloning Nodes
You can clone nodes in preparation for pasting them elsewhere in a script. Cloned nodes Inherit the values of their
parent, but unlike copied nodes, they also maintain an active link with their parents’ values. If you alter the values of
one, the other automatically inherits these changes.
Clones are helpful for maintaining consistent setups across multiple elements. For example, you might use clones
to apply an identical film grain setup to a series of elements shot on the same stock. Should you need later to make
changes to the setup, these changes would automatically ripple throughout the script.
To clone nodes:
1. Select the node or nodes you want to clone.
2. Choose Edit > Clone or (Alt + K (pc) / Option + K (mac).
Nuke clones the node(s), whilst maintaining an active link to the parental node(s). The clone status is indicated with an
orange line that connects the clone to its parent node. The nodes also share the same name.
To declone nodes:
1. Select the node or nodes you want to de clone.
2. Choose Edit > Declone (or Alt + Shift + K (pc) / Option + Shift + K (mac)).
At the end of script, you will see the viewer node. Each viewer has Hotkeys to select up to 10 inputs.
1. Let’s bring in another image. Type ‘R’ Hotkey or right click to choose from the contextual menu > image > read. Go
to Lesson One / Media / seaside_still.tif and bring in the image.
2. Currently, we cannot see this image in the <Viewer> node. Let’s assign it to this <Viewer> node by typing ‘2’. You
can see that a number 2 appears on the arrow, joining to the same <Viewer> node. This means that seaside_still.tif is
assign to video input 2. Now you can toggle between 1 and 2 input.
3. Your mouse must be in the viewer pane before you can swap the viewer’s input.
Timeline Controls
Drag the orange marker along the timeline to quickly cue to a specific frame. The number of the current frame appears
in the Current field above the timeline. You can also cue to a frame by typing its number directly into this field. By
default, Nuke automatically adjusts the timeline of every Viewer window to show the frame range defined in your
Project Settings. If no frame range is defined, the frame range of the first image you read in is used as the global frame
range.
To have the viewer adjust the timeline to show the ‘in’ and ‘out’ frames of the current input clip, select Input from the
frame range source menu. To adjust the playback range for the current viewer window, Control + drag (pc) / Command
+ drag (mac) the red playback range marker on the timeline to a new ‘in’ and ‘out’ frames.
2D / 3D
Region of Interest
Timeline Controls
The fps field (frames-per-second) initially displays the project’s playback speed. Nuke will attempt to maintain this
speed throughout playback, although this adjusts depending on the resolution of the imagery and your hardware
configuration. The Frame Increment field let you specify the number of frames by which the Previous increment / Next
increment buttons cue the sequence.
Keyframe Indication
Select the node <guitar-Maskaa>, on the timeline controls you can see cyan lines underneath some frames. They are
the keyframes animated in the properties of all the nodes with their control panels open.
Keyframed
The Curve Editor Pane
As you add keyframes to a parameter, Nuke automatically plots a curve on its Curve Editor panel, where each value
(the y axis) is plotted as it changes over time (the x axis). You can add keyframes, delete keyframes, and even adjust
the interpolation between keyframes without ever looking at this curve. However, as the animation grows more
complex, you may find it easier to edit the animation by manipulating this curve directly.
The Curve Editor is behind the Node Graph Pane. Select <guitar-Maskaa> and see the keyframes created for this
node. The vertical, or y axis, denotes the value of the parameter. The horizontal, or x axis, denotes time (in frame
units). Click on the area you want to zoom in on or out of. Press the + button to zoom in, or the - button to zoom out
or scroll up with the mouse wheel to zoom in, or down to zoom out. You can see both the Node Graph pane and
the Curve Editor pane at the same time by splitting the pane. You can split pane when you see this icon on the top left
corner. Click on the icon and choose to split vertical or split horizontal.
1. Let’s choose <Split Horizontal>. The Node graph pane is now divided into 2.
2. Click and drag the <Curve Editor> pane to the empty pane. Now you can view both Node Graph and Curve Editor
at the same time as shown below.
3. To close the pane, simply click on the X icon on the top right. Drag the divider to the right or left to open the Node
graph pane.
Divider
4. You can split pane in all panels to create your customized workspace.
Press one of the channel keys again to toggle back and display all channels. The channel set list let you choose a
set of colour channels to display in the viewer. By default, this is set to display the rgba set, but you can choose any
channel set in the data stream.
<r> to display the red Channel. <g> to display green channel and <b> to display the blue channel. <a> to show the
alpha channel. To see the full colour again, example if you type <r> to see the Red channel, to see full colour again,
type <r>. This is a toggle control.
The Zebra Stripe button, when pressed, applies stripes to all out of gamut pixels.
Input 2 Input 1
1. Select the Read Node <rocker_girl> and set it in video input 1. Select the node <Light Wrap> and set the result to
video input 2. So when you switch between 1 and 2, you should see the girl before and after she is processed.
2. From the viewer composite list in the middle, select under. The two images are displayed split-screen in the Viewer.
There are 5 viewer composite display mode. <-> is none, <over> , <under>, <minus> and <wipe>.
3. Drag the handles of the cross hair to adjust the wipe:
• Drag the cross hair centre to change its position.
• Drag the long handle (on the right) to rotate the wipe.
• Drag the arc handle to cross-dissolve the second image.
When you are finished with the split-screen, select none (-) from the viewer composite list.
Arc Handle
Rotation Handle
Position Handle
Region Of
Interest
1. Choose Layout > Restore Layout x to apply a previously saved layout. You can also save your layouts. From the
menu bar, choose Layout > Save Layout to save the current layout.
2. To select a predefined colour scheme, click the right mouse button and choose Edit > Preferences. Then click the
Choose a Preset button and select a colour scheme.
3. Define other appearance options, such as window colours and fonts, by changing the settings under Edit >
Preferences > the Node Graph tab.
Add Directory
Delete Directory
To limit the file list to specific file types, use the filter pull down menu and Sequences check box.
Image size
This is also where you can set proxy settings for this image. You can also set proxy settings for the whole project under
Edit > Project Settings or Hotkey ‘S’ in either the Node Graph Pane or Properties Pane.
Change the proxy scale to 0.2 and now your image’s resolution is now only 20% of the original. When <proxy format>
is the chosen method, you use the <proxy> button to toggle the resolution defined under Project Settings panel. In this
method, you choose what format to proxy your script to e.g. HD to Pal format.
To activate <down-res>:
Choose 4 from the <down-res> list to change the display resolution to 25% of full resolution. Now the viewer shows
the result of adding this <down-res> factor on top of the current proxy mode.
Down-res List
The frame range of the first sequence you read in is used as the global frame range if the ‘lock range’ function is not
ticked. If you add a <Checkerboard> node, the length will also be set to the ‘lock range’.
Changing Colorspace
Missing Frames
When working in a compositing environment, many elements come from different sources e.g. 3D animation in the
process of rendering while you started your compositing script. When you read the file sequences in, you can select
the following :
• error - flag an error message if there is an error in your file sequences.
• black - show a black frame if there is an error in your file sequences.
• checkerboard - show a checkerboard if there is an error in your file sequences nearest frame - replace the error
frame with the nearest non error frame.
In many situations, we need to reformat images through scaling, cropping, and pixel aspect adjustments. By setting
the bounding box using Crop, we can minimize processing and rendering times.
Reformatting Images
This section we learn how to use scaling operations with specific regard to reformatting elements to match specific
resolutions and pixel aspect ratios. Nuke includes at least two nodes designed for reformatting elements: <Reformat>
and <Crop>. When you read in elements, Nuke stores their format settings and makes them available to the
<Reformat> node. You can then apply one of the existing formats to your images, or create, edit, and delete formats
yourself.
Cropping Elements
1. Delete the <Reformat> node and replace in its location with Transform > Crop.
2. Define the crop boundaries: In the viewer, drag on any side of the frame to reposition it. In the Crop properties
panel, increment or decrement the box field (x stands for left side; y, for bottom side; r, for right side; and t, for top
1. Delete the <Crop> node and replace in its location with Transform > AdjustBBox.
2. In the <AdjBBox> node controls, adjust the Add Pixels slider to increase or decrease the size of the bounding box.
By default, 25 pixels are added to the edges of the bounding box. Nuke expands or crops the edges of the bounding
Understanding Channels
Digital images generally consist of the four standard channels: red, green, blue, and alpha. Nuke allows you to create
or import additional channels as masks, lighting passes, and other types of image data. A Nuke script can include up
to 1023 uniquely named channels per compositing script.
For example, you can combine multiple render passes from a 3D scene—an image from the red, green, and blue
channels, a depth mask (z-depth channel), a shadow pass, a specular pass, lighting passes, and multiple mattes all
stored within one image sequence in your composite.
Think of a channel as a container that contains image data. Once created or read into your composite, the image
data stored in a channel is available downstream in the network until the value is replaced with something else or the
channel is removed. All channels in a script must exist as part of channel set (also called a layer). You’re probably
familiar with the default channel set—RGBA—which includes the channels with pixel values of red, green, and blue,
and also the alpha channel for transparency. The channel set list is a group of image channels treated as a single layer.
All channels in a composite must belong to at least one channel set.
3. Attach <mini.full.tga> to the <Viewer> node. Set each image to different viewer buffers to see the other images.
4. Select <mini.full.tga>. Now we are ready to create the new channels / channel sets.
3. The above dialog box will appear. Under Name, enter the name of the channel set. Click on the <rgba> button for
the channels to be filled automatically. Let’s go ahead and create 4 new channels.
<mini.diffuse><mini.reflection><mini.specular><mini.shadow>
4. When you check your newly created channels, they are all empty. This is because there are no information in those
layers yet. We need to copy the right information into the right channels.
5. We can do so by using the Channel > Copy node.
<mini.full.tga>’s current
RGBA channels
Copy
Merging Images
With Nuke, you can merge images in a wide variety of ways. The <Merge> node is used for layering multiple images
together. The <Merge> node with its compositing algorithms allows you to control just how your images are combined.
When layering images with the <Merge> node, you need to select a compositing algorithm that determines how the
pixel values from one input are calculated with the pixel values from the other to create the new pixel values that are
output as the merged image.
The operation menu in the <Merge> node’s control panel houses a large number of different compositing algorithms,
giving you great flexibility when building your composite. Here are some of the more common operations available.
conjoint-over A+B(1-a/b), Similar to the over operation, except Two polygons where a and
A if a>b that if a pixel is partially covered b share some edges but a
by both a and b, conjoint-over completely overlaps b. Normal
assumes a completely hides b. over will produce a slightly
transparent seam here.
copy A Only shows image A. This is useful if you also set the
mix or mask controls so that
some of B can still be seen.
difference abs(A-B) How much the pixels differ. Also Useful for comparing two very
available from Merge > Merges > similar images.
Absminus. Useful for comparing.
disjoint-over A+B(1-a)/b, Similar to the over operation, except Two polygons that touch and
A+B if a+b<1 that if a pixel is partially covered by share an edge. Normal over will
both a and b, disjoint-over assumes produce a slightly transparent
the two objects do not overlap. seam here.
divide A/B,0 if A<0 Divides the values but stops two This does not match any
and B<0 negative values from becoming a photographic operation, but can
positive number. be used to undo a multiply.
multiply AB,0 if A<0 Multiplies the values but stops two Used to composite darker
and B<0 negative values from becoming a values from A with the image
positive number. Also available from of B - dark grey smoke shot
Merge > Merges > Multiply. against a white background, for
example.
out A(1-b) Only shows the areas of image A Useful for combining mattes.
that do not overlap with the alpha
of B. Also available from Merge >
Merges > Out.
over A+B(1-a) This is the default operation. Layers This is the most commonly used
image A over B according to the operation. Used when layering
alpha of image A. a foreground element over a
background plate.
plus A+B The sum of image A and B. Also Useful for compositing white
available from Merge > Merges > smoke or fire shot against a
Plus. * the plus algorithm may result dark background.
in pixel values higher than 1.0. If you
want to clip values to a maximum
of 1.0, use the screen operation
instead.
screen A+B-AB Like plus, but clips pixel values to a
maximum of 1.0. Also available from
Merge > Merges > Screen.
Using Channels
Now that you have created a multi channel open exr image, let’s bring it in and use it in a color correction situation. By
using the different channel information, you will be able to color correct parts of the image accurately.
Select Image
Channel
3. To extract the desired channel out, insert Channel > Shuffle node, in between the image and the viewer. The first
one will be the mini.diffuse channel.
4. Rename the <Shuffle> node’s name to Shuffle_diffuse and under the left ‘in 1’, select <mini_diffuse>. Do another
<Shuffle> node, this time select <mini_specular>.
5. To merge <Shuffle_specular> and <Shuffle_diffuse> together, type ‘M’ to bring in the <Merge> node. In the
<Merge> node, under ‘operation’, change from the default <over> to <plus>.
6. Add a Color Correction > Grade, or Hotkey ‘G’ to insert between <Shuffle_specular> and <Merge>. Try changing
the gamma factor in the <Grade> Node. Only that one channel set is affected.
7. Now for the shadows. Add another <Shuffle> node, this time select <mini.shadow>.
Keying Video
Nuke’s Keyer node provides standard controls for pulling luma keys, green and blue screens, and colour channels. The
Keyer node is a basic keyer with less features than Primatte. But sometime that is all we need. Let’s use this Keyer
node.
4. In the control panel for the <Keyer> node, you’ll see the range graph. The range graph is where you’ll adjust the low
and high pixel values of the matte. The first yellow handle on the left determines the low or transparent values of the
key and second handle, on the upper-right, determines your high or opaque values.
5. Drag the second yellow handle to the right until it reads .90 (approximately), and watch the effect in the viewer in
the alpha channel. Type A to see the Alpha channel and A again to see full color. Play with it until you are happy with
your result. My setting gets the matte inside out. That is ok since a simple invert will do the trick.
6. Add the <Invert> node by clicking Color > Invert and add the node between the <Viewer> and the <Keyer> node.
Make sure in channels <alpha> is selected.
7. Under Filter > Erode (Blur) , use <Erode> to control the edges. My settings (erode_settings) is just a small amount.
In the properties menu of this node, size is set to 1 and blur is set to 0.53.
What Is Premultiply?
Basically, colour can be stored in two different ways in an image with an alpha channel, straight or pre-multiplied.
Straight is easy. Basically, the RGB is left as it is, and the transparency is stored in the alpha channel. Pre-multiplied
means that the RGB is actually (mathematically) multiplied by the value of the alpha channel. Without the Premult node,
the blue background (like a transparent overlay) will be added to the final comp. To take that out, use the Premult
node. Let’s continue with the lesson.
9. Insert a <HueCorrect> node to get rid of the blue spill between the hair. For the compositor, HueCorrect is
obviously of greatest use in diminishing green, blue, or red- screen spill. Nuke’s <HueCorrect> node let you make
precision adjustments to the levels of saturation in a range of hues. You do so via edits to a series of suppression
curves. By choosing which curve you edit and how much of that curve you alter, you can precisely limit the influence of
the effect.
10. Select the blue channel in the properties panel of <HueCorrect> node. Sample the blue by pressing down the
Control (pc) / Command (mac) key while your pointer is over the blue area of the image. The area will be indicated
on the properties panel. Select the point closer to the blue area selected and move the point downwards. Watch the
viewer for the change of color.
11. Now we deal with the background. Type Hotkey ‘R’or contextual menu under Image > Read to bring in Windy_hair
/seaside_still.tif. This will be the background for the girl.
12. A <Blur> node is added to have some control of the background. The <Blur> node is in Filter > Blur or HotKey ‘B’.
Set the blur size to 1.7. Under <Channels>, set it to <all>.
13. We can merge the keyed image to the background now. Type HotKey ‘M’ or under Merge > Merge. Take a look at
14. The foreground plate is not matching with the background plate in the area of black and white region. This is the
region of color that is also known as blackpoint and whitepoint of the image. When both plates do not match, the
composited shot will not look right. So we need to correct this by adding the <Grade> node, matching the foreground
image’s black point and white point to the background image’s black point and white point.
Picker Box
4. Insert a <Grade> node between <HueCorrect> node and <Merge> node. Inside <Grade> node, you should find
blackpoint and whitepoint. Go to the picker box of black and select it. We are going to make the foreground plate
match the background. Find the black area around the rocks. These are shadows that is usually the darkest point
in the picture. Control (pc) / Command (mac) click to select it. Check out the settings on the grade. It is now set to
0,0,0. As suspected it is the blackest point.
5. Now we look for the White point , This time I am look at the foreground plate. The white of her eyes looks like a
good spot to use as the white point. Control (pc) / Command (mac) click on it. The whole image gets brighten up.
Basically we have just reassign the white point and black point of the foreground plate.
You can fine-tune the corrections by adjusting the lift and gain slider. Lift controls the shadow and black areas while the
gain controls the highlight and bright areas.
6. You can use the <Light Wrap> node to create background reflections on foreground elements. The node simulates
scattering of light around the edges of your foreground element. So let’s finish the comp with a <Light Wrap> node.
7. Click Other > All Plugins > Updates first. The list of plugins will rebuild and you should find <Light Warp> there.
Connect LightWrap’s A to the Merge node and B to blurred background node.
8. In the properties panel of <Light Wrap>, set Diffuse as 48.5 and Intensity 0.5.
9. Select the <Viewer> node, right click to go to Render > Flipbook Selected or HotKey Alt + F (pc) / Option + F
(mac). A dialog box will pop out and ask for the frame range.
10. Flipbooking a sequence refers to rendering out range of images (typically at proxy resolution), then playing them
back in order to accurately assess the motion characteristics of added effects.
Primatte will work equally well with any colour backing screen. It does not have to be a specific shade of green or blue.
Primatte Controls
The Primatte algorithm mode delivers the best results and supports both the Solid Colour and the Complement Colour
spill suppression methods. It is the algorithm that uses three multi-faceted polyhedrons to separate the 3D RGB
colorspace. It is also the default algorithm mode and, because it is computationally intensive, it may take the longest to
render. First we look at some of the initalise section of Primatte.
Auto-Compute
The Auto-Compute button can be used as the first step in the Primatte operation. The purpose is to try and do the
first three steps of the Primatte Operation for you. It will try to automatically detect the backing screen colour, remove
it and do some clean-up on the foreground and background noise. If the clip was shot with an evenly lit, well saturated
backing screen, the Auto-Compute button will leave you with an image that may only need some spill removal to
complete your keying operation.
auto FG Factor
The auto FG Factor slider can be used to modify how the Auto-Compute algorithm deals with foreground noise.
Change the position of this slider and you can see the results of the Auto-Compute operation change.
auto BG Factor
The auto BG Factor slider can be used to modify how the Auto-Compute algorithm deals with background noise.
Change the position of this slider and you can see the results of the Auto-Compute operation change.
Degrain Tools
The Degrain tools are used when a foreground image is very grainy like with film noise. As a result of the grain, when
backing screen noise is completely removed, the edges of the foreground object often become harsh and jagged
leading to a poor key. These tools were created to, hopefully, help when a compositing artist is faced with a grainy
image.
Degrain Type
The Degrain type selector gives the user a range of grain removal from ‘none’ to ‘large’. If the foreground image has
a large amount of film grain induced pixel noise, you may lose a good edge to the foreground object when trying to
clean all the grain noise with the Clean BG Noise Actions mode. These tools allow the user to clean up the grain noise
without affecting the quality of the key. Let’s continue with the exercise by using tools from the Actions Section.
Select Operation
Color Picker
4. Clean Foreground Noise by switching the operational mode to <Clean FG Noise>. When this operational mode is
selected, the user samples pixels on the image window known to be 100% foreground. The colour of the sampled
pixels will be registered by Primatte to be the same colour as in the original foreground image. This will make dark gray
areas in the 100% foreground region become white. This is usually the third step in using Primatte.
5. Spill Sponge. When this operational mode is selected, the background colour component in the sampled pixels
(or spill) within the image window is keyed out and removed for the colour region selected. This operation can only be
used once on a particular colour and the amount of spill suppression applied is not adjustable. It is the fastest way to
remove spill from a composite image. For more accurate spill suppression, a Fine Tuning or Spill (+) operation should
follow or be used instead. This can usually be the fourth (and final) step in using Primatte unless additional adjustments
are necessary.
6. Matte Sponge. When this operational mode is selected, the sampled colour within the image window becomes
100% foreground. However, if the sampled colour is already keyed out and removed, it leaves the current ‘suppressed’
colour. It only affects the key or matte information. This tool is usually used to quickly remove stray transparent pixels
that have appeared during the chroma keying procedure. It is a quick and easy way to make final adjustments to a
composite.
7. Restore Detail. With this mode selected, the completely transparent background region sampled in the image
window becomes translucent. This operation is useful for restoring lost hair details, thin wisps of smoke etc. It shrinks
the small polyhedron slightly.
Step One
Step Two
Step One
The <Primatte key> node.
Step Two
Controlling the blue reflection on the guitar by rotoscoping. This is the part where the unwanted blue reflection on the
guitar has to be corrected.
1. A bezier shape is drawn and animated from frame 20 to frame 50. To draw a bezier, insert a <Bezier> node by click
Draw > Bezier or HotKey ‘P’. Attach the node directly to the <Rocker Girl> image node.
2. Holding down the Control (pc) / Command (mac) , click and draw a bezier shape surrounding the guitar. Rename
your node to ‘guitar_rotoMaskaa’.
3. Frame 20 to 50 there are some blue spills reflected on the shinny guitar surface. So let’s put some keyframes
for the bezier. Go to frame 20, click on the animation button and choose ‘Set key’. Once the key is set, make sure
‘Autokey’ is ticked. Future keyframes will be automatically inserted in shape.
Animation button
4. You will also need to animate the Opacity Settings to turn on the Matte / Alpha of the rotoshape at a particular
time.
5. In the Opacity, set keyframe to 0 on frame 24. Select ‘Set key’ in the keyframe menu and go to frame 25 and set
opacity to 1. Add another keyframe at frame 49 with opacity to 1, and at frame 50, opacity keyframed at 0.
6. Using constant setting for the key frames in Curve Editor should do the trick. Control + A (pc) / Command + A
(mac) to select all the keyframes in the graph then choose <Constant> for keyframe interpolation for both the opacity
and shape keyframes.
7. Nuke features two main nodes for channel swapping: <Shuffle> and <ShuffleCopy>. The <Shuffle> node let you
rearrange the channels from a single image (1 input) and then output the result to the next node in your compositing
tree. <ShuffleCopy> node let you rearrange channels from two images (2 inputs) and output the result.
8. Insert a <ShuffleCopy> node to copy the alpha channel from the bezier to the Primatte output. What you get is
only the rotoshape . Add a <Premult> node to isolate the Blue Reflection. Click Merge > Premult and insert the node
after <ShuffleCopy> node.
9. Now that we have isolated that area. Time to key it out with a <Keyer> node. Add a <Keyer> node after the
<Premult> node and change its name to ‘Dealing_Blue_Glare’ .
10. Under the <Keyer> node, switch the operation to ‘bluescreen’ and adjust the range to key the blue reflected spills
from the guitar.
Step Three
Step Three
Now that the problematic guitar areas are isolated, we can start colorcorrecting it by using <HueCorrect> node. Nuke’s
<HueCorrect> node let you make precision adjustments to the levels of saturation in a range of hues. You do so via
edits to a series of suppression curves. By choosing which curve you edit and how much of that curve you alter, you
can precisely limit the influence of the effect.
1. Take from the <rocker_girl> image node and use <HueCorrect> node to suppress and desaturate the offending
blue on the guitar. Check in the range of Frame 22 to 50.
The alpha area isolated in guitar A
2. Using Control (pc) / Command (mac) click on the blue reflected area you should be able to see a line indicating
where the blue colour is appearing on the HueCorrect graph display. Select the Sat’s curve and click on the curve
points and bring it down.
3. Copy the alpha channel from Step Two Controlling the blue reflection to Step Three Blue_reflect_color correction’s
RGB by using the <ShuffleCopy> node.
4. Add another <Premult> node after <ShuffleCopy> node before merging all together.
Step Four
8. You can use the <LightWrap> node to create background reflections on foreground elements. The node creates a
reflection of light around the edges of your foreground element by blending in whatever is in the background. Set the
LightWrap’s Diffuse to 1.5 and set the Intensity to 5.5. That should do it.
Using Histogram
Gain Toggle Display Gain Slider Gamma Toggle Display Gamma Slider
4. Connect a <Viewer> node to the output of the <Grade> node so you can see the effect of your changes. In the
<Grade> properties panel, use the channels pull down list to select the channels you wish to process.
5. To find out where the blackest point in your image is, use the gain toggle to move the gain slider to 64. Now you
can see where the darkest point is. Its about the dog’s nose. Toggle the gain back by clicking on it.
6. Click the blackpoint parameter’s colour swatch. The eye dropper icon appears.
7. In the Viewer pane, press Control + Shift (pc) / Command + Shift (mac) while clicking on the pixel you want to
define as the blackpoint (typically the darkest pixel).
8. Now you can see where the whitest point is. It is in the dog’s eye. Toggle the gamma back by clicking on it. Move it
to about 0.15. Now you can see the whitest point is the in the dog’s eye.
9. Click the whitepoint parameter’s colour swatch. The eye dropper icon appears.
10. In the Viewer pane, press Control + Shift (pc) / Command + Shift (mac) while clicking on the pixel you want to
define as the white point (typically the lightest pixel).
11. This is typically called one light grade. Its a process that all color correction should take as a first step.
12. Make sure when you are selecting the black and white points, that you are selecting from the original image and not
the graded one.
Using Sliders
1. The <ColorCorrect> node is particularly convenient for making quick adjustments to contrast, gamma, gain, and
offset. A single window houses sliders for all these basic corrections and allows you to apply these to a clip’s master
(entire tonal range), shadows, midtones, or highlights.
2. To adjust contrast, gain, gamma or offset with the <ColorCorrect> node: Click Color > ColorCorrect (or press C) to
insert a <ColorCorrect> node at the appropriate place in your script.
3. Connect a <Viewer> node to the output of the <ColorCorrect> node so you can see the effect of your changes.
4. In the ColorCorrect properties panel, use the channels pull-down list to select the channels you wish to process.
5. Drag the slider appropriate to the region you want to affect an operation you want to apply. For example, to
brighten the images highlights, you would drag on the highlights gain slider. Remember too that you can use the colour
sliders to apply any of the corrections on a per channel basis by clicking on the rgba values ‘4’ indicated in the diagram
below.
Expand RGBA Values
Colour Picker
Colour Slider
Keyframe
Using Colour Curves
If you prefer to work with colour curves, you can use the <ColorLookup> node to make contrast, gamma, gain, and
offset adjustments (and, in fact, many others). Colour curves refer to line graphs of a given colour channel’s brightness.
The horizontal axis represents the channel’s original, or input, values, and the vertical axis represents the channel’s
new, or output values.
1. Go to Color > ColorLookup and add the node to the image.
2. You can edit the <ColorLookup> node’s colour curves to make all of the types of corrections that are possible
through the <ColorCorrect> node and you can generally make these corrections with more flexibility and precision than
is possible with sliders.
3. In the ColorLookup properties panel, click red, green, blue, or alpha if you want to limit the subsequent operations
to a particular channel.
4. You can select multiple curves in order to edit one curve with reference to another. Otherwise, select the master
curve.
Whitepoint
Use luminance
key to key the
fur out
5. Use one of the channels in the node’s primary input as the matte.
6. Select the channel you wish to use as the mask from the pull down list.
7. For our case, we just need to select rgba.alpha. Now we can make the dog’s fur brighter. Adjust the gamma to
about 3 in the master control, shadow ‘s saturation 0.88 and midtones’s gamma 2.45. Now the fur is more white.
Nuke offers effects that allow you to correct the hue, saturation, and value components individually or collectively.
Correcting Hue
Nuke’s HueCorrect node let you make precision adjustments to the levels of saturation in a range of hues. You do
so via edits to a series of suppression curves. By choosing which curve you edit and how much of that curve you
alter, you can precisely limit the influence of the effect. For the compositor, HueCorrect is obviously of greatest use in
diminishing green, blue, or red-screen spill.
1. Open a new script. The media files is in Lesson 4 / Media
2. Type Hotkey ‘R’ or contextual menu under Image > Read to bring in ‘MorphB.dpx’ and connect it to the <Viewer>
node.
3. Attach the <HueCorrect> node between the image and <Viewer> node. In the HueCorrect properties panel,
choose the channels you want to influence:
4. Click sat to influence all channels (red, green, blue, and alpha) equally.
5. Click lum to influence all channels, but with luminance weighting in effect (meaning that the red channel receives
approximately 30% of the effect; the green, 60%; and the blue, 10%).
6. Click red to influence only the red channel.
7. Click green to influence only the green channel.
8. Click blue to influence only the blue channel.
9. Click r_sup suppress only the red channel.
Original Saturation
C
B D E
E Drag to rotate the frame around the pivot point. The transform overlay snaps
to typical values. To prevent the snapping, press Shift while dragging
Circle (blue) Drag to scale the image uniformly
Control + drag(pc) / Command + To reposition the anchor point
drag (mac) + inside - circle
Practice
1. Type Hotkey ‘R’ or contextual menu under Image > Read to bring in Lesson 5 / Media/box/Openbox.dpx and
connect it to the <Viewer> node.
2. Add Transform > Transform node, or Hotkey ‘T’ to insert between the image and the <Viewer>. Practice the
transformation overlay.
• There are 3 axis : X axis (transform in left or right direction), Y axis (transform in the up or down directions and Z
axis (transform in the front or back direction). Press Control (pc) /Command (mac) while dragging to rotate the
frame on any axis.
Animating Parameters
Animating a parameter or keyframing refers to the change of value over time. You do so by setting keyframes on
frames at which you explicitly define a value and allowing Nuke to interpolate the values in between. You can animate
most of Nuke’s parameters in this manner.
Set Keyframes
1. Use the <Viewer> node to move to a frame where you want to place a key.
2. Click the animation button next to the parameter you want to animate.
3. Select <Set key> from the drop down menu. The parameter’s input field turns cyan in colour, indicating that a
keyframe has been inserted. Nuke enters the auto-key mode: when you change the parameter’s value at another
frame, it will automatically create a keyframe for you. You can also set a key for all the controls in a node. To do so,
select <Set key> on all knobs from grey area of the properties panel from the right-click menu.
4. Go to the next frame where you want to place a key.
5. Edit the parameter’s value using the input field, regular slider etc. The moment you change the value, Nuke creates
or replace a keyframe.
6. Use the Viewer’s scrubber to preview the result.
Current Frame
Indicator Keyframes
Selected Curve
Expression Field
To zoom to a custom area in the Curve Editor, middle-click on the Editor and drag to select an area with a marquee.
When you release the mouse button, the Editor will zoom to fit the selected area in the Editor.
To Reverse A Curve :
Right-click on the editor and select Predefined > Reverse.
Some nodes under the Transform menu have their own controls for adding motion blur to transformations. Transform,
TransformMasked , Card3D, CornerPin2D, Reconcile3D , Tracker and Stabilize2D. These controls allow you to create
motion blur without adding a separate node for it. Rather than averaging the results of several whole images computed
at steps over the shutter period, a number of samples are taken at many random times over the shutter period. This
effectively gives many more “steps” and thus a smoother looking result for a smaller total number of computations.
When using several of these nodes in a row, the motion blur is concatenated, and the last Transform in the chain
defines the motion blur applied.
In the motionblur field, enter the sampling rate. This affects the number of times the input is sampled over the shutter
time. The higher the rate, the smoother the result. In many cases, a value of 1.0 is enough. Setting the value to 0
produces no motion blur.
In the shutter field, enter the number of frames the shutter stays open when motion blurring. For example, a value of
0.5 would correspond to half a frame. Increasing the value produces more blur, and decreasing the value less.
Shutteroffset to control when the sampling of the input starts relative to the frame being rendered, analogous to when
the camera shutter opened to capture corresponding film or video footage you might have at the same frame.
For example, the figure above shows a close up a high contrast feature that has been rotated clockwise by 45
degrees. The remapped pixels have retained their original values, but the result is a highly aliased, or jaggy, edge.
The Filter selection in the <Transform> node is for dealing with problems due to the spatial transformation of the image,
such as ringing, aliasing, jaggy edges. The solution is to apply a more sophisticated filtering algorithm to determine
the values of remapped pixels—one that takes into account, in some fashion, the values of neighboring pixels. For
example, applying Nuke’s cubic algorithm to the above rotation, results in a softer, less jagged edge
Now that we know more about keyframing. Let’s continue with the project.
1. The transform control on the <Transform> node to control the scale, rotate and translate. Just click and drag to
move the Butterman layer around. Now look at the <Transform> node parameters. Before adding any keyframes, we
need to plan the keyframe animation paths to match her movement.
2. Let’s start the first key frame of butterman at the properties panel of the <Transform> node..
3. On the first frame, he is still in the box. Nuke has Auto Keyframing ability. After you set the first key, the Auto key
will kick in. So let’s position the Butterman to the first position. We have it fly out of the box so we want to move to
slightly below the open box. Set your first keyframe by going to Animation button and select <Set key>. Now move
play head forward and watch the lady’s eyes. See where she is looking at and change direction. Move the Butterman
by clicking on the transform handles and move it to the position we want.
4. Proceed to follow where she is staring and move Butterman according. As you can see every time you move the
Transform handle a new keyframe is setup. You can also click on the Curve Editor and see where your keyframes are.
Play back what you have set up and adjust accordingly. Now you have your transformation all setup, its time to look at
how to get the box in front.
5. Now you can see Butterman flying around, in sync with the girls’ eye movement. You should also see the animation
path. If you do not want to see the path, you can toggle the overlay on /off by pressing the ‘O’ key.
6. But Butterman is coming out in front of the box. So we need to create a bezier to help mask that part out. Add a
<Bezier> node by clicking Draw > Bezier or Hotkey ‘P’.
7. Let’s start by drawing the Bezier mask. While pressing the Ctrl + Alt (pc) Option + Command (mac), click over the
viewer to draw a bezier shape around the box.
8. To adjust the bezier points, right click on the point and choose break. This will let you adjust the tangents
individually. Drag the points and adjust the tangents—the handles on each side of the points—to refine the rotoshape.
One of the features in Nuke’s bezier control is the ability to control the blur edge of each point.
9. To split the blur points out from a single point, select the point, right click to select <blur>. A secondary point will
appear. When you move either points, both points will move together. If you want to separate both points to increase
the distance between them, Control (pc) / Command (mac) select any of the points to move independently. In the
properties panel of <Bezier> node, under <extra blur> and <fall off>, adjust the values till you achieve the kind of blur
desired.
10. Now we need to animate this Bezier over time, following the movement of the box opening to create a moving
matte to make it look like Butterman iscoming out of the box instead of being in front of it.
11. Auto Key function is on for the Bezier. Now let’s animate the shape over time. For your reference, shape keyframes
are set at frame 1, 22 , 28, 34, 36, 43, 49, 55 and 75.
Now we have the mask, let’s use it. Its time to put the bezier in. We want Butterman to be in the box not in front of it.
We can just take the Bezier output and drag it into the <Merge> node we are using right now.
1. Pipe the Bezier(alpha) shape into the <Merge (over)> node. Now, Butterman is behind the box.
2. Add a <Blur> node to help soften the alpha out. Filter > Blur or Hotkey ‘B’. We are going to keyframe this blur so
it will only blur when Butterman is coming out. This makes it look like part of Butterman’s glow ‘leaks’ out of the box a
tiny bit before flying away.
3. Keyframe <Blur> ‘size’ to 0 at frame 30, then on frame 33 is set to about 13.8 and on frame 38, set it back to 0.
4. Set keyframes at Channel 1. Go to frame 29 and set Channel 1 to 0. Go to frame 30 and set Channel 1 to 1. Now
the stars suddenly appear as they pop themselves into the scene.
5. Add a Filter > Glow for the stars to have a little something extra for their layer.
6. Add an additional <Grade> node under the <Girl with the box> node to make her scene darker. Under Color >
Grade or Hotkey ‘G’. Play the compostiion to see the finished work.
Using Paint
Nuke features a vector-based RotoPaint node to help with tasks like rig removal, garbage matting and dust busting.
You can draw Bezier and B-Spline shapes with individual and layer group attributes, including per-point and global
feather, motion blur, blending modes and individual or hierarchical 2D transformations. The Paint node accepts a
single foreground input and up to three background inputs. It requires only the foreground input and uses the optional
background inputs with the Reveal tool and the Clone tool.
To connect the RotoPaint node :
1. Click Draw > RotoPaint to add a new <RotoPaint> node or press <P> on the Node Graph.
2. Drag the <bg> input to the node that you want to apply RotoPaint to.
3. If you plan to reveal pixels from a background element, drag the bg1 input to the node whose output you wish to
use. Repeat the above as necessary with the bg2 and bg3 inputs.
RotoPaint toolbar
These toolbars are placed in the Viewer. The vertical RotoPaint toolbar is for selecting the tool you want to use and
the horizontal one, RotoPaint tool settings, is for adjusting the currently selected tool’s settings before drawing new
strokes/shapes. The controls in this toolbar change depending on which tool you have selected at any given time.
For any changes you want to make to a stroke/shape after you’ve created one, you have to use the controls in the
RotoPaint control panel.
Select Points
Select All Select Curve Select Feather Points
Rectangle
Beizer Tool B-Spline Tool Ellipse Tool
Tool
6. After you’ve drawn strokes/shapes, you can edit their order and group them with the Stroke/Shape list in the
RotoPaint control panel. By default, the newest stroke/shape/group will appear on top of the list.
Stroke/Shape list
Stroke/Shape List
You can edit the stroke/shape list in many ways, and use it to adjust strokes/shapes and how they’re displayed in the
Viewer Pane. You can create groups for sets of strokes/shapes in the stroke/shape list by clicking the Add (+) icon
below the list. It is a good idea to group them as it can get crowded when you start drawing. Here are some of the
tools to help you. Clicking on the icon switch the status of the stroke.
Drawing Shapes
12. You can use the output mask drop-down to select a channel where RotoPaint will output a mask for what it
rendered. By default, the channel is none, but if you choose a channel in the list, the output mask box will be checked.
The mask can be useful, for example, if you need to apply grain to the areas you’ve painted, but you don’t want to
double up the grain in other areas.
13. Premultiply multiplies the chosen input channels with a mask representing the paint strokes and shapes.
Hotkey ‘P’ to add the <RotoPaint> node. Select the Clone brush. Use Shift + Click and Control + Click drag (pc) /
Command + Click drag (mac) to select the brush size and clone location.
Icon Function
Unlimited Lifetime button. To make stroke visible for all frames (the default).

Now to End button. To make stroke visible from the current to end frame.

Current Frame Only button. To make stroke visible only on current frame.

Start to Now button. To make stroke visible from the beginning to current frame.

Set Range button. Enter the start and end frames for the range during which you wish the stroke to
appear and click OK.

18. Make sure you have selected <Stroke will only be visible in this frame>. This will make sure the stroke only applies
to this frame.
19. Continue with your clone brush and advance the frames with the right arrow key. You can also go backwards with
the left arrow key.
20. There should be other scratches till frame 11. After you are done, press play to check out your corrections.
Move to the frame where you want to create a keyframe and select your stroke/shape.Do one of the following:
• If you want to create a key that is set to animate the entire stroke/shape, right-click on the stroke/shape and select
set key > all.
• If you want to create a key that is set to animate a position, right-click on the stroke/shape and select set key >
shape.
• If you want to create a key that is set to animate transformation, right-click on the stroke/shape and select set key
> transform.
• If you want to create a key that is set to animate attributes, right-click on the stroke/shape and select set key >
attributes.
If you have ‘autokey’ turned off, you can only adjust a point in a shape/stroke at a keyframe. In other words, in order
to make changes to a point, you either have to move to an existing key frame on the timeline, or you need to create a
new key frame first.
Ripple Edit
Rippling keyframes
Rippling keyframes allows you to adjust the position of a stroke/shape point on one frame and have that same
relative adjustment applied to the point across all frames or a specified range of frames. This way, you can make non-
animated changes to a stroke/shape which is being animated over a set of frames.
Check the ripple edit box in the RotoPaint tool settings. In the drop-down menu, select:
• all - to ripple all frames in your sequence.
• from start - to ripple frames from the first frame to the current frame.
• to end - to ripple frames from current frame to the last frame.
• range - to ripple a particular range of frames.
DustBust Node
DustBust is another node that can help you help with tasks like rig removal and dust busting. Using the same image,
let’s use <DustBust> node instead to clean up the area.
21. Add a <DustBust> node to open_sea image node. You can find DustBust in Draw > DustBust.
22. By pressing Alt + Command (pc), Option + Command (mac), click on the viewer and you will get these boxes with
a dot in the middle. These are Dustbust boxes. You can move them around by click and hold on the middle dot and
drag them. Once you drag one of them over some area you want to dust bust you will see that it will suck in some of
the surrounding pixels and cover up the dust.
23. You can change the box shape by clicking on the corner and drag.
24. You can also change how the dusk bust box suck in the pixel by clicking and dragging the middle dot and extend a
line out. You can move the line around and see how it affects the dust bust effect.
25. You can press ‘O’ key to turn overlay off to check the corrections. Press ‘O again to see the vector lines again.
26. In the Properties panel of <Dustbust> node, you can change the edge hardness to sharpen the edge by moving the
slider to the right and left.
27. Experiment to see what suits your situation.
Tracking An Image
The 2D Tracker can analyse the movement of up to four different features in a single image. Nuke generates one
animation curve or track for each feature. A single track is usually sufficient to record a feature’s horizontal and vertical
position across the 2D plane. Two or more tracks are required to extrapolate scaling and rotation.
Search Area
Pattern
To move both the search and pattern boundaries : Drag on the frame to select both boundaries with the marquee.
Click on the border of either boundary, then drag both over the pattern to be tracked (stop when the pattern boundary
overlay’s x sits directly on top the feature).
To adjust the size and position of either the search or pattern boundaries : Click to the line-portion of either boundary
to select it. Drag to reposition or scale the boundary.
One of the keying strategy we use is to stabilise the shot first, before we do any keying or compositing. In this lesson,
that is what we are going to do. Together, there will be two scripts.
You can load the two finished scripts to take a look.
• watch_comp (the script which we use stabilise)
• watch_comp_primematte.nk (the script which we finished the comp)
Track the next frame
To calculate tracks :
1. In the Tracker properties panel, check the enable box for each track you wish to calculate.
2. In the Tracker properties panel, click either the frame forward or backward buttons to move to the previous or
next frame. Move through a few frames in this manner to ensure that all enabled track anchors are “sticking” to their
patterns. If a particular track anchor doesn’t stick, experiment with a different position.
3. Once all track anchors stick, click the Tracker’s track forward or track backward buttons to analyse the whole
sequence.
When calculating multiple tracks simultaneously, you may find that some tracks stick with accuracy to the pattern,
while others require resetting and reanalysis. When you’re happy with a given track, uncheck its enable box. This
protects it from recalculation, and let you test other location for trackers that are less successful. If you need to start
over with a given track anchor, you can reset the size of its search and pattern boxes and wipe its existing tracking
data. To clear a track’s animation data: Check the enable box for only the track anchor whose track you wish to
remove. Under Animation Controls, click the clear all button. The selected track’s transformational data is wiped. To
only clear animation forward or backward of the current frame, click clear fwd or clear bkwd.
Smoothing Tracks
Once applied to an element, some tracks may be too much jittery. This is commonly caused by the Tracker too
precisely following the pattern. You can use the Tracker controls or apply smoothing filters to a track’s curves in order
to remove such jitter.
Stabilising Elements
The <Tracker> node’s controls let you remove motion, such as unwanted camera shake, from the node’s input clip.
After tracking, go to the <Settings> tab of the Tracker properties panel. From the warp type pull down menu, select
the transformations that you want Nuke to take into account when stabilising the image, for example Translate /
Rotate / Scale. Go to the <Transform> tab. Under transform, select <stabilize>. Nuke stabilises the footage, locking its
elements to the same position within the composite.
Transform drop down menu
Clone Tool
7. Start cloning and watch out around the edge. Now you should have a very clean watch surface.
8. Add a <Write> node to output your result as a file sequence. Open a new folder on the desktop and save the files
as ‘stablewatch.%04d.exr’ for this exercise.
We have just finished doing what we call a ‘Pre comp’. This is usually where we clean up tracking points and perform
general custodian duties. Now we are ready for the second part of the lesson.
There are many ways to composite this shot with graphics inside the watch. This is just one way of doing it. You will
no doubt find different ways and develop techniques once you get more familiar with NUKE. But for now, let’s take a
look at the finished script ‘watch_comp_primematte.nk’.
Step One
PreProcess_Graphics Group
1. You will notice the watch graphics is 512 by 512. This information is displayed in the <Read> properties panel. The
graphics need to be reformatted to the right size.
2. Add a <Grade> node to control the graphics colour and especially black and white points. Click Color> Grade or
Hotkey ‘G’ to insert a <Grade> node before the <Viewer> node. Under the <Grade> properties panel, change multiply
to 0.58 and gamma to 0.94.
3. Click Transform > Reformat to insert a <Reformat> node after the <Grade> node. This is to reformat the watch
graphics into HD format. Make sure your Project Settings is set to the same format. Type ‘S’ to get to the Project
Settings.
4. Lastly, Click Transform > Transform to scale, rotate and move to match the face. Hotkey ‘T’. Under the <Transform>
properties panel, change translate to x -40 and y -75.
5. Now we start tackling the watch key (Step Two).
Step Two
1. First we need to key the green out of our watch. Connect the <Primatte > node to <StableWatch> image node.
The Primatte keyer includes a quick “Auto-Compute” option that evaluates your image and determines a good baseline
key. From there, you can easily tweak the settings and generate an acceptable matte. Select the green with select
Background color. Hold the Control (pc) /Command (mac) key down and sample the targeted background colour.
Release the mouse button and Primatte will start the compositing process.
2. The second and third steps in using Primatte require viewing the matte or alpha in the Viewer window. Press the ‘A’
key on the keyboard to change to the Alpha view. Change from <Select BG Colour> to <Clean BG Noise>. If there are
any white regions in the dark, `bluescreen area’, it is ‘noise’ (or shades of blue that did not get picked up on the first
sample) and should be removed.
3. If there are dark regions in the middle of the mostly white foreground object, that is, if the key is not 100% in some
portion of the targeted foreground, choose <Clean FG Noise> from the pop-up menu. Use the same techniques as for
<Clean BG Noise>, but this time sample the dark pixels in the foreground area until that area is as white as possible.
We just need a general key since we are not doing any comp using Primatte. We are trying to extract the green surface
as a Key / Matte / Alpha and use it to cut the Graphics. The Matte size needs to be adjustable, so an <Erode> Node
(Filter > Erode) was added to control the size.
4. The Blur will help the edge of the matte a bit. In the properties menu of Blur, under ‘Channel’ select <alpha> and
under ‘size’ set 2.8.
5. Now we start tackling the shadow part of the watch (Step Three). This is where additional details make a better
effect shot.
Step Three
A <ShuffleCopy>
node is used to
put the shape
into the alpha
channel of the
image.
2. A <ShuffleCopy> node can swap a maximum of 8 channels. The <ShuffleCopy> nodes is used to put the shape
into the alpha channel of the image. Follow the flow of the nodes and you will see. The <ShuffleCopy> node is under
Channel. One of the differences between <Shuffle> and <ShuffleCopy> nodes is <Shuffle> node only has one input
source but <ShuffleCopy> node has two input sources.
3. Add a <Premult> node before the <Keyer> node to premulitply the image.
5. Using <ShuffleCopy> node, switch the green channel to the key / alpha channel of the watch surface graphics.
Now we had just translated the shadow of the watch surface to the new background graphics.
6. Add a <Premult> node and merge it back to main group.
7. To view the result, attach a <Viewer> node to the end of the script and press ‘A’ to check the alpha.
Step Four
4. We will also need to add a <ShuffleCopy> node to copy the key from primatte into the result of PreProcess_
Graphics Group. Now we have a watch surface with a slightly larger key.
Step Five
Keyframes generated
from the tracker data
6. You can add additional ‘glare’ to the watch comp by activating the nodes in the watch_comp_primatte.nk
7. View your finished comp in proxy, render a flipbook or write the comp out with a <Write> node.
The Foundry Training Central Asia Pg 100 copyright © Fatbars Limited 2010
LESSON 8 : 3D COMPOSITING
LESSON 8
Nuke’s 3D workspace allows you to setup a 3D composite for camera moves, set replacement, and other applications
where you need to simulate a “real’ 3 dimensional environment. Although the 3D workspace has many potential uses,
you’re most likely to use it—at least initially—to create pan-and-tile scenes.
Nuke is able to take high resolution images and create a parallex scene. These scenes are created with 2D image
planes arranged into a curved shape, and then rendered out through an animated camera to give the illusion of a
seamless environment.
Overview
We start by getting to know our way in Nuke, by learning how to set up a 3D scene in Nuke, and how to add objects,
cameras in the 3D workspace. You’ll also see how to texture objects, transform objects and cameras, and render out
scenes for use in other areas of your script.
The 3D nodes in Nuke appear as round shapes to differentiate them from nodes that perform 2D operations. You
cannot always link a round shape node (3D node) directly to a square node (2D node). However, you can apply an
image to a geometry shape like a card which is part of a Scene node. It will get clearer as we start with a simple scene.
3. You can also switch to the 3D view by using the Hotkey ‘V’ or to other 3D views listed in the diagram. Once you
attached the <Sphere> node to the <Viewer> node. Besides the view chang, you are placed inside the sphere. Press
‘F’ to view the sphere from the outside.
The Foundry Training Central Asia Pg 101 copyright © Fatbars Limited 2010
3D WORKSPACE
LESSON 8
4. Bring in a camera by clicking on 3D > Camera.
5. To navigate in the 3D Viewer :
• Dolly: Press Alt (pc) / Option (mac) and middle-mouse-button drag.
• Pan: Press Alt (pc) / Option (mac) and left-mouse-button drag.
• Tilt: Press Control (pc) / Command (mac) and left-mouse-button drag.
• Spin: Press Control (pc) / Command (mac) and left-mouse-button drag.
• Roll: Press Control +Shift (pc) / Command + Shift (mac) and left-mouse-button drag.
• Look through camera: Select a camera object, press ‘H’.
• Fit the scene: Press ‘F’ to fit the entire 3D scene within the viewer.
6. The media files are in Lesson 8 / Media. Type Hotkey ‘R’ or contextual menu under Image > Read to bring in Stills /
Clouds.tif and connect it to the <Viewer> node.
7. If you press ‘H’, you will realize that the camera is still in the sphere. To see the camera, we must change the
viewing status of the Sphere.
8. Select the Sphere. Under the Sphere’s Properties panel, under display pop up menu, select <off>. Now you can
see the camera. Select the camera’s axis and translate in the z axis, out of the sphere position. Turn the display back
to textured + lines to see the sphere again.
The Foundry Training Central Asia Pg 102 copyright © Fatbars Limited 2010
3D WORKSPACE
LESSON 8
• Click Save Prefs.
10. Connect <Clouds.tif> to the <Sphere> node. Straight away the clouds.tiff is mapped around the sphere. Next, we
are going to learn how to control the cloud map.
11. Because the cloud image is 2D, we can put a <Transform> node below the image to control the location and scale
of the image on the sphere. Add Transform >Transform node. Go to scale and type in 0.5. The image is now scaled
down but the sphere remains at the original size.
12. Now to scale the sphere. Because the sphere is a 3D geometry, you cannot link the transform node directly to it.
You need a node from the 3D > Modify > TransformGeo.
13. Add TransformGeo below the Sphere. In the Properties panel, go to uniform scale and type in 1.5. Now both the
sphere and the cloud map is scaled up.
The Foundry Training Central Asia Pg 103 copyright © Fatbars Limited 2010
3D WORKSPACE
LESSON 8
2D Image and
Transform Nodes
(Square Node)
3D Geometry and
3D Transform Nodes
(Round Node)
Camera Views
To see what the camera sees, we must have a camera. We have already added the camera. So let’s look through it
To look through a camera:
1. Press ‘V’ to make sure you are looking through the 3D perspective view, and not one of the orthographic views.
2. The camera and camera icon must be selected to view through that chosen camera.
Toggle to lock your Select a camera from
camera’s view the list
3. This selection does not change the camera used for rendering. This changes only the camera to “look through” for
the current 3D Viewer. Cameras in the current data stream automatically appear in the list of cameras you can select.
To select a camera that doesn’t appear in list, double-click the camera node to open its panel, and it will be added to
the list.
The Foundry Training Central Asia Pg 104 copyright © Fatbars Limited 2010
3D WORKSPACE
LESSON 8
3D Scene Geometry
Nuke includes several options for inserting 3D geometry into your scenes. You can create primitive shapes, such as
cards, cubes, and spheres, as well as import models created in other 3D applications.
The Foundry Training Central Asia Pg 105 copyright © Fatbars Limited 2010
GEOMETRY
LESSON 8
These are the types of objects you can include in a Nuke 3D scene, and each object is represented by a 3D node in
the script:
• Cards
• Cubes
• Cylinders
• Spheres
• OBJ (Wavefront) objects
• Axis
• Cameras
• Lights
The Foundry Training Central Asia Pg 106 copyright © Fatbars Limited 2010
GEOMETRY
LESSON 8
the pixel value, the greater the displacement.
2. Type Hotkey ‘R’ or contextual menu under Image > Read to bring in Still / Grass1.tif and connect it to the
<Viewer> node.
3. Click 3D > Geometry > Card to insert a <Card> node. Insert a <Camera> node and a <Scene> node as well.
Attach Grass1.tif image to the <Card> node.
4. Under the properties of the <Card> node, under rotation x, type in -90. The card now should be laying down flat.
Move the camera in the z axis until you can see the whole card. Increase the rows/columns to 200 / 200. A higher
number will create a more detailed terrain.
5. Click 3D > Modify > ProceduralNoise to insert a <ProcGeo> node anywhere after the <Card> node and see your
changes.
6. In the Properties panel of the <ProcGeo> node, under <Orientation>, select Y. Under Y size, type in 8.4. Now you
can see terrain.
7. If you click the play button, you will see the terrain animating. This is great if you are making clouds or waves. But
for the terrain, you don’t want it to move.
8. So under <Speed>, type in 0. Now it does not move.
9. Proceed to add a <Constant> node and <ScanlineRender> node as before. Go to the 2D view and you can see the
3D scene in a 2D comp.
The Foundry Training Central Asia Pg 107 copyright © Fatbars Limited 2010
GEOMETRY
LESSON 8
Adding Lights
3D scenes always look better with the lights on. You can add lights in Nuke like other similar 3D software. The nodes
under the Lights panel let you control the lighting in your scene. Using these nodes, you can bring objects out or push
them back, create an illusion of depth, simulate the conditions in the real world, or simply alter the feeling of the scene.
Nuke features four types of light you can use in your 3D scenes: direct light, point light, spot light, and environment
light.
Direct Light
A direct light is a light that emits parallel light in one direction. It appears to illuminate all objects with equal intensity,
as if it was coming from a far away source. Being at an infinite distance from the objects, direct light has orientation,
but no position. A real world example of a direct light is the sun. You can use direct light to simulate sunlight and
moonlight, for example.
The Foundry Training Central Asia Pg 108 copyright © Fatbars Limited 2010
GEOMETRY
LESSON 8
Point Light
A point light is a point in 3D space that emits light in every direction. A real world example of a point light is a light bulb.
You can use point light to simulate light bulbs, lamps, and candles, for example.
Spot Light
A spot light is a point in 3D space that emits a cone-shaped light in a given direction. A real world example of a spot
light is a desk lamp.
Environment Light
An environment light emits multi-coloured light based on an input image. This image-based lighting is generated using
High Dynamic Range Images (HDRI). When HDR images are created, several differently exposed images are combined
to produce a single image of the surrounding environment. As a result, HDR images have a wide range of values
between light and dark areas, and represent the lighting conditions of the real world more accurately.
Light type, Colour and Intensity of the Light node
To use environment light, you first need to shoot a real life environment as an HDR image. Using the Environment Maps
node, you then convert this image into a spherical mapped image. The sphere is used to surround the 3D objects, so
that the mapped image colour illuminates them.
To finish the scene, let’s add a single light into the scene.
1. Select 3D > Lights > Light to insert a <Light> node into your script.
2. For the light to affect a scene, it must be attached to it. Attach <Light> node to the <Scene 1> node. Instantly, you
The Foundry Training Central Asia Pg 109 copyright © Fatbars Limited 2010
GEOMETRY
LESSON 8
can see that the light is influencing the geometry. In the Properties panel of the <Light> node, under light type, select
<Point>
3. Change the colour of the light slightly to a yellow tint and increase the intensity. The whole scene will be much
brighter now.
4. To control how much light the object gets from the light source (based on the distance between the object and the
light source), use the falloff type menu. A Linear type diminishes the light at a fixed rate as it travels from the object,
whereas Quadratic and Cubic types diminish the light at an exponential rate. If you select <No Falloff>, the distance
between the light source and the object does not affect the lighting.
5. Change the different fallout type to see the different effect. You can keyframe the lights to move on your terrain.
Projection Cameras
In addition to viewing and rendering a 3D scene, cameras can also project a 2D still image or image sequence
onto geometry in the scene. This is similar to the front-projection systems used in practical photography, where a
background image or other element is projected onto the stage and photographed with other elements.
The Foundry Training Central Asia Pg 110 copyright © Fatbars Limited 2010
PROJECTION
LESSON
CAMERA
8
3. Insert a <3D geometry> node, for example a cube after the <Project3D> node and connect it to a <Scene> node.
4. Move the Projection_Camera away from the cube, and the results is that the clouds is now projected onto the
cube.
5. Insert a <ScanlineRender> node from 3D > ScanlineRender. Add a <Constant> node to the bg as before. But add
a new camera to the scene.
6. This new camera will be seeing the projected result, but not controlling the projection.
7. Attach <ScanlineRender> node to the <Viewer> node and you can see the scene in 2D view by pressing ‘tab’ or
change on the right side of the Viewer.
The Foundry Training Central Asia Pg 111 copyright © Fatbars Limited 2010
PROJECTION CAMERA AND CREATE A PARALLEX
LESSON
SCENE
8
Parallax Scene
In this exercise, we are going to create a parallax scene, with high resolution stills and moving elements and create a 4
sec pan shot of a landscape. You can start by opening the script in Lessons 9 / Scripts /Parallex.nk. We start from the
furthest layer first, the clouds.
The Foundry Training Central Asia Pg 112 copyright © Fatbars Limited 2010
CREATE A PARALLEX
LESSON
SCENE
8
Step One
The Foundry Training Central Asia Pg 113 copyright © Fatbars Limited 2010
CREATE A PARALLEX
LESSON
SCENE
8
9. First we need to add an <Axis> node. Click 3D > Axis. To rotate, add another <TransformGeo> node. Attach
the axis source of the <TransformGeo> node to your own axis. Make sure <TransformGeo> node comes after
<MergeGeo> node.
10. Then in <Axis> node Properties panel, rotate x 23 degrees. Now both cards stay parallel but rotated.
The Foundry Training Central Asia Pg 114 copyright © Fatbars Limited 2010
CREATE A PARALLEX
LESSON
SCENE
8
5. Now to check the scene in 2D. Attach the clouds’ tree to a <Scene> node. Then the <Scene> node to a
<ScanlineRender> node. The keyframed camera to the camera source of the <ScanlineRender> node and a
<Constant> node to the bg source.
6. Attached a <Viewer> to see the scene in 2D. A nice slow pan across a sunset scene. Now to add some trees.
Adding Elements
1. Type Hotkey ‘R’ or contextual menu under Image > Read to bring in Tree.tif and Other tree.tif and connect it to the
<Viewer> node.
2. Add 3D > Geometry > Card. Attach both trees to the 2 separate <Card> node like the clouds.
Step Two
3. Put both trees in the following coordinates. Tree’s <Card> node : translate x -0.252 y -0.031 and z 1, rotate y 180
and scale at xyz 0.3. Other Tree’s <Card> node : translate x 0.159 y -0.094 and z 0.5, no rotation and scale xyz at 0.3.
4. To make the scene more realistic, we are going to defocus both trees so that they don’t look so sharp. Add Filter >
Defocus to both trees images and set them to defocus at 1.2.
5. Now for keyframes. We are going to darken and defocus other tree as the camera pans across. Add Filter > Grade
to the other tree. Select Grade properties. On the first frame, under Gamma, set it to 0.9. On frame 99, set it 0.8.
6. Now for the <Defocus> node. Under the Properties panel, on the first frame under defocus, set a keyframe there.
On the last frame, set it at 4.4.
7. Now the other tree darkens and defocuses as the camera pans across.
The Foundry Training Central Asia Pg 115 copyright © Fatbars Limited 2010
CREATE A PARALLEX SCENE AND IMPORT CAMERA
LESSON
DATAS
8
4. Choose one Snow <Card> node and translate it to x 0.358, y 0.017 and z 0.086. The other snow node is place
closer to the camera. This is to give an illusion of depth. Its x is -0.022, y -0.082 and z 0.6.
5. Now go to the 2D Viewer and add a <Write> node to render the scene out.
Import Export
other selected
camera’s camera’s
channel channel file
file here here
The Foundry Training Central Asia Pg 116 copyright © Fatbars Limited 2010
IMPORT CAMERA
LESSON
DATAS
8
Before the exercise, we have sent Lesson 8 / Media / background / 3D background to SynthEyes to extract the
camera data. Inside SynthEyes, you can export data to many formats. Nuke 5.1 is one of them. We exported the
camera data into a standalone *chan file, so that we can built our 3D scene from scratch.
Step One
5. There are some distinct problems you can see before merging. The girl footage is a shot with video fields and will
need to be deinterlace before combining with a camera that is shaking. Her colours need to be colour corrected to
match the backgrounds as well.
6. So let’s tackle the Deinterlace problem first. Deinterlace in Nuke is a Gizmo and can be found under Other > All
Plugins. If you cannot see the list, select ‘Update’ and the list will show up.
The Foundry Training Central Asia Pg 117 copyright © Fatbars Limited 2010
IMPORT CAMERA
LESSON
DATAS
8
Understanding Gizmos
Nuke allows artists and technical directors to create gizmos, which are simply groups of Nuke nodes that may be
reused by other artists. These are equivalent to Shake’s macros. Studios commonly use gizmos to consistently
apply certain colour grading techniques, process incoming footage according to a particular conversion formula, and
process outgoing footage in preparation for film printing.
A gizmo is a <Group> node that you create and save in a separate .gizmo file in your Nuke plug-in folder. Nuke scripts
can use this gizmo just like any other node type. Saved scripts only contain the name and control settings for the
gizmo; the definition is in the gizmo file and it is read at the same time the script is loaded into Nuke. Thus, you can
alter the implementation of the gizmo and change all the scripts that are using it.
9. Select both the <Reformat> node, in their Properties panel, under output format, select HD 1920 x 1080. The girl
should be back to normal.
10. Add a <Card> node from 3D > Geometry > Card, assign the output of the interlaced keyed girl to the <Card> node
as the image.
11. Add the Girl to the <Card> node to a <Scene> node, and down stream to a <ScanlineRender> node. Assign the
cam source of the <ScanlineRender> node to the Camera with the data.
12. Now to merge the girl and the background together. Add a <Merge> node after the <ScanlineRender> node. Input
that as A and Background as B.
13. The girl is now moving with the background. But it is in the wrong location in the 3D space. Select the <Card> node
of the girl and set these location : x 19.6007 Y 1.32 Z -0.31099. Now you should see the girl coming in on the left and
stopping around the center.
14. Now to <ColourCorrect> node. Add A <ColourCorrect> node in between <Deinterlace> and the <Card> node.
Also add a <LightWrap> node to make the comp for convincing. LightWrap is another gizmo in Others > All Plugins >
LightWrap. LightWrap is set with diffuse at 4 and Intensity at 3.
The Foundry Training Central Asia Pg 118 copyright © Fatbars Limited 2010
IMPORT CAMERA
LESSON
DATAS
8
Step Two
15. The background is less saturated than the girl. At ColourCorrect’s Properties panel, untick green, under Master
<saturation 0.75> <contrast 0.95><gamma 0.85><gain1.2>, inn Shadows (saturation 0.9).
The Foundry Training Central Asia Pg 119 copyright © Fatbars Limited 2010
IMPORT CAMERA
LESSON
DATAS
8
TimeBlur simulates this phenomenon by sampling its input at ‘divisions’ times over ‘shutter’ frames starting at the
current frame plus ‘offset’.
Timeblur is commonly applied to garbage masks that are tracked to a fast moving feature. The time blur averages the
incoming mask image over the shutter period, better match the motion blur in the original image and creating a more
convincing integration.
1. Click Time > TimeBlur to insert a <TimeBlur> node into your script. Place it after the <Merge> node.
2. Set the shutter <1> or shuffleoffset <0.06>.
3. Add a <Write> node at the end and it’s ready to be written out.
The Foundry Training Central Asia Pg 120 copyright © Fatbars Limited 2010
LESSON 9 : TEMPORAL OPERATIONS
LESSON 10
This lesson is about the temporal or time-based operations in Nuke. You learn how to distort time by slowing down,
speeding up, or reverse clips, applying motion blur with TimeBlur Filter.
Distorting Time
Time distortion changes the length of time required to playback a clip in your composite. These operations generally
fall under one of two categories: retiming and warping.
Retiming is the process of slowing playback by adding frames, or accelerating playback by subtracting frames.
Warping is the process of slowing down, speeding up, or even reversing playback on a clip without necessarily altering
the overall length.
Simple Retiming
Nuke’s Retime node let you change the playback time for all the frames in a clip or for range of frames within the clip. It
does this by dropping or duplicating frames. You can also use it to reverse the clip playback.
• When you read a R3D file, there are Properties panels in the <Read> node by default tohelp you decode into
The Foundry Training Central Asia Pg 121 copyright © Fatbars Limited 2010
TEMPORAL OPERATIONS
LESSON 10
REDspace. The gamma curve is also set to REDlog. As R3D (Redcode Raw Video Image) is a raw format, inside
the <Read> node, the debayer function is still on debayer detail.
• You can also control other settings like exposure, contrast, brightness.
• For this lesson, the actual red file had been exported into dpx using <FrameRange> and <Reformat> node to
select a portion of the file and reformat into a HD size dpx file.
• For your reference, a diagram of the Red file properties is included in this lesson.
3. Add a <Grade> node to adjust the black and white points of the image. Under Color > Grade or Hotkey ‘G’ .
4. Click Time > Retime to insert a <Retime> node into your script.
5. Enter a value in the speed parameter. Values higher than 1 increase playback speed; values less than 1 decrease
playback speed.
6. Check the reverse box if you want to play the clip backwards—making the last frame the first, the first frame the
last, and so on. Increase the shutter parameter to enable frame-blending.
<in> and <out> frame
Higher values
increase speed
The Foundry Training Central Asia Pg 122 copyright © Fatbars Limited 2010
TEMPORAL OPERATIONS AND OPTICAL
LESSONFLOW
10
Frame Blending
The <FrameBlend> node interpolates frames by generating an additive composite of the frames that precede and
follow it, rather than creating mere copies between the existing frames. This method creates “ghosting” around all fast
moving features and may look odd when viewed as part of a still frame, but will contribute to smoother motion during
actual playback.
Ghosting No Ghosting
OFlow Retiming
The <OFlow> node generates high-quality retiming operations analysing the movement of all pixels in the frames and
then rendering new “in-between” images based on that analysis. This node can also add motion blur or enhance the
existing motion blur in the image.
Switching Timing
Methods
The Foundry Training Central Asia Pg 123 copyright © Fatbars Limited 2010
OPTICAL
LESSON
FLOW
10
6. In this lesson, we are going to use <Source Frame> to control the speed change.
7. You can map input to output frames to retime the clip by switching Timing from <Speed> to <Source Frame>.
8. Type ‘S’ for Project settings and set the frame range from the original ’82 / 108’ to ’82 /220’.
9. Under <OFlow> node Properties panel, select ‘Source Frame’ under Timing.
10. Go to frame 82 to set the first keyframe. Under Frame, click on the keyframe icon and choose ‘Set Key’ on the
contextural menu.
Change from Speed
to Source Frame Animation button
11. Go to frame 200 and set the next keyframe by setting the Frame to 93. At frame 93 in the original clip, the hand just
reaches the keys. By setting the keyframe at 200, you effectively stretch frame 93 to frame 200.
12. Go to frame 220 and finish the Optical flow exercise by setting another keyframe ‘108’. You just moved the last
frame of the original clip ‘108’ to frame ‘220’.
The Foundry Training Central Asia Pg 124 copyright © Fatbars Limited 2010
OPTICAL
LESSONFLOW
10
13. Go the animation button and select <Curve Editor> to view the animation curve. Select the different methods to
see the interpolation.
OFlow Parameters
The following table describes the different parameters in the <OFlow> node’s controls.
The Foundry Training Central Asia Pg 125 copyright © Fatbars Limited 2010
OPTICAL
LESSON
FLOW
10
Filtering Sets the quality of the filtering when producing in-between frames.
• Normal - uses bilinear interpolation which gives good results and is a lot quicker
than extreme.
• Extreme - uses a sinc interpolation filter to give a sharper picture but takes a lot
longer to render.
Warp Mode Sets how to control the new timing of the clip.
• Simple - this is the quickest option, but may produce poor results around moving
objects and image edges.
• Normal - this is the default option with better treatment of moving objects and
image edges.
• Occlusions - this is the advanced option which attempts to reduce the level of
background dragging that occurs between foreground and background objects.
Correct Luminance Local motion estimation is highly dependent upon the idea that the brightness of
objects don’t vary through a sequence. Where brightness varies rapidly - for example
a highlight moving across the bodywork of a car - the motion calculation will perform
poorly. The luminance of a shot can come from other sources too - such as an overall
flicker problem. In these cases where there is a global luminance shift, toggling this
control on will allow the local motion estimation algorithm to take account of overall
brightness changes between frames.
Automatic Shutter Time Calculates the shutter time throughout the sequence automatically.
Shutter Time Sets the equivalent Shutter Time of the retimed sequence. A shutter time of 1 is
equivalent to averaging over plus and minus half an input frame which is equivalent to
a shutter angle of 360 degrees.
Shutter Samples Sets the number of in-between images used to create an output image during the
shutter time. Increase this value for smoother motion blur, but note that it takes much
longer to render.
Vector Detail Adjust this to vary the resolution of the vector field. Large vector fields take longer to
process, but contain more detail and may help to isolate smaller motion in the scene.
A value of 1 will generate a vector for every pixel. A value of 0.5 will generate a vector
at every other pixel. For some sequences, a high vector detail near 1.0 generates too
much unwanted local motion detail and often a low value will give a better result.
Smoothness Vector fields usually have two important qualities: they should accurately match
similar pixels in one image to another and they should be smooth rather than noisy.
Often it is necessary to trade one of these qualities off against the other. A high
smoothness will miss lots of local detail, but is less likely to provide you with the
odd spurious vector. A low smoothness will concentrate on detail matching, even
if the resulting field is jagged. The default value of 0.5 should work well for most
sequences.
Block Size The vector generation algorithm subdivides the image into small blocks, and
separately tracks them. Block Size defines the width and height of these
subdivisions. Smaller values will produce noisy data, whereas larger values may
produce data that is lacking in detail. This value should rarely need editing; some
sequences may benefit from using large block sizes to help the algorithm track
regions better where the algorithm isn’t “locking on” to the overall motion in the
sequence.
Tolerances For efficiency, much of the local motion estimation is done on luminance only - i.e.
using monochrome images. The tolerances parameters allow you to tune the weight
of each colour channel when calculating the image luminance. These parameters
rarely need tuning.
Weight Red The red weighting used when calculating the vector field.
Weight Green The red weighting used when calculating the vector field.
Weight Blue The blue weighting used when calculating the vector field
The Foundry Training Central Asia Pg 126 copyright © Fatbars Limited 2010
OPTICAL
LESSONFLOW
10
Show Vectors Switch this on to draw the motion vectors over the image.
About Shows the version number of this node.
Warping Clips
Warping refers to slowing down, speeding up, or even reversing select frames in a clip without necessarily altering
its overall length. For example a clip that slows down midway and speeds up again to finish the movement. You
can achieve such a warp by sculpting the curve in Nuke’s TimeWarp curve, which is a part of the <Retime> node’s
parameters.
speed up
slow down
The basic “rules” for editing the warp curve are as follows:
• To slow down motion, decrease the slope of the curve.
• To speed up motion, increase the slope of the curve.
• To reverse motion, create a downward sloping portion on the curve.
To warp a clip:
1. Click Time > Retime to insert a <Retime> node into your script.
2. Click the TimeWarp tab to reveal the TimeWarp curve.
3. Sculpt the TimeWarp curve according to the rules above. ( Control + Alt click (pc) /Command + Option click (mac)
to insert keyframe knots on the curve; Control + drag (pc) / Command + drag (mac) to reposition keyframe knots;
Control + drag (pc) / Command + drag (mac) to rotate a keyframe knot control handles.
4. If you want to enable frame blending on the output, either input a value larger than one in the <Retime> node’s
shutter parameter, or insert a <FrameBlend> node prior to the <Retime> node.
The Foundry Training Central Asia Pg 127 copyright © Fatbars Limited 2010
EDITING
LESSON
CLIPS
10
Time blur is commonly applied to garbage masks that are tracked to a fast moving feature. The time blur averages the
incoming mask image over the shutter period, better match the motion blur in the original image and creating a more
convincing integration.
Editing Clips
As a node-based system, Nuke doesn’t have a timeline. But you can still perform basic editorial operations.
Slipping a clip refers to moving it backward or forward in time.
1. Click Time > TimeOffset to insert a <TimeOffset> node into your script. Place it downstream from the element to
which you want to slip.
2. Attach a <Viewer> node to this node, so you can see the effect of your changes.
Cutting a clip refers to shortening it by removing frames from its head or tail.
1. Click Time > FrameRange to insert a <FrameRange> node into your script. Insert it downstream from the element
to which you want to cut.
2. Attach a <Viewer> node to this node, so you can see the effect of your changes. Adding the <FrameRange> node
to shorten the clip from ‘108’ to ‘101’.
Splicing refers to joining clips head-to-tail, thus allowing action to flow from one shot to the next. When you splice
The Foundry Training Central Asia Pg 128 copyright © Fatbars Limited 2010
EDITING
LESSONCLIPS
10
clips, you have options for:
• Fading to or from black.
• Dissolving from the first to second clip.
• Slipping the combined clip in time.
1. Click Time > AppendClip to insert an <AppendClip> node into your script.
2. Attach its 1 and 2 pipes to the clips you want to join. (The clip attached to pipe 1 will precede the one attached to
pipe 2.)
3. Attach a <Viewer> node to this node, so you can see the effect of your changes.
4. In the Fade In and Fade Out fields of the <AppendClip> node properties panel, type the number of frames, if any,
you want to fade to or from black.
5. In the Cross Dissolve field, type the number of frames, if any, of overlap you want between the first and second clip.
The Foundry Training Central Asia Pg 129 copyright © Fatbars Limited 2010
LESSON 10 : WARPING
Nuke’s warping and morphing tools allow you to distort elements in an image, apply and correct lens distortions,
and morph one image into another. The nodes designed for these operations include the <GridWarp> node, the
<SplineWarp> node, and the <iDistort> node. In this chapter, we focus on the <GridWarp> and <SplineWarp> nodes.
The process of warping uses only one image.
Warping
Warping refers to manipulating an image so that elements in the image are distorted. Warps are transformations that
only affect some of the pixels in an image rather than all of them. For example, you might make an animal’s eyes bigger
or a person’s smile wider without affecting the rest of their features.
3. Connect both the src and the dst input and a Viewer to the image.
4. When the GridWarp properties panel is open, you can see the source and destination grids appear as small
overlays in the viewer. The source grid is pink, and the destination grid blue. In the following steps, you use the pink
source grid to define which areas you want to warp and the blue destination grid to define where to warp these areas
to.
5. To make the grids the same size as the input image, click the ‘image size’ buttons under both Source Grid and
Destination Grid.
The Foundry Training Central Asia Pg 130 copyright © Fatbars Limited 2010
WARPING
6. For now, check hide under Destination Grid to hide the blue destination grid in the Viewer. This way, you can’t
accidentally distort the image yet.
7. When Warping, the pixels around the area do move because accommodating the change this way often produces
The Foundry Training Central Asia Pg 131 copyright © Fatbars Limited 2010
WARPING
more realistic results. However, the distortion lessens the further you get from the moved pixels. You also have some
control over which pixels are moved and which are not, and can isolate the warp to a small area.
8. The ideal situation, the subject you are going to warp is a subject you can key out or rotoscope to isolate it from its
background before you create the warp. This way, you can be sure that the background stays intact. The mini cooper.
exr has alpha channel and the shadow and the background are all separate elements. So this is an idea situation.
9. You can use the grid lines to isolate the areas you do not want to warp. You do this by adding lines between the
area you intend to warp and the area you don’t want to change. We want to move only the front and back of the mini
cooper. The middle section of the car is not warping. So let’s add more points to the grid.
10. Click on <add> button on the source grid and hide the destination grid. Click on an existing grid line in the Viewer.
If you click on a horizontal line, a vertical line is added to the grid. If you click on a vertical line, a horizontal line is added
to the grid. The lines can be further apart in the areas that you don’t intend to warp.
11. When you select a point, four tangent handles appear around it. You can use these handles to modify the curves
connecting the points.
12. To move several points together, draw a marquee around them and use the transformation overlay that appears.
Try enlarging the front wheel. Select the points surrounding the wheel and the 2D Transformation Overlay will appear
for you to adjust.
13. Now we need to put keyframes to see the warping animates. Go to frame 1 and set keframe in the distortion field.
The Foundry Training Central Asia Pg 132 copyright © Fatbars Limited 2010
WARPING
‘0’ is the distorted wheel and ‘1’ is the original. Set the original at frame 30. Now you can see the warping animation.
Animation button
You can continue the exercise by warping the front and back of the car. If you want to see the whole animation, open
script /grid_morph.nk.
14. The shadow of the car needs to warp as well. Select the <GridWarp> node , under Edit > Clone or Alt + K (pc)
Option + K (mac). Attach the cloned node to the background_shadow.tif. Now when you adjust one warp, the other
will follow as well.
15. To better see what the warped image looks like, press ‘O’ on the <Viewer> node to toggle the overlay off. To
compare the original and warped images, press D repeatedly on the <GridWarp> node to disable and enable it.
Clone
Node
16. If you see changes in the areas you don’t want to warp, go back to modifying the destination grid.
17. In addition to performing creative manipulations on the shapes of the subjects in your images, you can also use
warping to simulate different types of film or video lenses or to remove unwanted lens distortions.
The Foundry Training Central Asia Pg 133 copyright © Fatbars Limited 2010
MORPHING
Here are some of the controls:
Morphing
Morphing refers to dissolving two images together so that the subject of one image seems to change shape and
turn into the subject of the other through a seamless transition. A morph can be easily noticeable or very subtle. An
example of a noticeable morph would be a man turning into a woman or one animal turning into another, whereas a
transition from an actor to his stunt man would result in a much more subtle morph.
Morphing can be a time-consuming task, but it can be made easier by good advance planning of the shots. The more
similar the characteristics, position, and movement of the subjects you want to morph are, the easier it is to morph
them together. The process of morphing use only two images.
3. Here are the basic steps. The watch straps and and watch faces have to be separated. This can be done using
Bezier spline to create the matte to ‘cut’ the elements out. Open the elements script to see how the elements are
created. Open script: Lesson 10 / Scripts / elements_watch.nk. Press 1 to 4 to see the different inputs from each of
the process trees.
4. One of the process tree ‘Iso for Watch Band’ uses two Bezier to get the watch band out. <WholewatchBezier>
node is the outside of the entire watch and <InsideGreenwatchBezier> node is the inside of the watch. After the watch
The Foundry Training Central Asia Pg 134 copyright © Fatbars Limited 2010
MORPHING
strap elements are separated, we are ready for warping.
5. We have two watch faces to deal with. One has a green face that needs a digital display graphics and the other
one has an orange face. In the script you should see ISO_for_watchband. This is a simple task to get the watch band
isolated. Watch out for the two shapes that used in this roto. Inside GreenWatch Bezier’s Colour was change from
black instead of leaving it white. This punch a hole in the WholeWatchBezier shape. The bezel and watch surface are
treated separately.
6. Lastly, a simple Bezier to isolate the whole watch from the background. This will help the warping. As you can see
after isolating the portion of image a <ShuffleCopy> node is use to combine the Bezier to the image and a premult is
added.
7. This will add Alpha to the image. Now we have R, G , B and A. This enables us to cut the portion of image we
need out of the original.
8. Finally we write out each of the process tree.
The Foundry Training Central Asia Pg 135 copyright © Fatbars Limited 2010
MORPHING
6. <AppendClip> node allows you to join multiple sequences to make one long image sequence .Add the
<AppendClip> node after <FrameRange> node to append the clip and create a dissolve between watchgraphics.exr
and iso_orangeface.exr. Set Cross Dissolve to 15 frames.
The Foundry Training Central Asia Pg 136 copyright © Fatbars Limited 2010
MORPHING
7. Add a <Constant> node to the <Bezier> node. Set the <Constant> node to HD format. A Bezier with soft edge is
drawn. By right clicking on the Bezier control points, you get the options out. Choose the smooth option. When click
Control + Alt (pc) Command+ Option (mac) on the bezier lines, you can extend the soft edge as shown in the next
diagram. You want to pick up a bit of the detail of the green screen on the edge.
8. Add a <ShuffleCopy> node, attaching 1 to the <Bezier> node and 2 to the <AppendClip> node. Choose <Alpha>
for 1 and RGB for 2. Add a <Premult> node after <ShuffleCopy> node and this element is ready to be used.
The Foundry Training Central Asia Pg 137 copyright © Fatbars Limited 2010
MORPHING
1. Type Hotkey ‘R’ or contextual menu under Image > Read to bring in Watch1_prep / iso_greenface.exr.
2. Type Hotkey ‘M’ to bring in the <Merge> node. Set the Merge source A to the Watchface process tree and source
B to iso_greenface.exr as shown.
Type Hotkey ‘R’ or contextual menu under Image > Read to bring in Watch1_prep/iso_orangeface.exr.
1. Under Transform > Splinewarp, add a <SplineWarp> node with the source attached to the <Merge> node and the
destinations to iso_orangeface.exr.
2. We are warping between two different watch faces using a <SplineWarp> node. The trick of setting up SplineWarp
is to keep it simple. The watch faces and the watch bands are individually controlled by two separate Splinewarp.
This will give better warp control and warp animation when you are testing and experimenting your warp’s timing.
The Foundry Training Central Asia Pg 138 copyright © Fatbars Limited 2010
MORPHING
3. Make sure show both curves is not checked and show is set to blend. The <Spinewarp> node has very little
parameter. The Show options in the properties menu allows you to look at either the Source/Src shape and
Destination/dst shape. To animate the warp, make sure autokey is checked in the <SplineWarp> node’s controls. This
way, the curves you will soon create will automatically be set as key shapes for the animation.
4. These are the Bezier shape that is going to warp from and to. Source to Destination. To add a shape press and
hold Option + Command + click. You will be adding Bezier line. The Bezier line is not a closed shape. To close the
curve right click on the starting control point and you will get a contextural menu. Pick and choose the close curve
option when you finish drawing.
5. Go back to the Parameter window and switch to show Dst/Destination shape. You will notice a copy of the shape
is drawn for the destination too. All you need to do now is to manipulate the Dst shape to the state that you want your
final shape to be.
6. There is a set of controls that let you set and see what is happening to your shape warps. First use show with
blend option. This will allow you to see what the warp going to look like when you manipulate the distortion slider.
The blend slider contorls blending between the source and destination images. Play with different settings of distortion
and blend to get a feel of what is happening between your warp shapes. Remember to untick Autokey. We will leave
keyframe setting for later. Keyframing is easier to set if we use the Curve Editor panel.
7. The above pink beizer shape is the source shape that we want. You can see that the pink bezier shape has very
simple control points, only 4.
8. The Blue Bezier surrounding the orange watch face is the target. Once you get the shape right, it’s time to look at
the keyframes.
The Foundry Training Central Asia Pg 139 copyright © Fatbars Limited 2010
MORPHING
The Foundry Training Central Asia Pg 140 copyright © Fatbars Limited 2010
MORPHING
Animation button. This button allows you to set keyframes. The thing to remember is that Nuke has auto keyframe.
Once you set one keyframe, the auto keyframe start.
2. For distortion and blend, frame 1 is 0, at frame 24, distortion is 0.060, blend at 0.0012. At frame 35, distortion is 1
(no keyframe here for blend), and at frame 37, blend is at 1 (no keyframe for distortion).
3. This completes the watch face. Try changing the keyframes’ location till you are happy with the results. Now for the
watch band.
4. Type Hotkey ‘R’ or contextual menu under Image > Read to bring in Watch1_prep / iso_watchnew.exr and Watch1
/ iso_orangewholewatch.exr.
5. Under Transform > Splinewarp, add a <SplineWarp> node with the source attached to the <iso_watchnew.exr>
node and the destinations to <iso_orangewholewatch.exr>. We are warping between two different watch using a
<SplineWarp> node.
The Foundry Training Central Asia Pg 141 copyright © Fatbars Limited 2010
MORPHING
6. As before, to add a shape and press hold Alt + Command (pc) or Option + Command (mac) then click. You will be
adding and reshaping the Bezier shape for the source and the destination and set keyframes.
7. Distortion values : frame 1 is 0, frame 20 is 0.05, frame 28 is 0.89 and frame 34 is 1. Blend values : frame 25 is 0,
frame 31 is 0.24 and frame 39 is 1.
8. The following diagram is the combined curves of both <Warp> node. Notice that it is all a play of timing offset of
Distort first and Blend later.
The Foundry Training Central Asia Pg 142 copyright © Fatbars Limited 2010
LESSON 11 : STEREOSCOPY COMPOSITING
LESSON 11
2. At the bottom, click ‘Set up view for stereo’. The left and the right view will be created automatically. Now your
views are set for stereoscopic project. Tick “Use colours in UI?” to make the Viewer’s left and right views use the
colors defined in the Project Settings.
The Foundry Training Central Asia Pg 143 copyright © Fatbars Limited 2010
SETTING UP BASIC STEREOSCOPIC
LESSON
SCRIPTS
11
The Foundry Training Central Asia Pg 144 copyright © Fatbars Limited 2010
SETTING UP BASIC STEREOSCOPIC
LESSON
SCRIPTS
11
3. To add colour into the images, drag right on the amtcolour slider, or insert a value between 0 (grey scale) and 1
(coloured) into the amtcolour input field.
4. To control where the images appear in relation to the screen when viewed with anaglyph glasses, enter a value
in the horizontal offset input field. Shift the horizontal offset to change the apparent depth of the image. To have the
images appear in front of the screen, you would usually enter a negative value. To have the images appear further
away, you would usually enter a positive value. (This is not the case if you have swapped the left and right views
around.)
The Foundry Training Central Asia Pg 145 copyright © Fatbars Limited 2010
SETTING UP BASIC STEREOSCOPIC
LESSON
SCRIPTS
11
Shifting the horizontal offset limits the ‘ghosting’ effect seen commonly
in stereoscopic work
If your files are not in the same folder or in the right naming format, then you will need to use the <JoinViews> node.
1. Read in both 3dsbear.left.tif and bear.right.tif image sequences using Image > Read or the Hotkey ‘R’ as before.
2. To insert a <JoinViews> node, select Views > JoinViews.
3. Connect the inputs of the <JoinViews> node into the appropriate <Read> nodes. There should be an input for each
view you have created in the project settings. The inputs are labeled with the name of the view.
4. If you have assigned colours to the views and checked <Use colours in UI?> on the Views tab of your project
settings, the connecting arrows will reflect the view colours. If this does not happen and the arrows are black, you may
have connected the inputs the wrong way around. Check that you have connected each <Read> node to the correct
input of the <JoinViews> node. Nuke combines the inputs into a single output.
The Foundry Training Central Asia Pg 146 copyright © Fatbars Limited 2010
SETTING UP BASIC STEREOSCOPIC SCRIPTS AND COLOR CORRECTION
LESSON
IN S3D
11
A lot of times you would want to extract all views, process them individually, and then merge them together, using the
SplitAndJoin menu items. It first extracts all the views you have set up in your project settings and then merges them
back together. It’s no different to use several <OneView> nodes together with a <JoinViews> node, but makes working
faster, because you do not need to add each node in a separate go.
The Foundry Training Central Asia Pg 147 copyright © Fatbars Limited 2010
COLOR CORRECTION
LESSON
IN S3D
11
Before Spliting
After Spliting
2. Instead of just selecting the files, select one of the files and change from 3dsbear.left.%04d. tif 1-66 to
3dsbear.%V.%04d.tif 1-66. When a variable like %V is used, Nuke reads in the missing inputs and combines all inputs
into a single output.
3. The image sequences will come in as a single node. Connect the <Image> node to a <Viewer> node. Click on the
left and right view selection to see each of the views.
4. First we add a <SideBySide> node so we can visually see both sides at the same time. Under Views > Stereos >
Sidebyside.
5. Apple a <HueCorrect> node above the <Sidebyside> node. Click the view button next to the control you want to
adjust. From the menu that opens, select Split off [view name]. For example, to apply changes to a view called left,
select <Split off> left. An eye appears on the view button and the node gets a small green dot on it in the Node Graph
The Foundry Training Central Asia Pg 148 copyright © Fatbars Limited 2010
COLOR CORRECTION
LESSON
IN S3D
11
to indicate that views have been split off.
6. Click on the eye again and select ‘split left’, now you can choose if the changes that you make affect both eyes
different amount by sliding the mix number.
7. Add another <HueShift> node and add ‘5’ to the hue rotation to shift the overall hue. Because the node does not
have a split, the change is applied to both.
8. Now the colors look a lot closer. Add another <Anaglyph> node to see all the changes.
3. In the <Write> node’s controls, select exr from the file type pull down menu. From the views pull down menu, select
the view(s) you want to render, for example left, right.
4. Adjust any other <Write> node controls as necessary and click <Render>. Nuke prompts you for the frames to
render. Nuke writes several views into a single file.
The Foundry Training Central Asia Pg 150 copyright © Fatbars Limited 2010
LESSON 12 : RENDERING
Nuke supports a fast, high-quality internal renderer, with superior colour resolution and dynamic range without a
slowdown in the workflow. These are some of the key features of Nuke’s rendering engine :
• Multi-threaded rendering to take advantage of multiple processors in its calculations.
• Scanline (as opposed to buffer-based) rendering allows you to immediately see portions of render output.
• Calculations performed with 32-bit precision, using linear light levels.
Alternatively, you can use the viewer’s region of interest (ROI) feature to render only a portion of the image, while seeing
that result in the context of the whole image. Click the viewer’s ROI button to toggle on /off this render feature.
Region Of Interest
Region Of
Interest
Flipbooking Sequences
Flipbooking a sequence refers to rendering out range of images (typically at proxy resolution), then playing them back
in order to accurately access the motion characteristics of added effects.
Two options for flipbooking within Nuke :
• You can enable automatic disk caching of rendered frames, then play these frames back using Nuke’s native
viewer. This option does not let you define a specific playback rate.
• Or you can render out a temporary image sequences to FrameCycler, a RAM-buffering playback utility which is
automatically installed with your copy of Nuke and plays back sequences at the defined frame rate.
Note that the cached images have unique names reflecting their point of output location in the script. This means that
you can cache images from multiple nodes in the script without overwriting previously cached images.
The Foundry Training Central Asia Pg 152 copyright © Fatbars Limited 2010
RENDERING
1. Select the node whose output you wish to see flipbooked. That should be <ScanlineRender> node.
2. Select the <ScanlineRender> node, which should be the last node of the script and right click to add Render >
Flipbook selected (or press Alt + F (pc) / Option + F (mac)). Nuke renders as a temporary sequence the output of the
selected node using the frame range and resolution defined in the script’s settings. This may take a few moments.
3. Once the render is complete, Nuke launches Framecycler and loads in the temporary sequence. You can play it
back and view it using Framecycler’s media controls.
Flipbook Node
Note If you select a <Write> node in the step above, you must first click its Render button in order to manually render
its output to the destination defined in the file field. This step is necessary only in the case of <Write> nodes.
FrameCycler
The Foundry Training Central Asia Pg 153 copyright © Fatbars Limited 2010
RENDERING
IRIDAS was founded in 2000 in Munich, Germany. IRIDAS Framecycler comes packed with many features to
complement flipbooking. FrameCycler is the industry leader in uncompressed playback of frame-based and video file
formats at SD, HD, 2K, and higher resolutions. FrameCycler applications are used by content creators to review their
work, by filmmakers and postproduction facilities for digital dailies, and in venues for entertainment, education, and
research. Log onto www.iridas.com for more information.
Rendering Output
Nuke can render images locally— on your workstation— or it can be setup to render images on a network render farm.
Before rendering, verify that your project settings have the correct output format and proxy format selected.
The Foundry Training Central Asia Pg 154 copyright © Fatbars Limited 2010
FILE FORMATS
Metadata Information
Executing Renders
You can execute renders for a single <Write> node or all <Write> nodes in your compositing script.
To render a single <Write> node:
1. Connect a <Viewer> node to the <Write> node you want to render and verify that the correct resolution is displayed
for output.
2. If necessary, press (Control + P (pc) / Command + P (mac) to toggle between full-res and proxy resolution. The
displayed output resolution will be used for rendering.
3. With the desired <Write> node selected, choose Render > Render selected (or press F7).
4. Nuke prompts for a frame range. Enter the start and end frames, separated by a comma (i.e., 1,100), and then click
OK. To render all <Write> nodes in the script: Choose Render > Render all (or press F5).
The Foundry Training Central Asia Pg 155 copyright © Fatbars Limited 2010
LESSON 12
1. Exr handles 16- and 32-bit float. This 16 is also called “half float” and is different from the 16-bit integer that all the
other formats that support 16 use.
2. Adjust compression levels using the Write node’s properties panel, quality slider on the Data tab.
3. If utilized, the compression schema on imported TIFF sequences must be LZW®
4. DSLR raw data files. These are only supported via the dcraw command-line program, which you can download
from the dcraw website. Bit depth and other specifications depend on the device. Some devices may not be
supported.
5. This is the text-based format in which Nuke’s interface elements are stored.
6. This format does not specify resolution, so Nuke assumes a width of 720 pixels.
7. QuickTime is only supported on 32-bit Windows and Mac OS X.
The Foundry Training Central Asia Pg 156 copyright © Fatbars Limited 2010
INDEX
2D tracker 84–98 40–44, 41–44, 42–44, 45–59, 47–59, 51–59, 56–59, 85–98,
3D 10–29, 35–44, 38–44, 44, 49–59, 50–59, 68–76, 99–118, 100–118, 92–98, 141–148, 152–154, 153–154, 158
101–118, 102–118, 103–118, 104–118, 105–118, 106–118, conjoint-over 40–44
107–118, 108–118, 109–118, 111–118, 112–118, 114–118, Constant 56–59, 71–76, 103–118, 105–118, 135–140
115–118, 116–118, 141–148, 143–148, 148, 158 container 18–29, 38–44
3D workspace 99–118, 102–118 copy 39–44, 40–44, 56–59, 71–76, 80–83, 81–83, 96–98, 137–140,
32-bit floating point 60–66 149–154
Copy 39–44, 40–44, 56–59, 58–59, 71–76
A cornerpin 85–98, 87–98
CornerPin2D 72–76
AdjBBox 37–44, 38–44
Crop 35–44, 36–44, 37–44
alpha 25–29, 38–44, 41–44, 44, 45–59, 46–59, 53–59, 56–59, 57–59,
Curve Editor 8–29, 23–29, 24–29, 56–59, 70–76, 71–76, 73–76,
58–59, 62–66, 64–66, 65–66, 75–76, 79–83, 92–98, 111–118,
87–98, 123–127, 137–140
130–140
anaglyph 2–3, 141–148, 142–148, 147–148 D
Anaglyph 2–3, 141–148, 142–148, 147–148
anchors 84–98, 86–98 data 30–44, 17–29, 21–29, 25–29, 84–98, 37–44, 38–44, 84–98,
animated 18–29, 23–29, 54–59, 80–83, 99–118, 105–118 85–98, 86–98, 87–98, 102–118, 88–98, 124–127, 108–118,
AppendClip 127, 134–140, 135–140 114–118, 115–118, 116–118, 154, 124–127, , 11–29
atop 40–44 de focused 53–59
auto BG 51–59 Deform 104–118
auto FG 51–59 Degrain 51–59
Autokey 55–59, 137–140 De Interlace 116–118, 148
autosave 32–44 depth 38–44, 60–66, 106–118, 114–118, 141–148, 143–148, 154
difference 41–44
B Disable 14–29, 18–29
disjoint-over 41–44
Backdrop 18–29, 19–29
disparity 2–3, 141–148, 142–148, 147–148
background 10–29, 11–29, 15–29, 16–29, 18–29, 34–44, 41–44,
DisplaceGeo 104–118
42–44, 44, 77–83, 46–59, 47–59, 48–59, 49–59, 50–59, 51–59,
divide 41–44
52–59, 53–59, 54–59, 59, 77–83, 79–83, 80–83, 92–98,
Dolly 100–118
103–118, 124–127, 108–118, 115–118, 116–118, 117–118,
down-res 33–44
124–127, 130–140, 130–140, 130–140, 131–140, 132–140,
dpx 149–154
53–59
Draw 54–59, 74–76, 77–83, 80–83, 81–83, 82–83, 88–98
Bezier 54–59, 56–59, 74–76, 75–76, 94–98, 132–140, 133–140,
Dustbust 82–83, 83
135–140, 136–140, 137–140, 140, 148
black outside 37–44 E
BlackOutside 37–44, 38–44
blackpoint 47–59, 48–59, 60–66, 61–66 Eraser 77–83, 78–83
Blur 9–29, 46–59, 72–76, 57–59, 75–76, 92–98, 46–59, 92–98 Erode 46–59, 92–98, 46–59, 92–98
bounding box 35–44, 37–44, 38–44 exclusion 41–44
brush 79–83, 81–83, 82–83, 88–98 expression 18–29, 71–76
exr 149–154
C eye dropper 47–59, 61–66
cache 149–154 F
camera 45–59, 72–76, 86–98, 88–98, 99–118, 100–118, 102–118,
103–118, 105–118, 108–118, 109–118, 111–118, 112–118, file browser 30–44, 32–44
113–118, 114–118, 115–118, 126–127 Filter 9, 46, 76, 57, 87, 73, 75, 92, 113, 119, 113, 117, 46, 125
card 99–118, 104–118, 105–118, 111–118, 113–118, 116–118 filtering 26–29, 36–44, 73–76, 124–127
Card3D 67–76 flipbook 149–154
chan 2–3, 141–148, 142–148, 147–148 Flipbook 48–59, 151–154, 152–154
Channel 10–29, 25–29, 38–44, 39–44, 45–59, 49–59, 76, 92–98, foreground 10–29, 11–29, 17–29, 34–44, 41–44, 47–59, 48–59,
94–98 49–59, 50–59, 51–59, 52–59, 59, 77–83, 79–83, 80–83, 81–83,
channel set 25–29, 38–44, 39–44 92–98, 124–127
checkerboard 34–44, 35–44 Four-point tracking 85–98
chroma 52–59, 54–59, 79–83 fps 22–29
CIN 149–154 frame 21–29, 22–29, 23–29, 34–44, 35–44, 36–44, 37–44, 40–44,
clone 20–29, 81–83, 82–83, 88–98 47–59, 48–59, 54–59, 55–59, 61–66, 67–76, 68–76, 69–76,
cloned 18–29 70–76, 72–76, 73–76, 74–76, 75–76, 76, 79–83, 80–83, 81–83,
ColorCorrect 61–66, 62–66, 63–66 82–83, 84–98, 86–98, 112–118, 113–118, 117–118, 118,
ColorLookup 62–66, 63–66 120–127, 121–127, 122–127, 123–127, 124–127, 125–127,
colour 8–29, 10–29, 11–29, 13–29, 15–29, 25–29, 26–29, 29, 35–44, 126–127, 140, 149–154, 130–140, 131–140, 134–140, 138–
60–66, 45–59, 46–59, 47–59, 49–59, 50–59, 51–59, 52–59, 140, 139–140, 140, 149–154, 150–154, 120–127, 151–154,
53–59, 58–59, 60–66, 84–98, 84–98, 61–66, 79–83, 62–66, 152–154, 153–154
63–66, 65–66, 91–98, 92–98, 107–118, 96–98, 108–118, Frame Blend 121–127
112–118, 143–148, 124–127, 115–118, 116–118, 149–154, FrameCycler 149–154
53–59, 53–59 frame range 21–29, 22–29, 34–44, 48–59, 122–127, 134–140,
colour correction 8–29, 10–29, 26–29, 60–66, 61–66, 63–66, 65–66, 151–154, 153–154
84–98 FrameRange 132–140
Colourspace 35–44 Freehand 77–83, 78–83
complement 53–59, 152–154
composite 11–29, 38–44, 27–29, 45–59, 38–44, 40–44, 41–44, 45–59, G
85–98, 52–59, 88–98, 99–118, 89–98, 119–127, 103–118,
gain 26–29, 61–66, 62–66
121–127, 152–154, 27–29
gamma 26–29, 61–66, 62–66, 64–66, 91–98, 117–118, 120–127
compositing 2–3, 10–29, 11–29, 26–29, 32–44, 34–44, 35–44, 38–44,
Certified Series :
Level 1
Certification Digital Compositing with Nuke 101
Certification
By attending this certified course, you will receive
an official completion certificate from The Foundry
Training Central Asia. Differentiate yourself to
employers, and prospective clients as a Certified
Nuke End User. By passing certification exams, you
become a Certified Nuke End User for a chosen level.
Fatbars Limited
www.fatbars.tv