GridWarpTracker
GridWarpTracker is an alternate solution to manual tracking with PlanarTracker, which allows you to warp and morph using custom grid shapes driven by tracking data, rather than being constrained to rigid transformations. If you have a NukeX or Nuke Studio license, you can also use SmartVectors to drive the grids.
The From and To grids allow you to add and copy tracking data between grids so that you can make adjustments without losing your original data and without having to create a backup version of the node. If you have a NukeX or Nuke Studio license, you can add keyframed adjustment grids to modify your From and To grid shapes without altering the original grid data.
Inputs and Controls
Connection Type |
Connection Name |
Function |
Input |
src |
The sequence you want to warp or morph. |
dst |
An optional input to which the src image is morphed using the Morph Amount and Mix controls. |
|
SmartVector |
An optional input allowing you to drive the warp or morph using NukeX's SmartVector node. |
Control (UI) |
Knob (Scripting) |
Default Value |
Function |
GridWarpTracker 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 filter effect 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 filter effect 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. |
Mode |
|||
Output |
output |
Warp |
Sets the output displayed in the Viewer: • Warp - displays the warped src input from the points in the From grid to the points in the To grid. • Morph - displays both grids and the morphed image depending on the warp and mix parameters. |
Invert |
invert_warp |
disabled |
When enabled, swap the From and To grids so that the warped destination is displayed, rather than the warped source. |
Warp Amount |
warp |
1 |
When Output is set to Warp, controls the amount of warp between the From and To grids, where 1 is the full warp and 0 is the source image. |
Morph Amount |
morph |
1 |
When Output is set to Morph, controls the strength of morphing between the From and To grids, where 1 is the full morph and 0 is the source image. |
Mix |
mix |
0 |
When Output is set to Morph, adjusts the mix between the source and destination images, where 0 is the source image and 1 is the destination image. |
Set BBox To |
bbox |
Union |
Select how you want to output the bounding box. The default is Union, which combines the two bounding boxes. You can also select Format to set the bounding box to the format size. |
Background |
background |
Black |
If your grids are smaller than the format size, sets whether the warp or morph is rendered against a Black constant or the Source image. |
Grids |
|||
Divisions XY |
divisions_x |
5 |
Controls the number of columns in the grids. Accepts values from 3 to 20 |
divisions_y |
5 |
Controls the number of rows in the grids. Accepts values from 3 to 20 |
|
Gang |
divisions_gang |
|
When enabled, changes to either of the divisions sliders is applied to both axes. |
Keys |
N/A |
0 |
Displays the total number of user keyframes added to the sequence. |
N/A |
0 |
Displays the current user keyframe. |
|
|
N/A |
N/A |
Click to jump to the previous user keyframe. |
|
N/A |
N/A |
Click to jump to the next user keyframe. |
|
N/A |
N/A |
Click to add a user keyframe at the current frame in the sequence. |
|
N/A |
N/A |
Click to delete the user keyframe at the current frame in the sequence. |
|
N/A |
N/A |
Click to copy the current keyframe to the clipboard. |
|
N/A |
N/A |
Click to copy all keyframes to the clipboard. |
|
N/A |
N/A |
Click to paste keyframes from the clipboard. |
From |
N/A |
N/A |
Displays the state of the From grid where the warp or morph operation begins. • - click to link or unlink the From and To grids. When linked, changes to either grid are applied to the other. • - click to make the selected grid active. • - click to hide the selected grid. • - click to lock the selected grid. Vertices on a locked grid cannot be adjusted. • - click to change the color of the selected grid. |
To |
N/A |
N/A |
Displays the state of the To grid where the warp or morph operation ends. Also displays the state of any adjustment grids, if present. • - click to link or unlink the From and To grids. When linked, changes to either grid are applied to the other. Adjustment grids cannot be linked to other grids. • - click to make the selected grid active. • - click to hide the selected grid. • - click to lock the selected grid. Vertices on a locked grid cannot be adjusted. • - click to change the color of the selected grid. Note: GridWarpTracker can process a maximum of six adjustment grids. |
Transform Tab |
|||
From |
|||
Translate xy |
from_base_transform_translate |
0,0 |
Adjusts the translation, rotation, and scale values applied to the base grid. |
Rotate |
from_base_transform_rotate |
0 |
|
Scale |
from_base_transform_scale |
1 |
|
Skew X |
from_base_transform_skewX |
0 |
Adjusts the skew applied to the base grid on the X and Y axes. |
Skew Y |
from_base_transform_skewY |
0 |
|
Skew Order |
from_base_transform_skew_order |
XY |
Sets the order in which skew transforms are applied: XY YX |
Center xy |
from_base_transform_center |
dependent on input format or Compositing environment Project Settings |
Sets the center of rotation and scaling. You can also cmd + drag the Transform widget in the Viewer. This control defaults to the center of the input format or the Project Settings > full size format control if no input is connected. |
Extra Matrix |
from_base_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. |
To |
|||
Use From Transform |
use-source_transform |
enabled |
When enabled, the transforms applied to the From grid are mirrored on the To grid. When disabled, you can apply transforms to the To grid independent of the From grid. |
Translate xy |
to_base_transform_translate |
0,0 |
Adjusts the translation, rotation, and scale values applied to the base grid, providing Use From Translation is disabled. |
Rotate |
to_base_transform_rotate |
0 |
|
Scale |
to_base_transform_scale |
1 |
|
Skew X |
to_base_transform_skewX |
0 |
Adjusts the skew applied to the base grid on the X and Y axes, providing Use From Translation is disabled. |
Skew Y |
to_base_transform_skewY |
0 |
|
Skew Order |
to_base_transform_skew_order |
XY |
Sets the order in which skew transforms are applied, providing Use From Translation is disabled: XY YX |
Center xy |
to_base_transform_center |
dependent on input format or Compositing environment Project Settings |
Sets the center of rotation and scaling, providing Use From Translation is disabled. You can also cmd + drag the Transform widget in the Viewer. This control defaults to the center of the input format or the ProjectSettings > full size format control if no input is connected. |
Extra Matrix |
to_base_transform_matrix |
|
Adds an extra matrix which is calculated after the transforms defined by the other controls, providing Use From Translation is disabled. 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. |
Render Tab |
|||
Submesh Resolution |
render_res |
10 |
Sets the number of subdivisions that are created between bezier curves in the grid. |
Filter |
filter |
Cubic |
Sets the image resampling filter 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. |
Python Tab (These controls are for Python callbacks and can be used to have Python functions automatically called when various events happen in Nuke.) |
|||
before render |
beforeRender |
none |
These functions run prior to starting rendering in execute(). If they throw an exception, the render aborts. |
before each frame |
beforeFrameRender |
none |
These functions run prior to starting rendering of each individual frame. If they throw an exception, the render aborts. |
after each frame |
afterFrameRender |
none |
These functions run after each frame is finished rendering. They are not called if the render aborts. If they throw an exception, the render aborts. |
after render |
afterRender |
none |
These functions run after rendering of all frames is finished. If they throw an error, the render aborts. |
render progress |
renderProgress |
none |
These functions run during rendering to determine progress or failure. |