ANR Tools

ANR AI Vector Tracker

AI motion vectors for every pixel of the plate: live for vector blur and retimes, or baked to smart vectors and ST maps that carry a paint fix through the shot.

  • Trackers
  • Trackers pack
  • Tracker models
  • 3 inputs
  • 40 controls

Overview

The AI Vector Tracker measures how every pixel moves from frame to frame with an AI flow model. Set Output to Motion Vectors to see them live: red and green hold the forward vector, blue and alpha the backward one.

Bake Maps writes the whole Range to disk and puts Read nodes for what it wrote on the clipboard. Smart Vectors are an EXR sequence with forward and backward layers and smart vector layers, for Kronos, VectorBlur, MotionBlur and VectorDistort, the same way a SmartVector render is used. The STMap is a per-frame map back to the STMap Reference Frame: warp a patch painted on that frame with it and the patch follows the surface, for faces, cloth and other surfaces a point track cannot describe.

A foreground that passes in front of the surface can be kept out of the STMap: connect a matte of it to Occlusion and the hidden motion is estimated from the visible motion around it.

Inputs

SourceMatteOcclusionAI Vector TrackerOutput
  1. Sourcerequired

    The plate to measure.

  2. Matteoptional

    Not used by the vectors. Leave it empty.

  3. Occlusionoptional

    An animated matte of whatever passes in front of the surface: white alpha = obstruction, black = visible. Used by the STMap bake when Use Occlusion Mask is on.

Output. The plate, or with Output: Motion Vectors the live vectors (r g b a = forward u v, backward u v). The baked files come in through the Read nodes that Bake Maps pastes.

Quick start

  1. Add ANR AI Vector Tracker and connect the plate to Source. Work on the Vector Track tab.
  2. Press Load Flow Model.
  3. Set Output to Motion Vectors to check the live vectors on a few frames.
  4. Set Range (Viewer In/Out copies the viewer's in and out points) and set a Vector Cache folder, or press Generate Autofill.
  5. For a paint fix, set STMap Reference Frame to the frame you will paint (Set to Current Frame), choose Bake and STMap Format.
  6. Press Bake Maps, click in the Node Graph and press Ctrl+V for the Read nodes.
  7. Use the STMap Read with ANR STMap or Nuke's STMap, with the plate held on the STMap Reference Frame (with your paint on it) as the source; feed the smart vector Read to Kronos, VectorBlur or VectorDistort.

The panel

The node's panel as Nuke shows it, with the values of a new node. Click any control to see what it does; tabs and sections work as in Nuke.

ANR_AI_Vector_Tracker1

Range and Output, with the original controls in a closed group at the bottom.

RangeInput
Custom First0
Custom Last0
OutputPlate
StatusPress Load Flow Model, then set Output to Motion Vectors to see them live, or Bake Maps to write the STMap.
Load Flow ModelUnload Flow Model
Vector DetailAuto (up to 1080p)
Refinement Iterations8
Max Frame Distance1 frame
Generate Autofill
Vector Cache
STMap Reference Frame0
BakeSTMap only
STMap FormatPNG (16-bit, no alpha)
Use Occlusion Mask
Occlusion Edge Margin (px)8
Bake MapsClear Vector Cache

All controls

ANR AI Vector Tracker19 controls

Range and Output, with the original controls in a closed group at the bottom.

RangeMenutrackRangeMode

Which frames to track. Input uses the range of the footage into this node, Global uses the project range, and Custom uses the two frame fields below.

Default: InputOptions: Input Global Custom

Custom FirstSlidertrackRangeStart

First and last frame to analyse, used when Range is set to Custom.

Default: 0

Custom LastSlidertrackRangeEnd

First and last frame to analyse, used when Range is set to Custom.

Default: 0

OutputMenutrackOutput

Plate shows the picture with the markers on it, which is what you want while tracking. Track Data outputs the solved points as a small data image instead - connect THAT to an ANR Point Matcher's Tracks input and it drives the warp directly, with no file and nothing to type. The picture is not usable in Track Data mode; it is data, not a look.

On this node use Plate or Motion Vectors. Track Data carries point tracks, and this node places no points.

Default: PlateOptions: Plate Track Data Motion Vectors (r g b a = forward u v, backward u v)

Vector Track (linked from the Vector Track tab)

StatusStatusvecStatus

What the flow model is doing and what the last bake wrote, including where the files went and how to use them.

Load Flow ModelButtonvecLoadModel

Load the selected flow model into memory. Separate from the tracking model -- the two run in their own helper processes and can be loaded independently.

Unload Flow ModelButtonvecUnloadModel

Release the model and its VRAM. Useful before rendering something else heavy on the same GPU.

Vector DetailMenuvecDetail

The resolution the flow is computed at, then scaled to the plate. The flow model was trained at 1080p and works there in about 2 GB; Auto sends the plate as it is up to that size and reduces anything larger to it.

Measured on a 4K shot: the warp error is the same from 1536 px up (2.53 at 2048, 2.49 at 3840, against 7.28 unwarped), while true 4K needs 20 GB and three minutes a frame. So Auto is the right choice for nearly everything; Fine goes to 2560 on the long edge for very small detail, at about four times the time. Half and Quarter are for a quick look.

Default: Auto (up to 1080p)Options: Auto (up to 1080p) Fine (up to 2560 px) Half Quarter

Refinement IterationsSlidervecIters

How many times the model refines its answer. 8 is what it was trained with; fewer is faster and softer, more rarely helps.

Default: 8

Max Frame DistanceMenuvecMaxDistance

For Bake. Besides the vectors to the next and previous frame, also bake vectors that jump 2, 4, 8... frames at once, up to this many, as separate layers. A warp across many frames can then be built from a few long jumps instead of dozens of short ones added together, which is what the Smart Vector toolset does with its own frame distance. Each extra distance costs one more flow per frame.

Default: 1 frameOptions: 1 frame 2 frames 4 frames 8 frames 16 frames 32 frames 64 frames

Generate AutofillButtonanrCacheAutoFill

Create a new node-type/footage_letter_4digits folder on every click, then stop. Previous caches are kept. Enter a folder to choose a custom base.

Vector CacheFilevecCacheDir

Folder for vector and STMap caches. Bake creates it and writes the files. Live viewing uses memory and does not create a disk cache.

Default: empty

STMap Reference FrameSlidervecRefFrame

The frame every STMap points back to: the plate held on this frame is what the STMap node warps. 0 means the same as the tracker's Reference Frame on the first tab. Put it in the middle of the stretch you need - the map is chained outward from it, so the drift at the ends is what the distance from here makes it. The button beside it sets it to the frame under the playhead.

Left at 0, the frame the node was created on is used (or the first frame of the Range if that one is outside it). Set it yourself to be sure.

Default: 0

BakeMenuvecBakeWhat

What Bake writes. Smart vectors are the forward/backward and smartvector layers for Kronos, VectorBlur and VectorDistort; the STMap is the per-frame map back to the Reference Frame for an STMap node. STMap only is the quick route: the same flow is computed, only the map is written.

Default: STMap onlyOptions: Smart Vectors + STMap STMap only Smart Vectors only

STMap FormatMenuvecStmapFormat

EXR keeps the map in float with confidence alpha. PNG can also include confidence alpha with the third option. UV coordinates are always unpremultiplied. PNG is 16-bit - a 4K map to 0.06 px - with no alpha, so no confidence; smaller and faster to read. The map covers the plate's bounding box, which for a plain plate is the whole format.

Default: PNG (16-bit, no alpha)Options: EXR (float, confidence in alpha) PNG (16-bit, no alpha) PNG (16-bit, confidence in alpha)

Use Occlusion MaskCheckboxvecUseOcclusion

Chained STMap bake only. Connect an animated foreground mask to Occlusion: white alpha = obstruction, black = visible. Reject motion on the obstruction in both frames and estimate the hidden movement from nearby visible motion. Not a reconstruction of a fully hidden or turning surface. No connection keeps the original bake. Live and exported smart vectors are unchanged.

Default: on

Occlusion Edge Margin (px)SlidervecOcclusionExpand

Expand the exclusion mask in plate pixels to avoid blurred foreground edges. Use PNG with confidence alpha or EXR to hide the insert behind the mask. Rebake after changing the mask.

Default: 8

Bake MapsButtonvecBake

Compute the vectors for every frame of the Range, write them as an EXR sequence with forward and backward layers (and the longer jumps Max Frame Distance asks for), and put a Read node on the clipboard -- Ctrl+V in the Node Graph. Feed that Read to Kronos, VectorBlur, MotionBlur or a VectorDistort the way you would a SmartVector render.

Clear Vector CacheButtonvecClearCache

Delete this node's cached vector EXRs, in memory and on disk. Do this after changing the footage upstream -- the cache is keyed on frame number and cannot tell that the picture changed.

Vector Track21 controls

Where you work: load the flow model, set the range and cache, and bake smart vectors and ST maps.

StatusStatusanrVec_vecStatus

What the flow model is doing and what the last bake wrote, including where the files went and how to use them.

OutputMenuanrVec_trackOutput

Plate shows the picture with the markers on it, which is what you want while tracking. Track Data outputs the solved points as a small data image instead - connect THAT to an ANR Point Matcher's Tracks input and it drives the warp directly, with no file and nothing to type. The picture is not usable in Track Data mode; it is data, not a look.

Default: PlateOptions: Plate Track Data Motion Vectors (r g b a = forward u v, backward u v)

Load Flow ModelButtonanrVec_vecLoadModel

Load the selected flow model into memory. Separate from the tracking model -- the two run in their own helper processes and can be loaded independently.

Unload Flow ModelButtonanrVec_vecUnloadModel

Release the model and its VRAM. Useful before rendering something else heavy on the same GPU.

Vector DetailMenuanrVec_vecDetail

The resolution the flow is computed at, then scaled to the plate. The flow model was trained at 1080p and works there in about 2 GB; Auto sends the plate as it is up to that size and reduces anything larger to it.

Measured on a 4K shot: the warp error is the same from 1536 px up (2.53 at 2048, 2.49 at 3840, against 7.28 unwarped), while true 4K needs 20 GB and three minutes a frame. So Auto is the right choice for nearly everything; Fine goes to 2560 on the long edge for very small detail, at about four times the time. Half and Quarter are for a quick look. MegaFlow caps every setting at 518 px; DOT caps at 512 px.

Default: Auto (up to 1080p)Options: Auto (up to 1080p) Fine (up to 2560 px) Half Quarter

Refinement IterationsSlideranrVec_vecIters

How many times the model refines its answer. 8 is what it was trained with; fewer is faster and softer, more rarely helps.

Default: 8

RangeMenuanrVec_trackRangeMode

Which frames to track. Input uses the range of the footage into this node, Global uses the project range, and Custom uses the two frame fields below.

Default: InputOptions: Input Global Custom

Viewer In/OutButtonanrRangeFromViewer

Set Range to Custom and copy the viewer's in and out points into Custom First / Custom Last. An OFX node cannot read the viewer's in/out itself, so this does it from the Nuke side.

Custom FirstNumberanrVecFirst

First and last frame to analyse, used when Range is set to Custom.

Default: 0

Custom LastNumberanrVecLast

First and last frame to analyse, used when Range is set to Custom.

Default: 0

Max Frame DistanceMenuanrVec_vecMaxDistance

For Bake. Besides the vectors to the next and previous frame, also bake vectors that jump 2, 4, 8... frames at once, up to this many, as separate layers. A warp across many frames can then be built from a few long jumps instead of dozens of short ones added together, which is what the Smart Vector toolset does with its own frame distance. Each extra distance costs one more flow per frame.

Default: 1 frameOptions: 1 frame 2 frames 4 frames 8 frames 16 frames 32 frames 64 frames

Generate AutofillButtonanrVec_anrCacheAutoFill

Create a new node-type/footage_letter_4digits folder on every click, then stop. Previous caches are kept. Enter a folder to choose a custom base.

Vector CacheFileanrVec_vecCacheDir

Folder for vector and STMap caches. Bake creates it and writes the files. Live viewing uses memory and does not create a disk cache.

Default: empty

STMap Reference FrameNumberanrVecRef

The frame every STMap points back to: the plate held on this frame is what the STMap node warps. 0 means the same as the tracker's Reference Frame on the first tab. Put it in the middle of the stretch you need - the map is chained outward from it, so the drift at the ends is what the distance from here makes it. The button beside it sets it to the frame under the playhead.

Default: 0

Set to Current FrameButtonanrVecRefHere

Set STMap Reference Frame to the frame under the playhead.

BakeMenuanrVec_vecBakeWhat

What Bake writes. Smart vectors are the forward/backward and smartvector layers for Kronos, VectorBlur and VectorDistort; the STMap is the per-frame map back to the Reference Frame for an STMap node. STMap only is the quick route: the same flow is computed, only the map is written.

Default: STMap onlyOptions: Smart Vectors + STMap STMap only Smart Vectors only

STMap FormatMenuanrVec_vecStmapFormat

EXR keeps the map in float with confidence alpha. PNG can also include confidence alpha with the third option. UV coordinates are always unpremultiplied. PNG is 16-bit - a 4K map to 0.06 px - with no alpha, so no confidence; smaller and faster to read. The map covers the plate's bounding box, which for a plain plate is the whole format.

Default: PNG (16-bit, no alpha)Options: EXR (float, confidence in alpha) PNG (16-bit, no alpha) PNG (16-bit, confidence in alpha)

Use Occlusion MaskCheckboxanrVec_vecUseOcclusion

Chained STMap bake only. Connect an animated foreground mask to Occlusion: white alpha = obstruction, black = visible. Reject motion on the obstruction in both frames and estimate the hidden movement from nearby visible motion. Not a reconstruction of a fully hidden or turning surface. No connection keeps the original bake. Live and exported smart vectors are unchanged.

Default: on

Occlusion Edge Margin (px)SlideranrVec_vecOcclusionExpand

Expand the exclusion mask in plate pixels to avoid blurred foreground edges. Use PNG with confidence alpha or EXR to hide the insert behind the mask. Rebake after changing the mask.

Default: 8

Bake MapsButtonanrVec_vecBake

Compute the vectors for every frame of the Range, write them as an EXR sequence with forward and backward layers (and the longer jumps Max Frame Distance asks for), and put a Read node on the clipboard -- Ctrl+V in the Node Graph. Feed that Read to Kronos, VectorBlur, MotionBlur or a VectorDistort the way you would a SmartVector render.

Clear Vector CacheButtonanrVec_vecClearCache

Delete this node's cached vector EXRs, in memory and on disk. Do this after changing the footage upstream -- the cache is keyed on frame number and cannot tell that the picture changed.

Tips

  • Put the STMap Reference Frame in the middle of the stretch you need: the map is chained outward from it, so drift grows with the distance from it.
  • Choose EXR or PNG (16-bit, confidence in alpha) when you want the map's confidence in alpha, to hide the insert where the map is unsure or behind the Occlusion matte.
  • Bake: STMap only is the quick route for paint fixes; Smart Vectors + STMap writes both from the same flow.
  • Max Frame Distance bakes longer jumps (2, 4, 8 frames...) as extra layers, so a warp across many frames can use a few long jumps.
  • Vector Detail: Auto is right for nearly every shot; Fine is for very small detail at about four times the time, Half and Quarter for a quick look.
  • Unload Flow Model frees the GPU memory before other heavy work.

Good to know

  • Made for an NVIDIA graphics card: at the Auto detail the flow model works in about 2 GB of its memory.
  • If the Tracker models were not installed with ANR Tools, Nuke offers to download them when you create the node. After the download, try again; restart Nuke if it asks you to.
  • Live vectors are kept in memory only. Bake writes to the Vector Cache folder.
  • Press Clear Vector Cache after you change the footage upstream: cached frames are found by frame number and cannot tell that the picture changed.
  • The occlusion option estimates hidden motion from the visible motion around it; it does not reconstruct a surface that is fully hidden or turns away. Rebake after changing the matte.

Something unclear or missing? Write to [email protected].