Roto
The Roto node is an optimal choice if you’re doing rotoscoping only - it allows you to create and edit Bezier and B-spline shapes.
The toolbar on the left side of the Viewer includes point selection and manipulation, and shape creation tools. Click and hold or right-click on a toolbar button to open a sub-menu to select any of its available tool types. Options related to the current tool appear in a toolbar along the top of the Viewer. Click on a toolbar item to cycle through the available options for that class of tools.
As a general workflow guide:
1. | Select your tool from the left-hand Viewer tool bar. |
2. | Use the Roto tool settings above the Viewer to adjust the tool’s properties. |
3. | Draw your shape or shapes: |
• Click in the Viewer to place points. You can drag while clicking to pull out Bezier handles or adjust B-Spline tension.
• Ctrl/Cmd+drag to sketch the shape freely.
• To close the shape, click the first point or press Return. To leave the shape open, press Esc.
• Ctrl/Cmd+Alt+click to add points to an existing shape.
• To increase the smoothness of a point, select the point and press Z.
• To cusp a point, select the point and press Shift+Z.
• To delete a point, select the point and press Delete.
• Beziers: Shift+drag on a tangent handle to snap the opposite handle to the same length. Ctrl/Cmd+drag on a tangent handle to move it independently of its opposite handle.
• B-Splines: Ctrl/Cmd+Alt+drag on a point to adjust its tension.
4. | Select a shape using the Select tools or the shape list in the control panel. |
5. | Use the control panel to adjust or fine-tune your shape(s). |
You can also create this node by pressing O on the Node Graph.
See also RotoPaint.
Inputs and Controls
Connection Type |
Connection Name |
Function |
Input |
bg |
Background input - adding a background automatically creates another bg input, allowing you to connect up to four images. |
mask |
An optional image to use as a mask. By default, the roto shapes are limited to the non-black areas of the mask. At first, the mask input appears as a triangle on the right side of the node, but when you drag it, it turns into an arrow labeled mask. If you cannot see the mask input, ensure that the mask control is disabled or set to none. |
Control (UI) |
Knob (Scripting) |
Default Value |
Function |
Roto Tab |
|||
output |
output |
alpha |
The roto shapes are rendered into these output channels. The output channels are the same for all shapes created using this node - you cannot create a subset of shapes and output them to a different channel. If you set this to something other than all or none, you can use the checkboxes on the right to select individual channels. |
premultiply |
premultiply |
none |
Premultiply multiplies the chosen input channels with a mask representing the roto shapes. For example, where there are no roto shapes (the matte is black or empty), the input channels are set to black. Where the roto shapes are opaque (the matte is white or full), the input channels keep their full value. Note: Selecting rgba premultiplies the alpha against itself (a*a). If you don’t want this to happen, set premultiply to rgb instead. |
clip to |
cliptype |
format |
Select how to restrict the output image: • no clip - use the entire image. • bbox - restrict the output image to the incoming bounding box. • format - restrict the output image to the incoming format area. • union bbox+format - restrict the output image to a combination of the incoming bounding box and format area. • intersect bbox+format - restrict the output image to an intersection of the bounding box and incoming format area. |
replace |
replace |
disabled |
When enabled, existing channels are cleared to black before drawing into them. You might find replace useful, for instance, if you’re creating a mask in the alpha channel, but the incoming image already has an alpha channel which you want to throw away. |
format dropdown |
|||
format |
format |
root.format |
This is used if Roto has no input connected. It is the format which the node should output in the absence of any available input format. If an input is connected, this control has no effect. If the format does not yet exist, you can select new to create a new format from scratch. The default setting, root.format, resizes the image to the format indicated on the Project Settings dialog box. |
mask |
N/A |
disabled |
Enables the associated mask channel to the right. Disabling this checkbox is the same as setting the channel to none. |
maskChannelInput |
none |
The channel to use as a mask. By default, the roto shapes are limited to the non-black areas of this channel. |
|
inject |
inject |
disabled |
Copies the mask input to the predefined mask.a channel. Injecting the mask allows you to use the same mask further downstream. |
invert |
invert_mask |
disabled |
Inverts the use of the mask channel, so that output is limited to the non-white areas of the mask. |
fringe |
fringe |
disabled |
When enabled, only apply the effect to the edge of the mask. When disabled, the effect is applied to the entire mask. |
output mask |
|
disabled |
Enables the associated output mask channel to the right. Disabling this checkbox is the same as setting the channel to none. |
outputMask |
none |
Output mask channel. This is a channel where Roto will output a mask for what it rendered. |
|
opacity |
opacity |
1 |
The opacity of a new or existing roto shape in the shape list. 1 is equal to totally opaque, and 0 is equal to transparent. |
feather |
feather |
0 |
Softens the edges of a roto shape by fading it from more transparent to less transparent. With positive feather values, your feather effect is outward. If your feather values are negative, the feather effect is inward. You can also add feathering to individual points by Ctrl/Cmd+dragging a point in the Viewer. Press E to increase the feathering of selected points, or Shift+E to remove the feathering. If you check feather link in the Roto tool settings above the Viewer, you can move the shape point and the feather point together. Otherwise, they move independently. You can also Ctrl/Cmd+drag a shape point to temporarily disable feather link and move the points independently. |
on |
feather_on |
enabled |
When enabled, feathering is applied to the selected shape(s). Disabling this is the same as setting feather to 0. |
feather falloff |
feather_falloff |
1 |
Sets the rate of opacity falloff at a feathered edge for a shape, in pixels. |
[feather type] |
feather_type |
linear |
Controls the center point of the feather falloff: • linear - the falloff changes linearly from the shape edge to the feather edge. • smooth0 - the center point of the feather falloff lies closer to the shape edge than the feather edge. • smooth1 - the center point of the feather falloff lies closer to the feather edge than the shape edge. • smooth - the center point of the feather falloff lies halfway between the shape edge and the feather edge. These options may be helpful, for example, in matching the soft edge to motion blurred image content. |
spline key |
key |
0 |
Quick access to spline keyframes: • Numeric fields - show whether the spline is keyed at this frame, which key you’re viewing, and the total number of spline keys. • - move to the previous or next spline key. • - set or delete spline keys. |
visible |
visible |
enabled |
Sets whether the selected shape or group is visible and rendered or not. You can still edit an invisible shape and view its position in the Viewer. |
locked |
locked |
disabled |
Locks the selected shape or group to prevent it from being edited. |
view |
view |
N/A |
The view(s) in which you want to draw your shape(s). This is only displayed if you have set up more than one view in your Project Settings (typically, if you’re working on a stereoscopic project). |
stereo offset x,y |
stereo_offset |
0 |
Moves the selected shape or group on the x and y axes. This is an extra transform that is applied after all other transforms. Typically, you would position the shape or group correctly in the hero view, then split this control, and drag the shape to its correct location in any other views. Note that you can also press Shift while dragging to constrain the movement to x or y axis only. Stereo offset can be useful, for example, if you have a shape or group that is correctly positioned in one view and you want to move it to its correct location in another view, but can’t use the translate control on the Transform tab because that’s being driven by Tracker data. This control is only displayed if you have set up more than one view in your Project Settings (typically, if you’re working on a stereoscopic project). |
shape list |
curves |
N/A |
Shows the hierarchy of shapes and groups, allowing you to adjust them and how they’re displayed in the Viewer: • Name - double-click to edit the shape or group Name. • - whether the shape or group is visible and rendered or not. • - lock or unlock the shape or group. • - set the shape outline color to appear in the Viewer. • - set the color in which you want to render your shape. • - invert the shape or group. • - set the shape or group blending mode. • - whether motion blur is applied to the shape. Note: You can only apply motion blur to shapes, not groups of shapes. • View - displays the view(s) the shape appears in. This is only displayed if you have set up more than one view in your Project Settings (typically, if you’re working on a stereoscopic project). • Lifetime - the range of frames during which the shape is visible. • Source - the shape source (as set on the Shape tab). Use the shape list to: • Select multiple items to adjust attributes on all the selected list items. • Drag and drop to re-order or move items between groups. • Right-click for a context menu containing Add new layer and shape editing functions such as Copy and Paste. |
Transform Tab |
|||
translate x,y |
translate |
0 |
Moves the selected shape or group on the x and y axes. You can also adjust translate values by dragging the transform handle in the Viewer. |
rotate |
rotate |
0 |
Spins the selected shape or group around a pivot point. Use center x,y to position the pivot point. You can also adjust rotate values by dragging the transform handle in the Viewer. |
scale |
scale |
1 |
Resizes the selected shape or group on the x and y axes. You can also adjust scale values by dragging the transform handle in the Viewer. |
skew X |
skewX |
0 |
Skews the selected shape or group along the X axis from the pivot point. Use center x,y to position the pivot point. You can also adjust skew values by dragging the transform handle in the Viewer. |
skew Y |
skewY |
|
Skews the selected shape or group along the Y axis from the pivot point. Use center x,y to position the pivot point. You can also adjust skew values by dragging the transform handle in the Viewer. |
skew order |
skew_order |
XY |
Sets the order in which skew X and skew Y are applied: • XY - Skew X is applied before skew Y. • YX - Skew Y is applied before skew X. |
center x,y |
center |
1024, 778 |
Adjusts the center of rotation and skew on the x and y axes. This control does not translate roto shapes. You can also adjust center values by Ctrl/Cmd+Shift and dragging the transform handle in the Viewer. |
extra matrix |
transform_matrix |
N/A |
Adds an extra matrix which is calculated after the transforms defined by the other controls. This can be useful, for example, if you are using a 3rd party application, such as a tracker, and your tracking data cannot be fully represented using the available transform controls. |
shape list |
curves |
N/A |
See the Roto tab for the shape list controls. |
Motion Blur Tab |
|||
shape |
global_motionblur_on |
enabled |
When enabled, motion blur is applied to shapes selected in the shape list or Viewer. shape motion blur determines the exposure for each moving shape and blends the resulting blurred shapes. This may be more efficient than the global motion blur since each shape will only be blended once. Note: Shape motion blur may result in artifacts when shapes blur over the same region. |
global |
disabled |
When enabled, motion blur is applied to all shapes in the current Roto node. Note: Global motion blur overrides the per-shape motion blur settings. global motion blur correctly accounts for interaction between motion blurred shapes.This may be more expensive than the shape motion blur since it may blend each shape for every sample. Note: Global motion blur requires that shutter and sampling parameters are the same for all shapes and has been optimized for consecutive shapes with the same properties using the over blend mode. |
|
Shape Blur |
|||
motionblur |
motionblur |
1 |
Sets the number of motion blur samples for the selected shape(s). Increase this for better quality but slower rendering, decrease it for faster rendering. |
on |
motionblur_on |
disabled |
When enabled, motion blur is applied to the selected shape(s). |
shutter |
motionblur_ |
0.5 |
Sets the number of frames the shutter stays open when motion blurring. For example, a value of 0.5 corresponds to half a frame. Increasing the value produces higher quality motion blur, but increases render time. |
shutter offset |
motionblur_ |
start |
Controls how the shutter behaves with respect to the current frame value. There are four options: • centred - center the shutter around the current frame. For example, if you set the shutter value to 1 and your current frame is 30, the shutter stays open from frame 29,5 to 30,5. • start - open the shutter at the current frame. For example, if you set the shutter value to 1 and your current frame is 30, the shutter stays open from frame 30 to 31. • end - close the shutter at the current frame. For example, if you set the shutter value to 1 and your current frame is 30, the shutter stays open from frame 29 to 30. • custom - open the shutter at the time you specify. In the field next to the dropdown menu, enter a value (in frames) you want to add to the current frame. To open the shutter before the current frame, enter a negative value. For example, a value of - 0.5 would open the shutter half a frame before the current frame. |
[offset] |
motionblur_ |
0 |
If the shutter offset control is set to custom, this control is used to set the time that the shutter opens by adding it to the current frame. Values are in frames, so -0.5 would open the shutter half a frame before the current frame. |
Global Blur |
|||
motionblur |
global_motionblur |
1 |
Sets the number of motion blur samples for all shapes in the current Roto node. Increase this for better quality but slower rendering, decrease it for faster rendering. |
shutter |
global_motionblur_ |
0.5 |
Sets the number of frames the shutter stays open when motion blurring. For example, a value of 0.5 corresponds to half a frame. Increasing the value produces higher quality motion blur, but increases render time. |
shutter offset |
global_motionblur_ |
start |
Controls how the shutter behaves with respect to the current frame value. There are four options: • centred - center the shutter around the current frame. For example, if you set the shutter value to 1 and your current frame is 30, the shutter stays open from frame 29,5 to 30,5. • start - open the shutter at the current frame. For example, if you set the shutter value to 1 and your current frame is 30, the shutter stays open from frame 30 to 31. • end - close the shutter at the current frame. For example, if you set the shutter value to 1 and your current frame is 30, the shutter stays open from frame 29 to 30. • custom - open the shutter at the time you specify. In the field next to the dropdown menu, enter a value (in frames) you want to add to the current frame. To open the shutter before the current frame, enter a negative value. For example, a value of - 0.5 would open the shutter half a frame before the current frame. |
[offset] |
global_motionblur_ |
0 |
If the shutter offset control is set to custom, this control is used to set the time that the shutter opens by adding it to the current frame. Values are in frames, so -0.5 would open the shutter half a frame before the current frame. |
shape list |
curves |
N/A |
See the Roto tab for the shape list controls. |
Shape Tab |
|||
source |
shape_source |
color |
Sets the color or source input for the selected shape: • color - the color specified in the color field. • foreground - pulls pixels from the bg input, including any shapes drawn on it. This input is mainly used with the Clone tab controls. Using it may cause slower renders. • background - pulls pixels from the bg input, not including any shapes drawn on it. • backgrounds 1 to 3 - pulls pixels from bg1, bg2, and bg3 inputs. |
blending mode |
blending_mode |
over |
Sets how the colors in the current shape (A) are merged with the underlying image and shapes (B): • color-burn (darken B towards A) - darkens B to reflect A by increasing the contrast. No part of the image becomes lighter. • color-dodge (brighten B towards A) - brightens B to reflect A by decreasing the contrast. No part of the image is darkened. • difference (abs(A-B)) - subtracts either B from A or vice versa, depending on which is brighter. Blending with white inverts A, while blending with black produces no change. Similar colors will return black pixels. • exclusion (A+B-2AB) - creates a result similar to the difference mode but lower in contrast. Like with difference, blending with white inverts A. Blending with black produces no change. • from (B-A) - subtracts A from B. • hard-light (multiply if A<.5, screen if A>.5) - lightens highlights and darkens shadows. If B is lighter than 50% gray, the result lightens as if it were screened. If B is darker than 50% gray, the result is darkened as if it were multiplied. • max (max(A,B)) - selects the lighter of the two colors as the resulting color. Only areas darker than B are replaced, while areas lighter than B do not change. • min (min(A,B)) - selects the darker of the two colors as the resulting color. Any parts that are lighter than B are substituted. Any parts of the image that are darker than B don’t change. |
blending mode (continued) |
• minus (A-B) - subtracts B from A. • multiply (AB, A if A<0 and B<0) - multiplies A by B. The result is always darker. Blending with black gives black and with white returns the color unchanged. • over (A over B) - the colors of the two images will not interact in any way, and Nuke will display the full value of the colors in A. • overlay (multiply if B<.5, screen if B>.5) - depending on A, multiplies or screens the colors. B brightens A while preserving highlights and shadows. • plus (A+B) - the sum of the two colors. Increases brightness to lighten A and reflect B. Plus is similar to the screen blending mode, but produces a more extreme result. • screen (A+B-AB if A and B between 0-1, else A if A>B else B) - this is a soft plus making everything brighter but ramping off the whites. Light colors have more of an effect than dark colors. The result is always a lighter color. Blending with black leaves the pixel unchanged, blending with white always returns white. The result is similar to projecting multiple slides on top of each other. • soft-light - depending on A, darkens or lightens the colors. Less extreme than the hard light blending mode. |
||
color |
color |
1 |
Sets the color for the roto shape. This control only has an effect when source is set to color. |
overall width |
openspline_width |
10 |
Sets the overall spline width of selected splines and all new open splines. |
start type |
openspline_start_end_type |
rounded |
Sets the style of the first point for the selected spline(s) and all new open splines: • rounded - the starting point of the spline has a rounded end. • square - the starting point of the spline has a square end. |
end type |
openspline_last_end_type |
rounded |
Sets the style of the last point for the selected spline(s) and all new open splines: • rounded - the finishing point of the spline has a rounded end. • square - the finishing point of the spline has a square end. |
invert |
inverted |
disabled |
Swaps the colors of the currently selected shape and the underlying image. |
shape list |
curves |
N/A |
See the Roto tab for the shape list controls. |
Clone Tab |
|||
translate x,y |
source_transform_translate |
0,0 |
Moves the source image along the x and y axes. You can also adjust translate values by dragging the transform handles in the Viewer. If source is set to color on the Shape tab, this control is disabled. |
round to pixel |
source_translate_ |
disabled |
Rounds the translate x,y amount to the nearest whole integer pixel. This can help you avoid softening when using filtering. If source is set to color on the Shape tab, this control is disabled. |
rotate |
source_transform_rotate |
0 |
Spins the source image around the pivot point. Use center x,y to position the pivot point. You can adjust rotate values by dragging the transform handles in the Viewer. If source is set to color on the Shape tab, this control is disabled. |
scale |
source_transform_scale |
1 |
Resizes the source image on the x and y axes. You can adjust scale values by dragging the transform handles in the Viewer. If source is set to color on the Shape tab, this control is disabled. |
skew X |
source_transform_skewX |
0 |
Skews the source image along the X axis from the pivot point. Use center x,y to position the pivot point. You can adjust skew values by dragging the transform handles in the Viewer. If source is set to color on the Shape tab, this control is disabled. |
skew Y |
source_transform_skewY |
0 |
Skews the source image along the Y axis from the pivot point. Use center x,y to position the pivot point. You can adjust skew values by dragging the transform handles in the Viewer. If source is set to color on the Shape tab, this control is disabled. |
skew order |
source_transform_skew_order |
XY |
Sets the order in which skew X and skew Y are applied: • XY - skew X is applied before skew Y. • YX - skew Y is applied before skew X. |
center x,y |
source_transform_center |
N/A |
Adjusts the center of rotation and skew on the x and y axes. This control does not translate the source image. You can also adjust center values by Ctrl/Cmd+Shift and dragging the transform handle in the Viewer. If source is set to color on the Shape tab, this control is disabled. |
filter |
source_filter |
Cubic |
Select the filtering algorithm to use when remapping pixels from their original positions to new positions. This allows you to avoid problems with image quality, particularly in high contrast areas of the frame (where highly aliased, or jaggy, edges may appear if pixels are not filtered and retain their original values). Note: If source is set to color on the Shape tab, the filter dropdown is disabled. • Impulse - remapped pixels carry their original values. • Cubic - remapped pixels receive some smoothing. • Keys - remapped pixels receive some smoothing, plus minor sharpening (as shown by the negative -y portions of the curve). • Simon - remapped pixels receive some smoothing, plus medium sharpening (as shown by the negative -y portions of the curve). • Rifman - remapped pixels receive some smoothing, plus significant sharpening (as shown by the negative -y portions of the curve). • Mitchell - remapped pixels receive some smoothing, plus blurring to hide pixelation. • Parzen - remapped pixels receive the greatest smoothing of all filters. • Notch - remapped pixels receive flat smoothing (which tends to hide moire patterns). • Lanczos4, Lanczos6, and Sinc4 - remapped pixels receive sharpening which can be useful for scaling down. Lanczos4 provides the least sharpening and Sinc4 the most. |
black outside |
source_black_ |
disabled |
When rotating or translating the source image, a part of the image area may get cropped. To fill the cropped portion with black, check black outside. To fill the cropped portion by expanding the edges of the image, uncheck black outside. Note: If source is set to color on the Shape tab, this control is disabled. |
time offset |
source_time_offset |
0 |
Allows you to clone or reveal pixels from a different frame. Time offset is either relative to the current frame (-1 is the frame previous to the current one) or absolute (1 is the first frame in the clip). If source is set to color on the Shape tab, this control is disabled. |
source_time_offset_type |
relative |
||
view |
source_view |
current |
Sets the view you want to clone from. This is only displayed if you have set up more than one view in your Project Settings (typically, if you’re working on a stereoscopic project). |
shape list |
curves |
N/A |
See the Roto tab for the shape list controls. |
Lifetime Tab |
|||
lifetime type |
lifetime_type |
single frame |
Sets the range of frames during which the currently selected shape or group is visible: • all - the selection appears in all frames of the composition. • start to frame - the selection appears from the first frame to the specified to frame. • single - the selection appears on one frame only. You can specify the frame using the from field. • to end - the selection appears from the specified from frame to the last frame. • range - the selection appears from the specified from frame up to the specified to frame. |
from |
lifetime_start |
1 |
Sets the first frame for single, to end, and range lifetime types. |
to |
lifetime_end |
1 |
Sets the last frame for start to frame and range lifetime types. |
shape list |
curves |
N/A |
See the Roto tab for the shape list controls. |
Tracking Tab |
|||
Settings |
|||
track channels |
channels |
rgb |
The color correction is only applied to these channels. You can use the checkboxes on the right to select individual channels. |
pre-track filter |
pretrack_filter |
none |
Before image patches are compared, the selected filter is applied. You can select one of the following options: • none - This disables all pre-filtering, which allows you to have full control of tuning the input image for tracking. • adjust contrast - This stretches the image contrast to better suit the tracking algorithm. This option is recommended. |
adjust for luminance changes |
adjust_for_luminance_changes |
disabled |
Enabling this option performs extra pre-filtering to help compensate for changes in brightness in the image over time. |
clamp super-white, sub-zero footage |
clamp_footage |
enabled |
When enabled, the pixel values in the tracked area are clamped between 0-1. If you want to track the full dynamic range of your footage, you should disable this control. |
hide progress bar |
hide_progress_bar |
disabled |
When enabled, the tracking progress bar is hidden. |
Export |
|||
export menu |
export_menu |
CornerPin2D (relative) |
Sets the node type to export the track data: • CornerPin2D (relative) - warp the image according to the relative transform between the current frame and the reference frame. • CornerPin2D (absolute) - set the to positions to the corners of the planar surface, and the from positions to the dimensions of the currently selected node. This option places the incoming image entirely inside the planar surface. • CornerPin2D (stabilize) - applies the inverse transform of the track to stabilize the image. This option locks down the image so that the tracked plane effectively doesn't move - can be very useful for applying drift corrections. • Tracker - creates a four-corner Tracker node with each of the trackers taking the positions of planar surface corners. This allows you to use the Tracker's transform functions to stabilize, reduce jitter, and so on. This export option is always baked out in order for the transform to work correctly. |
create |
export_button |
N/A |
Click to create the selected node containing the track data. |
link output |
link_output |
enabled |
When enabled, create a link between Roto and the exported node, so that when the track updates, the points are updated too. |
Correction |
|||
CornerPin points |
|||
point1 xy point2 xy point3 xy point4 xy |
pt1 pt2 pt3 pt4 |
N/A |
The CornerPin points are populated automatically when you track an object. When you draw a roto shape and convert it into a track object, Nuke automatically places four corner pins around the shape. These are the points that are tracked. |
Offsets |
|||
offset1 xy offset2 xy offset3 xy offset4 xy |
of1 of2 of3 of4 |
N/A | You can correct the four automatically placed points by offsetting any or all of the four points. To offset a point, simply click and drag it in the Viewer to the correct position. |
reference frame |
reference_frame |
The first frame used to track from. |
The frame used as a reference to compare all other frames containing tracking data. |
shape list |
curves |
N/A |
See the Roto tab for the shape list controls. |
Step-by-Step Guides
Video Tutorials
Rotoscoping from Foundry on Vimeo.
We are now ready to move on to rotoscoping in Nuke. I have imported an image sequence that will be perfect for this. This features an actor hanging from a rope on a greenscreen stage. Now, the greenscreen is not clean. There is all sorts of equipment in the way, plus the rope runs over the edge of the stage where the greenscreen runs out. So, what we can do with this footage is first rotoscope a garbage mask to get rid of all this extra equipment. The second thing we can do is rotoscope this rope to separate it out from the background. There are several nodes you can use to rotoscope in Nuke. We use the most basic one called Roto. Roto has been improved for Version 7, so it’s even easier to use now. I am going to go back down to the Node Graph, right-mouse-button-click and choose Draw > Roto. Once a Roto node appears, of course, its properties are in the properties panel and, also, there is a special toolbar here in the left. In fact, the third button here allows you to draw new masks. This will be special curves with points that will eventually affect the alpha of another node. Right now, this is set to Bezier. We will try that first. Once you have that tool selected, you simply have to click in the Viewer. Each time you click, you get a point and the mask shape starts to form. So, I will go around the actor and cut off things like tracking marks, shadows, and lights that I don’t want. I will stop short of the top of the greenscreen and, in order to close it, click the very first point. There we go. That is the first mask shape, and it’s listed here in the curve section of the properties panel.
That’s not working yet. What I need to do is hook the Roto into another node through a mask input. The quick way to do that here is create a Merge node, so I am going to press the M key. I will get a Merge node, hook the A pipe into the Read node, and hook the Viewer into the Merge node. Then, I can grab the mask input at the right side of the Merge node, and drop it on the Roto node. There, the mask starts to function. What’s happening is the interior of the mask is converted into a pick alpha. Whatever is outside the mask is converted to a transparent alpha. In fact, we can look at the matte by switching to the alpha view in the Viewer. With your mouse in the Viewer, just press the A key. There we go. Go back to rgb and press A again. Now we have a mask, we can go ahead and animate it. In fact, you will get the first keyframe for free. I can go to a different frame, like frame 1, and alter the mask. One way to do this is to click+drag a marquee box around the entire mask and let go. You will then get a transform handle. I can go ahead and move the entire mask over. As soon as I do that, I will get a brand new keyframe at frame 1. You can also move individual points. To do that, you can click off the transform handle and then pick a point. Now, in order to select a point, you need to make sure you are on one of the selection tools. For example, up here to the left, Select All. Then you can click on a mask point and then drag it to move it. So, there are 2 keyframes. I will go to frame 30 next and add 1 more. There is our first rotoscope of the actor. We also mentioned saving the rope. What we can do there is draw a second mask that is much tighter that cuts the rope out. You can do that by simply going to one of these tools that will allow you to draw a mask, like the Bezier, B-Spline, or one of these shapes, like Ellipse or Rectangle.
I am going to go back to Bezier, for now. I can't really see the rope. One trick is to temporarily disconnect the mask pipe. Now I can see everything. So, with this tool selected, Bezier, I will draw a new mask shape and I will close it. This is a result. I will hook the mask pipe back up and I have the net result of both masks. Let’s take a look at the alpha channel one more time. I will press the A key. There we can see the alpha matte. Once again, white is opaque and black is transparent. Each of these shapes is listed in the curves section, so the new one is Bezier2. Notice that each one of these has a set of options beside it. For example, if I click on Bezier1 there is an invert button - click this and the result is inverted. Beside that, is an operation button. For example, if I go up to Bezier2, double-click that button which looks like 2 little squares, and I get a list of operations. This affects how the masks are combined, so I can change it from over to, say, difference. Difference causes the overlapping area to become transparent. I will return that to over just for now. Over is very similar to the mask add function in After Effects.
Now, there are other ways to affect the quality of the mask aside from moving points. For example, if I zoom in and select one point on the rope, I can see there is a small line beside it - that’s the feather. Once I see the feather line, I can click+drag that and pull it outwards. That becomes a softer transition from what’s opaque to what’s transparent. You can make a very large feather or a very small one. In this case, I will make a small feather just to soften the edges of the rope; this is per point. Now any feather is stored in the keyframe, so if I go to a different frame, I have an option to change the feather. Now, I have gone back to frame 1, so the first thing I need to do is go ahead and move the entire mask, and then I can adjust the feather.
Now, aside from the feather, you can also add or delete points. There’s tools for this, over on the left. Here’s the Add Points tool. Just click on a mask line, like here, or if I want to add it to the first mask, I can select that mask and click on one of its lines. Now you will notice that the new point has a tangent handle and it’s smooth. There are actually 2 types of points inside Nuke: there is a smooth pipe, as I have here, or there is a cusp pipe, which I have over here - the kind you get by default. You can switch between the two by going to one of the other tools. Up here to the left, there is a Smooth Points tool. I can click on a hard one and smooth it out like this. Once you have a smooth point, you can go back to the select tool and then alter the tangent handles. There is also a Cusp Points tool, where you can change a smooth one back to cusp, like this. I might have to click more than one time to go back to the linear version. You can also delete points. If you just select a point, you can delete it with the delete key, or there is also a Remove Points tool. So, there is some basic rotoscoping using the Roto node.
I do want to mention the RotoPaint node. The RotoPaint node builds up on the Roto node by using its rotoscoping functionality. It also adds an entire set of paint tools, and allows you to paint with a stroke-based brush. This is great for making paint fixes right in the program, so it’s worth checking out. Since we are working with greenscreen, the next step would be to move on to some of the chroma key tools inside Nuke. We will talk about that in the next video.
“Tears of Steel” footage courtesy (CC) Blender Foundation - mango.blender.org
NUKE 7.0 - Rotopaint from Foundry on Vimeo.
Welcome to this tutorial on RotoPaint and Roto in Nuke 7.0. I will start on Nuke 6.3v8 because there are a number of improvements to the operability of RotoPaint in Nuke 7.0, and I want to remind you of some of the problems that exist in the previous version of Nuke. For those that are used to working in RotoPaint, you will know the more paint strokes you have, the slower Nuke gets.
Here I have a greenscreen that I created using a number of clones and reveals from various different frames. I have tracked, stabilized, and painted through the footage, and have deliberately tried to bloat this script. To make matters worse I have copied a layer for the purpose of this tutorial, so that now we have a very heavily bloated RotoPaint node. I will select Layer2 and then all of the other layers. You need to wait a long time before they all update. Now I will turn on visibility for all of the extra layers. As you can see, the interface is quite slow. I will come out of that mode for a moment just to get rid of the overlay, then turn the visibility off again, and deselect the layers. It is taking a long time as we are waiting for the UI to catch up. I will show you one other thing that has always been quite awkward. I am going to grab Layer8 and move it above the other layers. This could be a series of paint strokes or layers, and as you can see as I drag-and-drop, it’s taking quite a while to update. I now have two copies of Layer8, and we have to wait a long time before the second copy of Layer8 will disappear. It’s taken quite a while, and the operability has been very, very slow. If we take a look at the file size of this script, it is 6 MB, so one node has bloated the script up to 6 MB already.
Moving onto Nuke 7.0 now. If we open up the script we were just looking at into Nuke 7.0, we will be prompted to Save as a new script. This is because Nuke 7.0 will alter the format of the Roto and RotoPaint node. It is a one way transition, meaning you can’t open Nuke 7.0’s RotoPaint in Nuke 6. We are prompted to save it as a new script. Save as a new script and label it Nuke 7.0. If we look at the file size, you will see the file size has been reduced by the change of format used for the RotoPaint node. Now if we go into that same RotoPaint node, there are the same layers we had before, exactly the same RotoPaint node. If I select these layers, think of how long the lag was earlier, and then turn on the visibility on and off, there is a much quicker response. If I take Layer8 again and put it back down to where it was, it is vastly faster than what we had previously. So file size and performance are two major enhancements in RotoPaint and Roto in Nuke 7.0.
Now, let’s look at some of the other changes in Nuke 7.0. At the top of your workspace, you will see a lot of the toolbar parameters have been replaced with icons, and also down here we have a couple of new shape modes: Cusped Bezier and Cusped Rectangle. I will start off looking at the normal Bezier and compare it with the Cusped Bezier. As we create a normal shape, we can pull out handles. With the Cusped Bezier, there are no handles to pull out. The points will stay cusped unless you specifically ask them not to be (Z). Note also that we have a new color scheme to make it easier to see your points and handles. Again, with the rectangle in the past, when you have created a new shape, you move one of the points and it is no longer cusped. With the new Cusped Rectangle, this is no longer the case: points stay cusped unless you specifically set them not to be. I’m now going to create another Cusped Rectangle and look at some of the new features. We can hide curves, we can hide points. This next one is not a new feature in Nuke 7.0. It turns off the bounding box, and the next one along turns off the bounding box only when you move the shape. This next icon Constant Selection means that, if I have a shape selected and I click away, it does not deselect the shape looking on the image. If I then turn it off and click on the image, it deselects the shape.
A couple of other new features: let’s create some other new shapes and I will show you some of the new copy and paste parameters that are available. Three random shapes, if I select one shape, right-click, and go to Copy, it tells us we have one curve. It also defaults to copying the points. Now, if I select all the shapes and go into the same menu, it changes to curves and defaults to copying the three curves instead. Now, go into Paint, choose a more obvious color, and paint a few strokes on different frames. You are able to just click and can adjust them all in one go without having to go to the Lifetime tab, so you have more control and more options available in the editor.
In the next tutorial, we will be looking at stereo and the new enhancements in RotoPaint.
NUKE 7.0 - Rotopaint in stereo from Foundry on Vimeo.
Hello, and welcome to this tutorial on the new stereo enhancements in RotoPaint and Roto in Nuke 7.0. We will start off in Nuke 6.3, and I will show you the old method of working with stereo.
I have two images here, and I also have a disparity map created by Ocula. I will just join these views together and copy the disparity map across. If I open up the RotoPaint node and I go into his face and paint a line, you will see it doesn't line up in the same place on the right eye. If I go into the brush stroke, I can correlate the points, in this case from left to right. You will see it lines up according to the disparity map created by Ocula. However, you will see we now have two brush strokes, and can be difficult to keep your strokes in sync.
So, now in Nuke 7.0 we are looking at the same shot we were looking at before, but we are looking at the untreated eyes in sRGB, not Log, so we can see more detail. As you can see, the two eyes have a color discrepancy and we also have a vertical discrepancy. Both of which may have been corrected before you work on the shot. In this case, we are going to assume that we are working on uncorrected, untreated stereo eyes. I will just set my project up to be stereo. This is very important, enabling us to see the new features of RotoPaint, using the colors in the UI, red for left and green for right. Now if I bring up a JoinViews node, we have two eyes coming down a single Viewer pipe. I will also add a RotoPaint node. There are a few things that are available in Nuke 7.0 that were not available in Nuke 6.0. In the Transform tab, you have the ability now to split off any of the parameters, and you have a new parameter, stereo offset. It allows you to adjust the paint strokes to match the different eyes. You also have within the Stroke tab and the time offset in the Clone tab the ability to split the eyes as well. So, first I will paint a line down this guy’s nose, working on the hero eye. If you look at the left eye, we can see the paint stroke doesn't line up. So if I go and split off the left eye, I can then align the paint stroke on top, and now we can see the paint stroke is aligned to both eyes. Working on the hero right eye, I am going to draw around his ear, and again split off the eyes. Look at the left eye and adjust the stereo offset to match. Now we have both paint strokes aligned to the different eyes. You will notice they are different values. This is because the characters are at different distances to the camera. So, that’s the principle of it, but that’s not particularly accurate.
I will show you a different technique to get a more accurate convergence value, which we will then pump into the RotoPaint node. Nuke as standard comes with a ReConverge node. I am just going to put a MixViews node underneath, so we can see both eyes mixed together. Now the ReConverge node will use Ocula, and you can converge over a certain point, but I won't tell you how much it’s converged by. You can have a Convergence offset here that allows you to adjust the eyes this way. However, this does not have any vertical offset and, as I pointed out in the beginning, these two plates have a vertical misalignment. So, it’s not going to help us in this instance. Now I will use a slightly different technique. I will split the two eyes out. I will Transform the right eye, add an Invert, and then Dissolve, half mixing the two eyes together. We end up with something where, when the images are aligned, we get a gray background, and a colored background when they are not. Just to make it a bit stronger, I will add a Grade node underneath. And now, we can align our right eye to our left eye. The reason I'm doing it that way, rather than aligning my left eye to my right eye, is because I will be painting on the right eye as it’s my hero eye. Then I will have to transform the strokes to match the left eye. Now to work out the vertical offset, I will make the Grade a little stronger. I think we are pretty close, although we do have a slight difference in color, but that is because the two images are not the same. We now have a translate position that we can use in our RotoPaint node. I go into the RotoPaint, again working on the right eye, draw a line down his nose, and split this off right. Now I will copy the Translate parameter into the left eye. This is because I have aligned the right eye to the left eye, and I want to align the brush stroke I have painted on the right eye to the left eye too. And now you can see we have got that aligned, we will go back to this guy here again. Working on the right eye, I go back into the Transform parameters and align it for his ear. I have a new value there, so I go back to my paint stroke and again, I will split off the right eye and just copy that value in there, and now we have the two paint strokes aligned like this.
So now I would like to look at a more complicated scenario. We have the same shot as before. This time I have stabilized the shot around the center guy’s hat, which will make it easier to roto. With your tool from before, we can set up an animated offset. Just do a few frames here. The beauty of this method is because it’s non destructive, if I make a mistake while I align the two eyes, I will still be able to correct my RotoPaint later on. Now that I have a rough alignment, I will bring up a Roto node, and we will view the stabilized image. Close the transform for a moment and we will come back to it shortly. So I will just start off by putting a simple roto shape around his hat. So we cut to a roto I completed earlier, and if we look in the left eye, we can see that we need to offset the entire shape. So again we bring up our transform, go into our Roto, and split off the eyes. Then I can copy and translate into the left eye the whole animation. And now we can see that our eyes are aligned. The next thing is to apply this to the actual image itself, so I need to take the stabilize and apply the match-move to the roto. I will just close that new Tracker down, so I can take that roto, go to the Transform tab, go to translate, right-click and select Link to > Tracker linking dialog and I can take the match-move data and apply it to the roto spline. And here you can see it works for both the left and right eye. A very useful new tool for Roto and RotoPaint for Nuke 7.0.
NUKE 7.0 - Combined trackers from Foundry on Vimeo.
Hello! In this tutorial, I would like to show a combined workflow between the Tracker, CameraTracker, and Roto. Here we have a hand-held shot, essentially I would like to get a camera track out of this, but the people will interfere with the camera track, so we need to roto them out. I will use keyframe tracking to get a rough track of their positions. I don’t need to be particularly accurate, as I am only going to garbage matte out the people.
So, I have created four keyframes on my first track, first track done. Then I create a second track on this guy here, go through and make keyframes, and click key track all. The last guy is more problematic because he gets occluded. Now, I don't really need to worry too much about dealing with occlusion the way I would have done before. I am just going to switch to a different pattern halfway through and then go back because again I only need a rough garbage matte throughout. Let’s see how that does. So I am expecting this track to jump a bit. The question is if it jumping is going to cause me an issue or not? I think that will be pretty good.
So I will bring up a Roto now, and just do a quick garbage around the first guy. I will put him into his own group, and then I will select Link to > Tracker 1 > the first track. It immediately pushes the roto off, so I’m going to use its own transform to push it back again. Again, do the same for the second guy. I accidentally put him in the wrong group, so move him back to Root and create new layer, again go to Link to > Track 2, go back to its own positioning, and put the roto back. Lastly I deal with the third guy, remember this is more of a problematic track and it’s less accurate. Again I put him in his own group, then Link to > Track 3, and again put the shape back where we started. As we can see, that track is good enough to cover him throughout again, as we are only garbage matting him.
Now, one other point, what I need to do is ensure I have a track point up at the top here, within my CameraTracker. Now you can see tracks within my CameraTracker, but these don’t always remain, so I’m going to use a User Track to isolate this point. I need to be a bit more accurate with my keyframes, as I want to place CG there. I have only keyed 60 frames, not the whole lot this time, but I will key track them anyway and just track those 60 frames. Looking at the traffic lights, we can see the issues caused by motion blur, and actually even though it has gone red it’s a good track.
I’m going to bring up a CameraTracker now. You want to mask out the people, so go to Mask > Mask Alpha. We also want to create a User Track. Just expand this out, so you can read the buttons. Click the Add User Track animation button, then Link to > Track 4. However, I find the CameraTracker does not work if it is a link, so I will turn this into keyframes: Edit > Generate > Generate Keys from 1 to 60. I have a problem at the end when the interpolation carries on, so I will go to Interpolation > After/Constant, and in the CameraTracker we will use that information. Now click Track Features. Essentially, we are trying to get a lock on that point, so we know we can put an object there later on. Now that we have a point that we can create an object for, right-click on the point and select create > sphere. So lets go back into the CameraTracker and create a Camera, bring up a Scene, and through this we will be able to check the integrity of this track.
So, through using the Tracker in a combination with Roto we have been able to garbage out the people, and we have also added a User Track to the CameraTracker, so we have been able to put an object in a position of our choice.
This is Howard Jones for Foundry, goodbye.
Basic Introduction to Roto'ing in Nuke from Foundry on Vimeo.
Hello, and welcome to the RotoPaint tutorial for Foundry. In version 6.0, Foundry replaced the Bezier and Paint nodes with a new combined RotoPaint node. In version 6.1, they have introduced a new lighter version, the Roto node. We will start off with the Roto node and move onto the RotoPaint node later. Also new to 6.1 is an improved properties panel common to both the RotoPaint and the Roto nodes, and this area here is used to list and layer up all the different shapes and paint strokes. In addition, Foundry has introduced these new toolbars into the Viewer that allow you to work in full-screen mode while still having access to the RotoPaint tools. Up at the top here, the tool settings vary depending on what tool you have selected.
In this next section, we will take a look at basic shape creation. Okay, we will start with making a Bezier shape, but we also have the B-Spline and pre-built Ellipses and Rectangles to choose from. So select Bezier from the tools, and simply click in the Viewer, or click-and-drag to pull out the handles. When you are happy with the shape, to close it, either hover over the first point and click, or press Enter to close. Once you have finished your shape, it appears here in the shape list.
Now, we will have a look at the B-Spline. Again, select it from the toolbar, and as you click your points, there are no handles to pull out, and the shape appears inside the points. To change the tension of a point, hold down the Ctrl or Cmd key and drag right or left to increase or decrease the strength of the point. If you wish, you can cusp (Shift+Z) a point to give it the maximum tension, and lastly you can also select the whole shape and convert it to Bezier (convert bspline to bezier).
Now, lets look at Beziers in a bit more detail, in particular the handles and also feathering, which is common to both Bezier and B-Spline. On the Bezier’s points, there are handles attached, and as I drag them, no surprise, it changes the shape. If I pull out a handle, it changes them more in one direction than the other. If I hold down the Cmd/Ctrl key and move the point, I can break the angle between the handles, and if I release the key, we now rotate using the new angle. In the middle here is the feather tool, and if I pull this out I am feathering the shape at this point. To pull out or push in more than one feather at a time, change to the Select Feather Points tool, lasso the points, and this makes it easier to pull them out. As you move a point, the feather locks to the point. However, you can move a feather independently, but again move the point and the feather is locked. This is because the feather link is on in the toolbar here; turn this off and they can move independently. Also, you have control of the overall feathering for a shape here, within the properties panel, under the Roto tab for the Roto node and under the Shape tab in the RotoPaint node. Simply drag the slider to add feathering inside or outside your shape, and adjust falloff here (feather falloff).
In addition to what we have looked at so far, there are a few other ways we can modify our shape. We can select from the Point tools here, or right-click and select from the dropdown menu, or we can use keyboard shortcuts. For example, I will create some points using the Add Points tool, or I can use the Ctrl/Cmd+Alt shortcut and pull out a point.
Here is a brief overview of some of the other tools. If we remove a point, we use the Remove Points tool, or we can right-click and delete here, or we can select a point and hit Delete on the keyboard. The Cusp Points tool will collapse any handles that may exist on a point. We can do the same if we right-click and select Cusp from the dropdown menu, or we can lasso a point and use the shortcut Shift+Z. If we want to expand handles, we can use the curve tool (Curve Points) and click on a point, or again, right-click and select smooth, or lasso a point and hit Z. I’m going to pull out a few feather points now, or I can right-click and select increase feather from the dropdown menu or use the shortcut E to pull out the feathers. To remove the feather, we can use the Remove Feather tool, and again, we can select a point, right-click, and reset feather, or lasso multiple points and press Shift+E to reset the feathers that way. We also have a tool that allows us to open and close a shape. It should become more useful in future releases. In the next tutorial, we will look at working with layers in RotoPaint.
Working With Layers in Roto from Foundry on Vimeo.
In this tutorial, we will look at using layers and multiple shapes in Roto and RotoPaint.
This area here lists all the shapes and paint strokes used in the node. So I will start by creating a simple ellipse, and its name (Ellipse1) appears as we have seen before in the shape list. So I will create a second ellipse on top, but because I have the GL (Viewer overlay) color set to white, I can’t see what I am drawing. So I will just change the color here to something that is visible, and I will delete that shape and re-draw it. Now in the list we have two shapes, the new one is on top of the last, as the list works top down, the same as in Photoshop. Let’s just click on Ellipse2 to rename it Eye1. Now select the Root layer, and down here I can create a group, and I can drag these shapes into that group. I will just rename the group. Now if I right-click over a shape, I get options to Cut, Copy, and Paste, and I can paste between different nodes. In this case, I would like to duplicate the shape. I will just line it up, and now I will create just one more shape.
I have created this outside of the group, as the group was not selected. So I will move it into the group, and note that it goes down to the bottom. In this case, I want it further up, so I will drag it to the top, and I will just rename it. Now, if I select a shape I can change its color or other attributes. This time, I will take a second shape and change its blendingmode or I can Shift+select more than one and change all their colors or blending modes in one go. This, of course, can make everyone very happy indeed.
Now, let’s have a quick look at the different layers and transformations we can apply. Here we can use the shape tools to apply transformations, or we can use the shape’s Transform tab and use additional transformations. We can also go further and put them in a layer and add another layer or transformation, and we can do this as deep as we like.
So, back to smiley. Select the head group, and in addition to the shape’s transform, we can use the group’s Transform tab to rotate, scale, etc. the group in one go. As autokey is on at the top here, I am actually adding a second level of animation. This is most useful when applying tracking data, which you can see in the wire removal tutorial. Stepping back into the group, I can now use the mouth’s Transform tab, and we can continue to add these extra layers of animation as deep as we wish to go.
Now, I want to work on the corner of this mouth here. It is difficult to select these points without selecting unwanted points on the other shape. So I’m going to lock that shape here, which I can also do up here (Roto/Rotopaint tab > locked). Now I can select these points I want easily. Again, the same problem occurs up here, so I will lock these shapes, and now I can re-position the shape. Lastly, I will create a keyframe at the end here. Amazing.
Now, I will take our group and move it across by 450 pixels, and as you can see, it has put a keyframe in here. At this point, I want to stop animating, turn off autokey, and I will remove the animation (no animation). I will create a second shape to the right of it, but because I am still inside the group, the shape is being affected by the animations in the group. I will delete the shape, step out of the group, and re-draw it.
Now this time, I want to use the shape for something new to Nuke 6.1. So rather than use it as a color, I am going to select foreground from this menu (Source) and then I will go to the Clone tab and change the translation parameters. I now have a snapshot of the foreground inside this shape, and everything I do to the first group is cloned into this shape. Of course, if I alter the shape, it also affects the area cloned, including if I go into feather.
In the next tutorial, we will move onto animation in the RotoPaint node.
Animation In RotoPaint from Foundry on Vimeo.
In this tutorial, we will look at the basics of animation in Roto and RotoPaint.
We will start by creating a simple shape. You may notice that we already have a keyframe set. This is because the autokey button is turned on. This creates a keyframe for the spline, and also creates a keyframe for the Transform tab when first making the shape. As I move down through the shot and change the shape, I am adding keyframes, and as you can see, we will now have a very basic animation. Now, if we turn off autokey, and I move to a frame where no keyframe has been set, I can no longer animate this shape. So in this case, I have to explicitly add a keyframe before I can continue. I can do this here, or I can add a keyframe here, or I can right-click anywhere on the shape and from the dropdown menu choose Set key. I now have a choice of creating a key for everything (all), just the spline, transform, or other attributes such as feather, color, invert, etc. So add a key to the spline and animate the shape. I’m also going to animate this point here. Now, if we run through the animation, you will see the point I just moved is only animating through frame 60 and 70. This is because every time we move a point we create a key for the entire shape, not just that point.
If we go down to the Curve Editor and look at the meta curve, we will see that we have keys here for all the shapes keyframes, as well as the attributes and transform. So we can delete these, but what I have done is deleted the entire shape’s keyframes. What I really want to do is deal with this point’s keyframes only, so we will undo that (Cmd/Ctrl+Z). Now to view the point’s animation curve, hover over the point, right-click, and go to the curve editor. We have the choice of viewing the points curves, points + feather, points + tangents, or all related curves. As this can get quite cumbersome, we will just bring in the points, and here they are. These will persist now in the Curve Editor until we make a new selection of points. I will delete the main x position keys, and move the keyframe down to frame 20. And now that point animates between frame 20 and 70. I can also set curve types here. For example, I will set an ease in. On the y curve, the original keyframes remain, and if I re-frame and adjust these points, you can see we are actually affecting the point’s position, rather than adjusting the interpolation between keyframes, which was the case with the old Bezier node.
OK, now let’s look at another problem. I have animated the shape, but I want to add a feather to this point. So if I pull it out on frame 10, you will see it animates off, as the feather has the original keyframes. I only removed the point’s keyframes if you remember. So I will bring the feather’s keyframes into the Curve Editor by selecting points + feathers in the dropdown menu. If we look at the feathers curve, you will see the unwanted keyframes. I will delete these and move the keyframes to suit. Now, you will see the feather holds for longer, but still animates off -- not quite what I’m after.
Instead, I will use the ripple edit mode. This allows you to apply changes throughout the entire animation, from start to the frame you are on, or to end of the shot, or between a range of keyframes. So now if I pull the feather out, it remains pulled out for the entire animation. However, when you are using ripple edit mode, it is important to turn if off when you are finished. Otherwise, you may end up with undesirable results, as it is still affecting the animation throughout.
So far, we have been working with just one point. What if we want to bring in more than one point? We will select the shape, right-click, and and bring in all points (curve editor > points). We get a whole set of curves, which of course could be in the hundreds. How do we know which curve relates to which point? If we go up to the toolbar and turn on label points, we get a number for each one. So if I want to affect this point here, I now know it is point 0 and I can move it around in the Curve Editor here.
Now, let’s have a look at the difference between animating the shape directly and the Transform controls. I will create a shape, lasso it, and select it all. As long as show transform handle is turned on, then in Roto I get this control, and in the Transform tab, I will get this control. So using the Roto control, I can adjust the shape, rotate it, and so on. I will re-select it and this time I can scale it on a different line. I will just rotate it back and see how the shape has changed. I can select a couple of points and rotate them around a common center, so I will just create a few more keyframes for this animation. If you want to, you can change the rotation center by holding Ctrl/Cmd and dragging the center jack. I will just create a third keyframe here, and rotate the entire shape. OK, this is what we have so far. Now on frame 20, I want to move it down here, and the animation looks like this. However, let’s say I want to move the whole shape from here to a different position all the way over here. Because frame 20 already has a keyframe, I don’t get the animation I was after. So rather than do that, what I will do is use the Transform controls, create a keyframe if necessary, and then on frame 40 move the entire shape over. And now if we look at that, we will see the shape is now moving as required.
Another difference between the two modes is when rotating a shape. If I create a shape and rotate it through a large amount, I will get the classic corkscrew effect. This is because the points move directly from one position to the next via the center of the shape, rather than having the whole shape rotate. So instead, I will use the Transform controls. I will just undo that and check to see if I need to create a keyframe. Move down into frame 40 and add the rotation. If you press Shift when dragging the jack, you can avoid snapping to angles. And now, we have a proper rotation added on top.
Next, let’s have a look at the way keyframes are displayed in more detail. Here, I am creating a few keyframes on a shape at frames 1, 40, and 60. So let’s step back to frame 40, and here (spline key) it tells us that we are on keyframe 2 of 3. Also, we can use these tools here to jump to other keyframes. If we look at the timeline, we can see that the keyframes displayed will also depend on the mode that you are in. I have created a series of keys in the Transform tab on this shape. The keyframes displayed here are different to the keyframes for the shape’s animation. The timeline displays this in context. This also depends on which shape is selected, so if I select different shapes, different keyframes are shown.
One useful feature in Roto and RotoPaint is the ability to add Trackers to a shape’s points. Here is a simple card move, which has been tracked. What we are going to do is apply these tracks to 4 points on a shape. So, first off we will create a shape and cusp its points, and just to make it clearer, I will color it green. So now we will attach tracks to each point by holding Shift and dragging the tracking values over each point. We can see that the shape is now attached to the tracking points. However, ideally I want the shape to go to the edge of this card, not where the track is. If we look at the Curve Editor (right-click menu > curve editor > points), we will see there is now a keyframe for every frame, so first thing I will try is to just adjust these curves and move the point onto the edge of the card.
However, due to the nature of the track, you will see there is a drift as we move through the shot. So we will start again, but this time instead of copying the tracks to each point, I will link the tracks by holding Cmd/Ctrl and drag and dropping onto the shape’s points. Now, if we load this into the Curve Editor (points, right-click curves, Edit > Edit Expression) you can see that it is an expression, linking to track 4. So I want to add a custom knob, in Nuke’s terms, into the Roto node. To do this, right-click and select Manage User Knobs from the menu, and in this case I want to Add > 2d Position Knob. I will label this, and under the newly created User tab, I now have my new position knob.
So, if we go back to the shape’s expression, I can now add this to it. Because I used the 2d Position Knob, Nuke is clever enough to apply the x to the x, and the y to the y. So, we will now create a keyframe here, apply my offset, and I go through the shot and adjust these values to suit. Now I have the shape’s point, based on a Tracker, with an offset applied matching the shot. In the next tutorial, we will look at wire removal with RotoPaint.
Wire Removal With RotoPaint from Foundry on Vimeo.
In this tutorial, we will look at the more practical use of RotoPaint. We will be using a shot from Gallowwalkers, with kind permission from Jack Bauer and Blakedew 730 Ltd. We will also have a look at the extra tools we have in RotoPaint over the Roto node.
I will start off by making a series of brush strokes, and if I turn this on (hardness), then the brush is adjusted by pressure sensitivity. Now if I use the Eraser, and you can also use the eraser on your Wacom pen, I will just press Shift and drag to change the size of the brush, and I can erase back to the original background. I will just create a different-colored brush, and note using the tool settings here affects only this and future paint strokes. I’m going to paint over the erase strokes. Because the layer list works top down, this is now on top of the erase strokes, but if I move this layer below the erase strokes, they are now cutting through it. If I move the stroke back, it is back on top, so the order is important.
I’m going to have a brief look at the other tools before moving onto wire removal. The Clone and Shape tools have a further set of parameters, which you can access here, and they are basically the Clone tab from the properties panel. So with Clone, to set the offset, press Ctrl/Cmd+Shift and then drag. This sets both the source and destination at the same time; Ctrl/Cmd+drag however sets just the destination point. Again, Cmd/Ctrl+Shift to set both the source and destination. I will just delete these paint strokes. Now, something to remember when you are cloning is that, because a translation is used, you can often end up with a soft, filtered clone, like this. The trick is to turn on round, which changes the translate to the nearest pixels, or to use an Impulse filter, which has the same result. Now, we have a nice, sharp clone.
OK, I have a CheckerBoard with frame numbers on coming into the background input of the RotoPaint node. The Reveal mode is similar to the Clone mode except all translation functions are grayed out. However, I have this extra parameter which lets me set the time offset of the incoming image. So If I reveal with a time offset of 0, as you can see we are on frame 68, we will be revealing the background at frame 68 also. If I change this to 10 and stay on relative, then I am revealing frame 78 from the background input, and if I change that to -10, I will reveal frame 58. If I change this to absolute and again type 10, I am revealing frame 10 of the background, regardless of which frame I am on. Again if this is relative, I am revealing 10 frames ahead.
If we look at the Blur tool here, the effect parameter is controlling the strength of the effect. In this case, it is the same as a blur of 15. Change it to 5 and it’s less strong. The same is true of the Sharpen tool (X). Here, I will change it to 30, and you can see it is much stronger. With the Smear, however, although the effect parameter is available, it has no apparent effect. Lastly, with Dodge and Burn, the strength of these is controlled by the opacity parameter.
Now, we will look at a practical example of the Clone tool. We will go into this area of the rope, and using Ctrl/Cmd+Shift, I will set the destination and source offsets. I will check that I have the filter set correctly, and we will just clean up the wire either side of the rope. Now, I have forgotten to set the life span correctly for these strokes, so I will do that on the properties panel under the Lifetime tab. I need to remember that they were created on frame 51. I will set their lifetime type to all frames, and I have a Tracker here that has tracked both sides of the rope. I will set its reference frame to the frame I created the strokes on, frame 51. So now I will add a new Layer/Group and call this rope cleanup, and I will move both of these 2 clones into that layer. In the Transform tab of that layer, I will copy the Tracker’s match-move parameters. And now we will see these strokes are doing a pretty good job of removing the wire throughout. However, as we drag through, you can see there is a bit of a drift going on. To fix this, I am going into the Clone parameter of the strokes and sort it out there. So I will select the stroke, go into the Clone parameter, set a key, and I will just turn off the overlay for the moment by pressing O. Now, if I adjust the Clone, I have repaired the left side of the rope. If I do the same with the other side, set a key, set a second key, and move it over, I have repaired that side too. All done, give or take, using two paint strokes and a Tracker.
Now, we will have a look at the hood section here. This time, I will use a shape to remove the wire. So, I will create a shape and adjust the join to the hood. Instead of using the color, we will switch the shape to foreground (Shape tab > source), then in the Clone tab we will remove the wire. Here I have a Tracker, which is tracking the hood and the wire crossover. I am going to set the Tracker to Stabilize, and then in the RotoPaint while viewing the Tracker, I can roto the stabilized image, and this makes it easier to see what’s going on. So now we have a roto that is following the shape of the hood, but this is working on our stabilized image and we want it to work on the original image. I will take our roto and put it in a new layer, which I will call HoodCleanUp. Then, I will take our Tracker and convert this to match-move, and as we did before, I will copy the animation across into the Translate parameters of the layer. The advantage of using a group here is that, even though there is only one shape, I can differentiate easily between the shape’s keyframes and the track’s keyframes. Now the roto is following the original footage. This method also avoids match-moving a rasterized image, which would have been the case if I added a match-move after the RotoPaint node.
Now, if we look at the actual join itself, we can see it is a bit sharp. So I can go into the Bezier1, and adjust the feather and bring back the falloff to get a softer edge. Then, we can improve this further by utilizing the ripple edit mode. I will turn this on and adjust the shape here. This will soften off the join with individual point feathering. And because ripple edit is on, it has adjusted the shape throughout. Now we have a smoother, more complete cleanup. In the next tutorial, we will look at painting through geometry.