SplineWarp

The SplineWarp node warps an image based on multiple shapes or pins that you create. Unlike the GridWarp node, you can draw these shapes anywhere on either image, rather than only add points on the existing grid lines, and corresponding shapes can have differing numbers of points. You can also copy and paste shapes from other SplineWarp and Roto or RotoPaint nodes.

See also GridWarp.

Inputs and Controls

Connection Type

Connection Name

Function

Input

A

The image to warp from, though B to A warps are equally valid.

B

The image to warp to, though B to A warps are equally valid.

mask

An optional image to use as a mask. By default, the warp effect is limited to the non-black areas of the mask. All channels for pixels outside the mask region are copied from input A.

At first, the mask input appears as triangle on the right side of the node, but when you drag it, it turns into an arrow labeled mask.

Control (UI)

Knob (Scripting)

Default Value

Function

SplineWarp Tab

channels

channels

all

The warp effect is only applied to these channels.

If you set this to something other than all or none, you can use the checkboxes on the right to select individual channels.

Note:  There is no need to include the output mask channel in this layer.

premultiply input

premultiply

disabled

When enabled, premultiply the input channels by a mask from the combined cookie cutter shapes prior to warping. This control uses the same mask as output mask but may be used without assigning an output mask channel.

Note:  This control can only be enabled when the curves list contains shapes designated as cookiecutters.

output mask

outputMask

mask_splinwarp.a

Sets the channel to be replaced by a mask from the combined cookie cutter shapes.

Note:  This control can only be enabled when the curves list contains shapes designated as cookiecutters.

crop to format

crop_to_format

enabled

When disabled, the input image is not cropped to the Project Settings > full format size. As a result, warping can introduce pixels from the image outside the format size, rather than black.

Note:  Disabling crop to format can affect performance as Nuke has to calculate the warp for the entire image, not just the area inside the format size.

bbox boundary curve

boundary_bbox

enabled

When enabled, a curve is added at the format boundaries, effectively pinning the corners of the image.

This boundary can be tightened by increasing boundary curve resolution on the Render tab.

output

output

source warped

Controls what output is displayed in the Viewer:

A - the A input image.

A warped - the warped A input image.

B - the B input image.

B warped - the warped B input image.

AB morph - the morphed image, controlled by the warp and mix controls.

mix

mix

0

Dissolves between the source image (at 0) and the destination image (at 1).

Note:  This control is only enabled when output is set to AB morph.

root warp

root_warp

1

Sets the global warp multiplier for all shape pairs and layers in the curves list.

For AB pairs, root warp determines the warp where the A image is warped towards B by the warp amount. B is warped towards A by 1-warp.

layer warp

layer_warp

1

Sets the warp multiplier for all selected layers in the curves list.

Note:  This control is disabled when anything other than layers are selected in the curves list.

pair warp

pair_warp

1

Sets the warp multiplier for the selected pairs of shapes in the curves list.

For AB pairs it determines the warp where the A image is warped towards B by the warp amount. B is warped towards A by 1-warp.

Note:  This control is disabled when anything other than paired shapes are selected in the curves list.

spline key

key

0, 0

Controls spline keyframes:

keys - displays the current and total number of keyframes.

- browse to the previous and next keyframe.

- add or remove a keyframe on the current frame.

Note:  If Viewer tools auto is enabled, any changes to the splines are automatically set as keyframes at the current frame.

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

Pairing - Displays the pairing relationship between shapes.

Type - Displays which input shapes exist in A, B, or AB.

- Designates the shape or layer as transform linked to another shape or layer. Entries linked this way are affected by transforms applied to transform source.

- Designates the shape as a cookie cutter for the premultiply and output mask controls.

- Whether the shape or layer is visible and rendered or not.

- Lock or unlock the shape or layer.

- Set the color in which you want the outline of your shape to appear in the Viewer.

- Toggles whether or not the current shape is a hard boundary (removes warping outside the shape).

- Indicates whether or not the current shape is a boundary (limits warping).

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

Right-click for a context menu containing Addnewlayer and shape editing functions such as Copy, Paste, and Duplicate.

Transform Tab

translate xy

translate

0, 0

Translates the selected curves on the x and y axes.

Alternatively, you can drag on an axis on the transformation overlay in the Viewer.

rotate

rotate

0

Rotates the selected curves around the center xy coordinates.

Alternatively, you drag the transformation overlay in the Viewer.

scale

scale

1

Scales the selected curves’ width and height.

Setting one of these to a negative value reverses the curve along that axis.

skew X

skewX

0

Skews the selected curve(s) on the x axis.

skew Y

skewY

0

Skews the selected curve(s) on the y axis.

skew order

skew_order

XY

Sets the order in which skew transforms are applied to the selected curve(s):

XY

YX

center xy

center

Dependent on source input

Sets the center of scaling and rotation for the selected curves.

extra matrix

transform_matrix

N/A

Copy tracking information from either a Tracker or Roto/RotoPaint node to this matrix.

Warps linked in this way follow the information from the imported track automatically.

Render Tab

curve resolution

curverez

3

Adjusts the accuracy of the warp/spline match. Higher values increase accuracy, but sacrifice speed and vice-versa.

Note:  Correspondence points may be used to improve the warping accuracy in a specific part of the curve if turning this value up too high causes performance problems.

boundary curve resolution

boundary_curverez

3

Adjusts the number of interpolated points on boundary and hard boundary curves. Higher values stop the warp from filtering through the boundary curves, but sacrifice speed and vice versa.

preview resolution

previewrez

100

Improves the accuracy of the preview at higher values and the rendering speed at lower values.

Classic warping

rbf

disabled

Sets the type of warp function to use:

disabled - uses an updated quadratic warp function that copes well with overlapping control points, but has a more local warp effect.

enabled - employs a warping function from previous versions of Nuke that has a more global warp effect, but doesn’t cope well with overlapping control points. Additionally, Classic warping produces a more linear warp between points, which may produce better results when using a cookie cutter mask to cut out the warped image.

filter

filter

cubic

Select the filtering algorithm to use when remapping pixels from their original positions to new positions. This allows you to avoid problems with image quality, particularly in high contrast areas of the frame (where highly aliased, or jaggy, edges may appear if pixels are not filtered and retain their original values).

Impulse - remapped pixels carry their original values.

Cubic - remapped pixels receive some smoothing.

Keys - remapped pixels receive some smoothing, plus minor sharpening (as shown by the negative -y portions of the curve).

Simon - remapped pixels receive some smoothing, plus medium sharpening (as shown by the negative -y portions of the curve).

Rifman - remapped pixels receive some smoothing, plus significant sharpening (as shown by the negative -y portions of the curve).

Mitchell - remapped pixels receive some smoothing, plus blurring to hide pixelation.

Parzen - remapped pixels receive the greatest smoothing of all filters.

Notch - remapped pixels receive flat smoothing (which tends to hide moire patterns).

Lanczos4, Lanczos6, and Sinc4 - remapped pixels receive sharpening which can be useful for scaling down. Lanczos4 provides the least sharpening and Sinc4 the most.

Step-by-Step Guides

Warping Images

Video Tutorials

Related Topics Link IconRelated Topics