VectorCornerPin

The VectorCornerPin node takes paint or an image from a reference frame and propagates it through the rest of the sequence using the motion vectors generated by the SmartVector node. This node, similar to CornerPin2D, allows you to set keyframes on the image, but uses vector information from SmartVector rather than tracking information to drive the warp.

See SmartVector and CornerPin2D.

Inputs and Controls

Connection Type

Connection Name

Function

Input

 

Source

The sequence containing the paint corrections or image and the source of the motion vectors.

SmartVector

The motion vectors generated by the SmartVector node. You can connect the SmartVector directly or read in the .exr files created by the node.

Control (UI)

Knob (Scripting)

Default Value

Function

VectorDistort Tab

Local GPU

gpuName

N/A

Displays the GPU used for rendering when Use GPU if available is enabled. Local GPU displays Not available when:

Use CPU is selected as the default blink device in the Preferences.

no suitable GPU was found on your system.

it was not possible to create a context for processing on the selected GPU, such as when there is not enough free memory available on the GPU.

You can select a different GPU, if available, by navigating to the Preferences and selecting an alternative from the default blink device dropdown.

Note:   Selecting a different GPU requires you to restart Nuke before the change takes effect.

Use GPU if available

useGPUIfAvailable

enabled

When enabled, rendering occurs on the Local GPU specified, if available, rather than the CPU.

Note:  Enabling this option with no local GPU allows the script to run on the GPU whenever the script is opened on a machine that does have a GPU available.
You should also select this if you wish to render from the command line with the --gpu option.

See Nuke 14 Release Notes for more information on the GPUs Nuke supports.

User 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 delete all keyframes in the sequence, both user and baked.

User1 xy

user1

N/A

Controls the position of the pins at the current keyframe.

User2 xy

user2

N/A

User3 xy

user3

N/A

User4 xy

user4

N/A

To Corners

To1 xy

to1

N/A

Displays the position of the pins at the current frame, once you've set a user keyframe.

To2 xy

to2

N/A

To3 xy

to3

N/A

To4 xy

to4

N/A

Copy 'From'

N/A

N/A

Click to copy and paste the From1-4 values to the To1-4 values.

Bake Corners

bakeCorners

N/A

Click to calculate the position of the pins for each frame specified in the Render dialog. The baked position is driven by the vectors, independent of the user keyframes, so the pins need less drastic correction than between keyframes.

Filter

imageFilter

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.

From Tab

From1 xy

to1

N/A

Pin 1 controls the bottom left corner of the warp.

From2 xy

to2

N/A

Pin 2 controls the bottom right corner of the warp.

From3 xy

to3

N/A

Pin 3 controls the top right corner of the warp.

From4 xy

to4

N/A

Pin 4 controls the top left corner of the warp.

Set To Input

N/A

N/A

Click to set the From controls to the size of the input format.

Copy 'To'

N/A

N/A

Click to copy and paste the To1-4 values to the From1-4 values.

SmartVector Tab

Frame Distance

frameDistance

1 frame

Sets the trade-off between warping things well for nearby frames against frames further away. Each shot has its own optimum frame distance value so try several values to see what produces the best results.

For example, warping up to 20-30 frames away from the reference frame, or sequences with rapid motion, typically require values closer to 1 frame. Warping over 100 frames away, or sequences with slower motion, typically require values closer to 64 frames.

Output

outputMode

warped src

Sets the type of output produced by VectorCornerPin:

warped src - output the warped Source input using the reference frame as a template for warping the rest of the sequence.

st-map - output the st-map for the warp from the reference frame to the current frame. This is useful if you want to bake the results of the node for later.

st-map inverse - output the inverse st-map for the warp, that is, the warp from the current frame to the reference frame.

Blur Size

blurSize

0

Controls the amount of blur applied to the internally calculated STMap. Increasing the blur size can remove local distortions in the warped result, particularly in longer sequences.

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.

Step-by-Step Guides

Applying Motion Vectors to the Source

Warping Images Using VectorCornerPin