GridWarp

The GridWarp node allows you to warp images by transferring image information from one Bezier grid onto another. When using this node, you first position the source grid, which defines where to warp from. Next, you position the destination grid, which defines where to warp the image to. This grid can be a duplicate of the source grid, or you can define it separately. When you manipulate the destination grid, the corresponding warp is applied to the source image.

See also SplineWarp.

Inputs and Controls

Connection Type

Connection Name

Function

Input

bg

The background image to receive the warp result when the background control is set to bg.

dst

The destination image to warp to.

src

The source image to warp from.

mask

An optional image to use as a mask. By default, the warp effect is limited to the non-black areas of the mask.

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

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

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 warp is 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 the warp 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.

Source Grid

keys

source_grid_keys

0, 0

Controls keyframes applied to the Source Grid:

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.

- copy a keyframe to the clipboard.

- paste a keyframe from the clipboard.

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

visible

source_grid_visible

disabled

When enabled, the Source Grid lines and handles are visible.

locked

source_grid_locked

disabled

When enabled, the Source Grid lines and handles are locked.

Resize to Image

source_image_size

N/A

Click to resize the Source Grid to the same size as the src input image.

Destination Grid

keys

destination_grid_keys

0, 0

Controls keyframes applied to the Destination Grid:

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.

- copy a keyframe to a temporary buffer.

- paste a keyframe from the temporary buffer.

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

visible

destination_grid_visible

enabled

When enabled, the Destination Grid lines and handles are visible.

locked

destination_grid_locked

disabled

When enabled, the Destination Grid lines and handles are locked.

Resize to Image

destination_image_size

N/A

Click to resize the Destination Grid to the same size as the dst input image.

Settings

output

output

source warped

Controls what output is displayed in the Viewer:

source - the source image and source grid.

sourcewarped - the source image and destination grid.

destination - the destination image and destination grid.

destinationwarped - the destination image and source grid.

morph - the morphed image, controlled by the warp and mix parameters, and both grids.

warp

warp

1

Controls grid distortion during morphing. The mix value controls whether the source or destination grids are affected.

Note:  Warp is only enabled when the output control is set to morph.

mix

mix

0

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

Note:  Mix is only enabled when the output control is set to morph.

background

background

on src

Sets what to use as the warp background:

on black - render the warped image on top of a constant black image.

on src - render the warped image on top of the image connected to the src input of the GridWarp node.

on dst - render the warped image on top of the image connected to the dst input of the GridWarp node.

on bg - render the warped image on top of a background image connected to the bg input of the GridWarp node.

background mix

background_mix

0

Blends between the output of the GridWarp node (at 0) and whatever you have selected from the background dropdown menu (at 1).

set bbox to

boundary_box

union

Sets the boundary box properties.

union - both input boundary boxes are combined.

format - the input with the largest boundary box is used.

Transform Tab

Source

translate xy

source_grid_transform_translate

0, 0

Translates the selected grid(s) on the x and y axes.

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

rotate

source_grid_transform_rotate

0

Rotates the selected grid(s) around the center xy coordinates.

Alternatively, you drag the transformation overlay in the Viewer.

scale

source_grid_transform_scale

1

Scales the selected grid(s) width and height.

Setting one of these to a negative value reverses the selected grid(s) along that axis.

skew X

source_grid_transform_skewX

0

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

skew Y

source_grid_transform_skewY

0

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

skew order

source_grid_transform_skew_order

XY

Sets the order in which skew transforms are applied to the source grid:

XY

YX

center xy

source_grid_transform_center

Dependent on source input

Sets the center of scaling and rotation for the selected grid(s).

extra matrix

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

Destination

use source transform

use_source_transform

enabled

When enabled, the source and destination grids are translated identically.

Disable this control if you want to translate the destination image independently.

transform xy

destination_grid_transform_translate

0, 0

Translates the destination grid on the x and y axes.

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

rotate

destination_grid_transform_rotate

0

Rotates the destination grid around the center xy.

Alternatively, you drag the transformation overlay in the Viewer.

scale

destination_grid_transform_scale

1

Scales the destination grid width and height.

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

skew X

destination_grid_transform_skewX

0

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

skew Y

destination_grid_transform_skewY

0

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

skew order

destination_grid_transform_skew_order

XY

Sets the order in which skew transforms are applied to the destination grid:

XY

YX

center xy

destination_grid_transform_center

Dependent on destination input

Sets the center of scaling and rotation for the destination grid.

extra matrix

destination_grid_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

submesh resolution

render_res

10

Sets the number of subdivisions created between bezier curves in the grid during rendering.

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.

Options Tab

Colors

source color

source_color

N/A

Sets the color of the source grid.

destination color

destination_color

N/A

Sets the color of the destination grid.

Step-by-Step Guides

Warping Images

Video Tutorials

Related Topics Link IconRelated Topics