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_
shutter

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_
shutter_offset_
type

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_
shutter_offset

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_
shutter

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_
shutter_offset_
type

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_
shutter_offset

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_
round

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_
outside

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

Using RotoPaint

Video Tutorials

Related Topics Link IconRelated Topics