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
  • 47 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)
Re-acquireOff
Max Jump1
Re-acquire Certainty0.5
Use Occlusion Mask
Occlusion Edge Margin (px)8
Bake MapsClear Vector Cache

All controls

ANR AI Vector Tracker22 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)

Re-acquireMenuvecRecoverReacquire

Parts of the surface that were hidden (a fold, something passing in front) and come back: their chain from the reference is broken, so they are matched straight to the STMap Reference Frame with the reference matcher (the Tracker models' Full Range matcher, on the graphics card) and joined to the tracked parts around them with no seam; the next frames chain on from there.
Off: chaining only (Max Jump still applies; default).
Reappearing parts: the matcher runs on the frames where such parts appear.
Every frame: the matcher runs on every frame and also replaces a long chain where it is more certain (less drift, slower).
Parts the reference frame never saw cannot be re-acquired: they are filled from around them, alpha 0, and B = 1 in an EXR STMap. Not used with an Occlusion Mask (that bake is chained).

Default: OffOptions: Off Reappearing parts Every frame

Max JumpMenuvecRecoverMaxJump

Each pixel is chained not only from the previous frame but from several earlier ones (t-1, t-2, t-4, t-8, t-16, up to this), never past the reference; the most certain chain that passes the forward-backward check wins. A part hidden for fewer frames than this is carried across the hiding without the matcher. 1 = the previous frame only (default, fastest: with Re-acquire Off the bake is the plain one-frame chain). Larger costs more flow per frame (8 = about 4x).

Default: 1Options: 1 2 4 8 16

Re-acquire CertaintySlidervecRecoverCertainty

How sure the reference matcher must be before a part is re-acquired (its own certainty, 0-1; it is also checked both ways). Lower re-acquires more, with more risk of a wrong place.

Default: 0.5

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 Track25 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. The heavier model caps every setting at 518 px; the whole-range model 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)

Re-acquireMenuanrVec_vecRecoverReacquire

Parts of the surface that were hidden (a fold, something passing in front) and come back: their chain from the reference is broken, so they are matched straight to the STMap Reference Frame with the reference matcher (the Tracker models' Full Range matcher, on the graphics card) and joined to the tracked parts around them with no seam; the next frames chain on from there.
Off: chaining only (Max Jump still applies; default).
Reappearing parts: the matcher runs on the frames where such parts appear.
Every frame: the matcher runs on every frame and also replaces a long chain where it is more certain (less drift, slower).
Parts the reference frame never saw cannot be re-acquired: they are filled from around them, alpha 0, and B = 1 in an EXR STMap. Not used with an Occlusion Mask (that bake is chained).

Default: OffOptions: Off Reappearing parts Every frame

Max JumpMenuanrVec_vecRecoverMaxJump

Each pixel is chained not only from the previous frame but from several earlier ones (t-1, t-2, t-4, t-8, t-16, up to this), never past the reference; the most certain chain that passes the forward-backward check wins. A part hidden for fewer frames than this is carried across the hiding without the matcher. 1 = the previous frame only (default, fastest: with Re-acquire Off the bake is the plain one-frame chain). Larger costs more flow per frame (8 = about 4x).

Default: 1Options: 1 2 4 8 16

Re-acquire CertaintySlideranrVec_vecRecoverCertainty

How sure the reference matcher must be before a part is re-acquired (its own certainty, 0-1; it is also checked both ways). Lower re-acquires more, with more risk of a wrong place.

Default: 0.5

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.

Import Baked MapButtonanrVecImportMap

Make a Read of the last baked ST map beside this node (file pattern, frame range, raw, PNG or EXR as baked), selected. Says so on the status line when nothing is baked yet.

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