Contact Support

SmartVector

The SmartVector node writes motion vectors to the .exr format, which are then used to drive the VectorDistort node as part of the Smart Vector toolset.

See also VectorDistort.

Inputs and Controls

Connection Type

Connection Name

Function

Inputs

Matte

An optional matte of the foreground, which may improve the motion estimation by reducing the dragging of pixels that can occur between foreground and background objects.

Src

The sequence from which to generate motion vectors.

Control (UI)

Knob (Scripting)

Default Value

Function

SmartVector 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. The output between the GPU and CPU is identical on NVIDIA GPUs, but using the GPU can significantly improve processing performance.

Nuke supports AMD GPUs on late 2013 Mac Pro 6,1, mid 2015 Mac Pro 11,5, and late 2016 MacBook Pro 13,3, running OS X 10.9.3 'Mavericks', or later. Bit-wise equality between GPU and CPU holds in most cases, but for some operations there are limitations to the accuracy possible with this configuration.

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.

GPU processing also requires certain NVIDIA and AMD drivers. For more information on the minimum requirements, refer to the Nuke Release Notes available in Help > Release Notes.

frame distance

render_max_frame_distance

6

Sets the maximum number of frames over which motion is calculated. Distance is 2 to the power of frame distance. For example, a frame distance of 5 is 2^5=32, meaning that vectors are calculated up to a maximum of 32 frames away from the current frame.

Note:  This value is passed down the node tree so that any VectorDistort nodes downstream are limited to this frame distance.

Vector Detail

vectorDetailReg

0.3

Sets the vector quality. The default value of 0.3 is sufficient for sequences with low detail and movement, but you may want to increase the detail to improve the vector quality in some cases.

Note:  High detail vectors take longer to render, but can improve the results you get from the VectorDistort node.

Strength

strengthReg

1.5

Sets the strength in matching pixels between frames. Higher values allow you to accurately match similar pixels in one frame to another, concentrating on detail matching even if the resulting motion field is jagged. Lower values may miss local detail, but are less likely to provide you with the odd spurious vector, producing smoother results.

Note:  The default value works well for most sequences.

Matte Channel

matteChannel

None

Where to get the optional foreground mask to use when estimating motion:

None - do not use a matte.

Source Alpha - use the alpha of the Source input.

Source Inverted Alpha - use the inverted alpha of the Source input.

Matte Luminance - use the luminance of the Matte input.

Matte Inverted Luminance - use the inverted luminance of the Matte input.

Matte Alpha - use the alpha of the Matte input.

Matte Inverted Alpha - use the inverted alpha of the Matte input.

Inpaint Matte Region

inpaint

disabled

When enabled, any areas where vectors are absent are infilled using the nearest available vectors.

Note:  This control is only available when Matte Channel is set to one of the matte options, such as Matte Alpha.

Matte Dilation

matteDilation

50

Controls the amount of dilation applied to the inpainted areas.

Note:  This control is only available when Inpaint Matte Region is enabled.

Export

Export Write

export_write

N/A

Click to automatically create a Write node with suitable .exr settings to contain the vector data.

Advanced

Flicker Compensation flickerCompensation disabled

When enabled, SmartVector takes into account variations in luminance and overall flickering, which can cause problems with your output. Examples of variable luminance include highlights on metal surfaces, like vehicle bodies, or bodies of water within a layer that reflect light in unpredictable ways.

Note:   Using Flicker Compensation increases rendering time.

Tolerances

Weight Red

weightRed

0.3

For efficiency, much of the motion estimation is done on luminance only - that is, using monochrome images. The tolerances allow you to tune the weight of each color channel when calculating the image luminance. These parameters rarely need tuning. However, you may, for example, wish to increase the Weight Red to allow the algorithm to concentrate on getting the motion of a primarily red object correct, at the cost of the rest of the items in a shot.

 

 

Weight Green

weightGreen

0.6

Weight Blue

weightBlue

0.1

Step-by-Step Guides

Generating Motion Vectors