ANR Tools

ANR Depth Matte

Mattes from distance: key everything at a picked depth, split the shot into near-to-far zones, outline depth edges, hold out, insert an element at a depth, or sweep a reveal through the scene.

  • Utility
  • Comp & Depth pack
  • 4 inputs
  • 43 controls

Overview

Depth Matte makes mattes from how far things are, using the distance pass of ANR Depth Prep. A Depth Key keeps everything at the distance you pick in the viewer, with a range and a soft fall-off in front and behind. Zones splits the shot into four bands from near to far in red, green, blue and alpha. Silhouette outlines where the distance jumps, for light wrap and edge work.

Hold-Out gives everything in front of a distance, and Insert Element places a second picture at a distance, behind whatever in the plate is nearer: a soft-edged depth merge. Sweep animates a reveal, a moving band, a scan line or a noisy dissolve travelling through the depth of the shot.

The node reads the Depth Prep's Near and Far distances through the wire, and its Status says which Depth Prep it reads.

Inputs

SourceDepthElementElementDepthDepth MatteOutput
  1. Sourceoptional

    The plate. The matte is put into its alpha, multiplied with it or tinted over it, as Output says.

  2. Depthrequired

    An ANR Depth Prep with Output on Depth. Any other image is read as distance from its red channel.

  3. Elementoptional

    Insert Element only: the premultiplied picture to place into the plate, already positioned in the frame.

  4. ElementDepthoptional

    Insert Element and Hold-Out: a distance for every pixel of the element (red channel, same units as the Depth Prep). Without it the element stands at Distance.

Output. With Output on Matte in Alpha, the plate with the matte as its alpha. Output can also give the matte in every channel, the plate premultiplied, or a tinted preview. Zones writes its four bands into red, green, blue and alpha, and Insert Element gives the element merged into the plate.

Quick start

  1. Make a distance pass with ANR Depth Prep (Output on Depth).
  2. Add ANR Depth Matte. Connect the plate to Source and the Depth Prep to Depth.
  3. Keep Mode on Depth Key, set Output to Preview, and drag the Pick handle in the viewer onto what you want keyed.
  4. Widen Range In Front and Range Behind until the whole subject is in the key; use Softness In Front and Softness Behind for the fall-off.
  5. Set Output to Matte in Alpha (or Matte) and use the result downstream.

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_Depth_Matte1
StatusConnect an ANR Depth Prep (Output = Depth) to the Depth input.
ModeDepth Key
OutputMatte in Alpha
Preview Colour10.250.1000000015
Invert
Distance FromPick Point
Pickx1024y778
Distance5
Range In Front0.5
Range Behind0.5
Softness In Front0.5
Softness Behind1
Hold-Out Softness0.2
Near | Mid3
Mid | Far8
Far | Distance20
Zone Softness %10
Split This Frame
Jump0.08
Edge Softness0.04
SideNear Side
Grow1
Blur1
SweepReveal
DirectionNear to Far
Progress0
Auto Animate
Start Frame1
Duration48
LoopOnce
RangeFrom Depth Prep
Near1
Far50
Even To The Eye
Width0.08
Softness0.02
Screen Angle90
Screen Tilt0
Dissolve Noise0.3
Noise Size12
Scan Colour0.2000000030.89999997621
Scan Glow2
Dim Unscanned0.6

All controls

ANR Depth Matte43 controls
StatusStatusstatus

Where the distances come from.

ModeMenudmMode

Depth Key: everything at the picked distance.
Zones: four bands, near to far, in red, green, blue and alpha.
Silhouette: outlines where distance jumps.
Hold-Out: everything in front of Distance.
Insert Element: the Element input placed at Distance (or its own Element Depth), behind anything in the plate that is nearer.
Sweep: an animated reveal, band, scan line or dissolve travelling through depth.

Default: Depth KeyOptions: Depth Key Zones Silhouette Hold-Out Insert Element Sweep

OutputMenudmOutput

Matte in Alpha: the plate with the matte as its alpha.
Matte: the matte in every channel.
Premultiplied: the plate times the matte.
Preview: the matte tinted over the plate. For Sweep > Scan Line, the scanner look.
Zones and Insert Element ignore this.

Default: Matte in AlphaOptions: Matte in Alpha Matte Premultiplied Preview

Preview ColourColourdmPreviewColour

Tint for Output = Preview.

Default: 1 0.25 0.1000000015

InvertCheckboxdmInvert

Flip the matte.

Default: off

Distance

Distance FromMenudmDistanceFrom

Pick Point: the depth under Pick, read on every frame -- animate or track the point and the key follows. Distance Knob: the number below (dragging Pick also sets it).

Default: Pick PointOptions: Pick Point Distance Knob

PickPositiondmPick

Drag onto what you want keyed (or held out).

Default: 1024 778

DistanceSliderdmDistance

With Distance From = Distance Knob. Depth Key: the centre of the key. Hold-Out / Insert Element: where the element stands. Animatable.

Default: 5

Range In FrontSliderdmRangeFront

How far in front of Distance is fully in the key.

Default: 0.5

Range BehindSliderdmRangeBehind

How far behind Distance is fully in the key.

Default: 0.5

Softness In FrontSliderdmSoftFront

Fall-off in front of the range, in distance units.

Default: 0.5

Softness BehindSliderdmSoftBehind

Fall-off behind the range, in distance units.

Default: 1

Hold-Out SoftnessSliderdmHoldSoft

Hold-Out / Insert Element: how gradually the plate takes over near Distance.

Default: 0.2

Zones

Near | MidSliderdmZone1

Where zone 1 (red) ends.

Default: 3

Mid | FarSliderdmZone2

Where zone 2 (green) ends.

Default: 8

Far | DistanceSliderdmZone3

Where zone 3 (blue) ends; alpha is everything beyond.

Default: 20

Zone Softness %SliderdmZoneSoft

Width of each transition, as a percentage of its distance.

Default: 10

Split This FrameButtondmZoneSet

Set the three boundaries in even steps across this frame's depth (near to far).

Silhouette

JumpSliderdmEdgeThreshold

How big a jump in distance, as a fraction (0.08 = 8%), makes an edge.

Default: 0.08

Edge SoftnessSliderdmEdgeSoft

How gradually a jump turns into an edge.

Default: 0.04

SideMenudmEdgeSide

Near Side: the outline of the object in front (light wrap, edge fixes). Far Side: the background just behind it.

Default: Near SideOptions: Both Near Side Far Side

GrowSliderdmEdgeGrow

Pixels to widen the outline.

Default: 1

BlurSliderdmEdgeBlur

Pixels of blur on the outline.

Default: 1

Sweep

SweepMenudmSweepType

Reveal: fills in as it travels. Band: a moving slice. Scan Line: a thin line (Output = Preview for the scanner look). Dissolve: a noisy reveal.

Default: RevealOptions: Reveal Band Scan Line Dissolve

DirectionMenudmSweepDir

Which way it travels through depth.

Default: Near to FarOptions: Near to Far Far to Near

ProgressSliderdmSweepProgress

Manual sweep position: 0 = start, 1 = finished. Keyframe this knob on your chosen frames. Disable Auto Animate to use it; no timeline offset is applied.

Default: 0

Auto AnimateCheckboxdmSweepAuto

Off (default): use Progress, including its keyframes. On: ignore Progress and travel from Start Frame over Duration frames.

Default: off

Start FrameSliderdmSweepStart

First frame of the sweep.

Default: 1

DurationSliderdmSweepDuration

Frames to go from near to far.

Default: 48

LoopMenudmSweepLoop

After Duration.

Default: OnceOptions: Once Repeat Ping-Pong

RangeMenudmSweepRangeFrom

From Depth Prep: travel between its Near and Far Distance.

Default: From Depth PrepOptions: From Depth Prep Custom

NearSliderdmSweepNear

Custom range: start distance.

Default: 1

FarSliderdmSweepFar

Custom range: end distance.

Default: 50

Even To The EyeCheckboxdmSweepEven

Travel evenly in 1/distance, so it does not rush through the foreground and crawl across the distance.

Default: on

WidthSliderdmSweepWidth

Band / Scan Line: thickness, as a share of the range.

Default: 0.08

SoftnessSliderdmSweepSoft

Edge softness, as a share of the range.

Default: 0.02

Screen AngleSliderdmSweepAngle

Direction across the frame for Screen Tilt (90 = bottom to top).

Default: 90

Screen TiltSliderdmSweepScreen

Mix a direction across the frame into the sweep, so it also travels across the picture.

Default: 0

Dissolve NoiseSliderdmSweepNoise

Dissolve: how ragged the edge is.

Default: 0.3

Noise SizeSliderdmSweepNoiseSize

Dissolve: grain size in pixels.

Default: 12

Scan ColourColourdmScanColour

Scan Line preview: line colour.

Default: 0.200000003 0.8999999762 1

Scan GlowSliderdmScanGlow

Scan Line preview: line brightness.

Default: 2

Dim UnscannedSliderdmScanDim

Scan Line preview: how dark the not-yet-scanned depth is.

Default: 0.6

Tips

  • With Distance From on Pick Point, the depth under Pick is read on every frame: track or animate the Pick point and the key follows the subject. Distance Knob uses a fixed, animatable number instead.
  • In Zones, press Split This Frame to spread the three boundaries evenly across this frame's depth, then adjust them.
  • Silhouette with Side on Near Side outlines the object in front, a good base for light wrap or edge fixes; Far Side gives the background just behind it.
  • For Sweep, key Progress from 0 to 1 over the frames you want, or turn on Auto Animate and set Start Frame and Duration. Scan Line with Output on Preview gives the glowing scanner look.
  • Even To The Eye makes a sweep travel evenly in depth as you see it, instead of rushing through the foreground.
  • Screen Tilt mixes a screen direction into the sweep, so it also travels across the picture.

Good to know

  • The node runs no AI model and needs no graphics card.
  • Distances, ranges and softness are in the Depth Prep's units. Calibrate the Depth Prep if you want to work in metres.
  • The sky and empty background (at the Depth Prep's Max Distance) are never in a Depth Key.
  • Zones and Insert Element ignore Output.
  • If the Status says the Depth Prep's Output is not Depth, set it back to Depth: the other outputs are not distances.

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