ANR Patch Tool
Covers a blemish, mark or small object with clean texture from elsewhere in the frame, matched to the light round it and tracked through the shot.
- Comp
- Comp & Depth pack
- 4 inputs
- 88 controls
Overview
ANR Patch Tool covers an area of the plate with a clean sample from another part of the frame. You draw the area to fix, the Source, in the Viewer. A copy of that shape, the Destination, marks where the clean texture comes from: move, turn and scale it onto clean ground. The patch takes on the colour and light round the Source, so it sits in without a seam.
Patch Mode sets how the light is matched. Seamless Patch (Photoshop Lighting Match) matches the colour and lighting at the edge of the Source; Luminance Seamless (Keep Sample Hue) matches the brightness and keeps the sample's own colour; Direct Clone (No Lighting Match) copies the sample as it is. Grain Matched (Plate Grain) takes the sample's own grain out, matches the light, then puts real grain from the plate round the patch back in, so the patch's grain changes every frame like the plate's instead of freezing or doubling.
The patch is tracked with the ANR AI Planar Tracker's Algorithm, on the CPU: the buttons in the Planar Tracker (CPU) section track the Source through the shot, and the sample moves with it. You can also connect a Tracker, CornerPin, Transform or ANR AI Planar Tracker to the Track input and follow its motion instead. A matte on the Occlusion input keeps whatever passes in front out of the track and out of the patch's colour.
By default the sample is read on every frame. Frame Offset reads it a few frames earlier or later, for a clean area that is covered now but clear nearby. Hold Sample From One Frame takes it from a single frame and carries it along the track while the light match stays live, and Motion Blur gives that held sample the plate's motion blur. The Grade tab grades the patch on its own.
Inputs
- Sourcerequired
The plate to fix. The patch is drawn, tracked and placed on it, and its clean texture is taken from it.
- Maskoptional
Limits where the patch is applied (its alpha): the patch shows only inside it, or only outside it with Invert Holdout Mask.
- Occlusionoptional
A matte of whatever passes in front of the patched surface, such as a hand or a person. Where its alpha is above half, the tracker ignores the pixels (while Use Occlusion Input is on) and the patch takes no colour from them: the nearest clear pixels stand in. It does not keep the occluder in front of the patch.
- Trackoptional
A Tracker, CornerPin, Transform or ANR AI Planar Tracker whose motion the patch follows instead of its own track. Only its tracking data is read, not its picture: once when you connect it, and again each time you press Read Track Input.
Output. The plate with the patch on it (Patched Plate). Output can also give the patch alone as premultiplied RGBA with its alpha, or a Sample Preview: the moved sample inside the Source shape with no light match, for lining it up.
Quick start
- Add ANR Patch Tool after the plate and connect it to Source. Go to a frame where the area to fix is easy to see.
- Click points round the area in the Viewer. Click the first point again, press Enter, or press Close Mask to close the shape.
- Click DESTINATION (SAMPLE) at the top left of the Viewer and drag the sample shape onto clean texture. Drag its ring to scale it and the end of its ROTATE arm to turn it, or use Translate, Rotate and Scale in the Destination section.
- Choose a Patch Mode: Seamless Patch (Photoshop Lighting Match) for most fixes, Grain Matched (Plate Grain) on a grainy plate.
- Set Output to Sample Preview (No Seam Blend) to check what the sample brings in, then back to Patched Plate.
- Press Track Fwd >| to track the patch to the end of the Range; the Viewer follows the track. Go back to the frame you drew on and press |< Track Back. Stop keeps the frames tracked so far.
- If the edge of the patch shows, raise Soft Edges.
- Scrub the shot. Where the clean area is covered on some frames, try Frame Offset or Hold Sample From One Frame.
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.
How the patch is tracked: the Track input, the track buttons, and the tracker's settings.
A grade of the patch alone, after the light match: gain, lift, gamma, saturation, contrast and its own mix.
No control matches.
All controls
ANR Patch Tool60 controls
- StatusStatus
ptSourceStatus Live status of the Source mask and CPU Planar Tracker.
- New / Clear MaskButton
ptClearMask Clears the current Source mask so you can draw a fresh shape in the Viewer.
- Close MaskButton
ptCloseMask Closes an open Source mask (or click the first point / press Enter in the Viewer).
- Smooth CurveCheckbox
ptSmoothShape When on, draws a smooth cubic Bezier curve through the mask points; when off, uses crisp straight edges.
- Source TranslatePosition
ptSrcTranslate Moves the Source mask — and automatically moves the Destination sample mask by the exact same offset!
- Soft EdgesSlider
ptShapeBlur Softens the patch's edge, in pixels, after the patch is made and inward only: the patch fades in from 0 on the drawn line, so nothing outside the shape is touched. The drawn shape decides the patch and where its lighting is matched. A shape too small for the softness gets a smaller one.
- Mask Expansion (px)Slider
ptExpand Expands (+) or contracts (-) the Source & Destination mask boundary in pixels.
- Patch ModeMenu
ptPatchMode Seamless Patch: solves a multi-grid harmonic membrane so sampled texture seamlessly matches the surrounding Source color & lighting gradient (like Photoshop's Patch Tool).
Luminance Seamless: matches brightness/shading while keeping Destination's chroma.
Direct Clone: feathered copy of Destination pixels with no lighting adjustment.
Grain Matched: like Seamless Patch, but the sample's own grain is taken out, the lighting is matched on the grain-free picture, and real grain from the plate round the patch is put back in -- it changes every frame like the plate's, so the patch does not flicker or show a frozen or doubled grain.- GainColourSome modes
ptGradeGain Multiplies the patch (the white point), per channel.
- LiftColourSome modes
ptGradeLift Raises or lowers the patch's blacks, per channel.
- GammaColourSome modes
ptGradeGamma Bends the patch's midtones, per channel (above 1 = brighter).
- SaturationSliderSome modes
ptGradeSaturation The patch's colour strength: 0 = grey, 1 = as it is.
- ContrastSliderSome modes
ptGradeContrast The patch's contrast about mid-grey (0.18): 1 = as it is.
- Grade MixSliderSome modes
ptGradeMix How much of the grade is used: 0 = none, 1 = all of it.
- Match Darks and BrightsCheckbox
ptToneMatch Before the lighting match, fits the patch's tones to the plate's round the patch -- darks to darks, brights to brights -- so something dark crossing the patch (a pole, a frame, a shadow) stays as dark as the plate's and is not lifted by the light measured on the brighter parts. Seamless, Luminance and Grain Matched modes.
- Grain AmountSlider
ptGrainAmount Grain Matched only: how much of the plate's grain goes into the patch. 1 = the plate's own level.
- Lighting AdaptationSlider
ptAdaptStrength 0.0 = Direct Clone, 1.0 = Full Photoshop-style seamless boundary lighting & color match.
- Structure PreserveSlider
ptStructure 1.0 = 100% clean Destination texture replaces the blemish; lower values blend subtle original detail.
- OutputMenu
ptOutput Patched Plate: full plate with seamless patch applied.
Patch Only: premultiplied RGBA patch with alpha for custom Merge workflows.
Sample Preview: shows raw warped Destination pixels inside the Source mask for alignment.- Invert Holdout MaskCheckbox
ptInvertMask Inverts the optional side Mask input.
- MixSlider
ptMix Overall blend of the healed patch over the original plate.
Planar Tracker (CPU)
- Reference FrameSlider
ptRefFrame Reference frame where the Source mask was drawn.
- Set To Current FrameButton
ptSetRef Sets Reference Frame to the current timeline frame (rebasing any existing track cleanly).
- |< Track BackButton
ptTrackBwd Tracks the Source backward over the Range on the Tracking Settings tab, with the ANR AI Planar Tracker's Algorithm (CPU).
- < Step BackButton
ptStepBwd Tracks the Source one frame backward.
- StopButton
ptStopTrack Stops the track. The frames tracked so far are kept.
- Step Fwd >Button
ptStepFwd Tracks the Source one frame forward.
- Track Fwd >|Button
ptTrackFwd Tracks the Source forward over the Range on the Tracking Settings tab, with the ANR AI Planar Tracker's Algorithm (CPU).
- Clear All TrackButton
ptClearTrack Clears all tracked planar keyframes.
- Clear BackwardButton
ptClearTrackBwd Clears tracked keyframes before the current frame.
- Clear ForwardButton
ptClearTrackFwd Clears tracked keyframes after the current frame.
Destination
- StatusStatus
ptDestStatus Live status of the mirrored Destination sample region.
- TranslatePosition
ptDstTranslate Offset (X, Y) of the clean plate area to sample from, relative to Source.
Moving Destination NEVER moves Source; moving or tracking Source automatically moves Destination with it!- RotateSlider
ptDstRotate Rotates the sampled Destination patch in degrees around its center so cloned texture never looks repetitive.
- ScaleSlider
ptDstScale Uniformly scales the sampled Destination area around its center.
- Scale X / YPosition
ptDstAspect Independent X / Y scale multiplier for the sampled Destination area.
- Flip HorizontalCheckbox
ptDstFlipX Mirrors the sampled pixels horizontally across the Destination center.
- Flip VerticalCheckbox
ptDstFlipY Mirrors the sampled pixels vertically across the Destination center.
- Sample FilterMenu
ptFilter Pixel interpolation filter used when sampling rotated/sub-pixel Destination regions.
- Frame OffsetSlider
ptFrameOffset Takes the patch's picture from this many frames later (+) or earlier (-) than the frame shown, carried along the track; the plate and its lighting match stay on the frame shown. Use it when the clean area is covered now but clear a few frames away. 0 = the same frame. Near the start or end of the clip the nearest frame is used. Hold Sample From One Frame, when ticked, decides instead.
- Hold Sample From One FrameCheckbox
ptHoldSample Takes the patch's picture from one frame (the Sample Frame) instead of from every frame, and carries it along the track; the lighting match stays live, frame by frame. For a sample area that moves its own way (parallax, something passing). Ticking it takes the frame you are on.
- Sample FrameSlider
ptSampleFrame The frame the held sample is taken from.
- Set Sample Frame to Current FrameButton
ptSetSampleFrame Takes the held sample from the frame you are on.
- Motion BlurCheckbox
ptMotionBlur Hold Sample only: smears the held picture along the track's own motion during the shutter, so the patch gets the same motion blur as the moving plate round it (a held frame is otherwise sharp, or blurred the way its own frame moved).
- ShutterSlider
ptMBShutter How long the shutter stays open, in frames, centred on the frame: 0.5 = a 180-degree shutter. Match the plate's blur.
- Blur SamplesSlider
ptMBSamples How many positions along the motion are averaged: more is smoother and slower.
- Reset Destination TransformButton
ptResetDst Resets Destination Translate, Rotate, Scale, and Flip back to defaults without affecting Source.
- MotionMenuSome modes
ptMotionModel Surface degrees of freedom. Perspective solves full 8-DOF homography; Translation / Rotation / Scale / Shear (and Affine) solves 6-DOF planar shear without perspective tilt.
- Search AreaMenuSome modes
ptSearchMode Crop Box limits feature search and image alignment to a box around the last accepted Source position. It follows successful tracks; after loss it stays at the last accepted position. Use Whole Frame or a larger box for large jumps.
- Crop Size (%)SliderSome modes
ptCropPct 200% = twice the Source's bounding-box width and height. Minimum 64 analysis pixels per side; clipped to the image. Larger boxes allow more motion but cost more work.
- Adapt to Appearance ChangesCheckboxSome modes
ptAdaptive Adapt to changing appearance. The Algorithm can recover a blink from nearby texture around the Source when the inside stops matching; recovery respects the crop box and the Occlusion input. Turn off for strict matching inside the Source.
- Keep Searching After LossCheckboxSome modes
ptKeepSearching On: a frame below Minimum Agreement is left without a key and the track goes on looking. Off: the track stops there.
- Minimum AgreementSliderSome modes
ptMinAgree Minimum visible surface agreement (0-0.95). Tracking stops when agreement drops below this value (unless Keep Searching After Loss is on).
- Minimum Pixels Used (%)SliderSome modes
ptMinPixels Minimum percentage of the surface that must remain visible inside the frame and unoccluded. As the surface leaves the frame toward this limit, perspective tilt is smoothly conditioned so off-screen corners stay steady.
- Tracking Shape Follows TrackCheckboxSome modes
ptShapeFollows On: the shape moves with the track. Off: the shape stays where it is in the frame, and each frame is tracked from what is inside it, so new ground sliding through it keeps the track going (long moves across a surface). The patch still moves with the surface.
- Update Pattern Each FrameCheckboxSome modes
ptCatchEachFrame Off: every frame is matched to the reference picture. On: the reference is renewed on every tracked frame (frame to frame), for a surface whose look changes over the shot. Frame to frame drifts slowly over long shots: leave it off when the look holds.
- Use Occlusion InputCheckboxSome modes
ptUseOcclusion The tracker ignores what the matte on the Occlusion input covers (a hand or a person passing in front).
- RangeMenuSome modes
ptRangeMode Frames Track Back and Track Fwd cover: the input's frame range (the project's for a still), or First / Last.
- FirstSliderSome modes
ptRangeFirst First frame of a Custom Range.
- LastSliderSome modes
ptRangeLast Last frame of a Custom Range.
Tracking Settings22 controls
How the patch is tracked: the Track input, the track buttons, and the tracker's settings.
- Read Track InputButton
ptTrk_inRead Reads the motion of the node on the Track input (a Tracker, CornerPin, Transform or ANR AI Planar Tracker) into the Patch Tool's track, frame by frame, relative to the Reference Frame. It replaces the track. Press it again after changing the tracker.
- |< Track BackButton
ptTrk_ptTrackBwd Tracks the Source backward over the Range on the Tracking Settings tab, with the ANR AI Planar Tracker's Algorithm (CPU).
- < Step BackButton
ptTrk_ptStepBwd Tracks the Source one frame backward.
- StopButton
ptTrk_ptStopTrack Stops the track. The frames tracked so far are kept.
- Step Fwd >Button
ptTrk_ptStepFwd Tracks the Source one frame forward.
- Track Fwd >|Button
ptTrk_ptTrackFwd Tracks the Source forward over the Range on the Tracking Settings tab, with the ANR AI Planar Tracker's Algorithm (CPU).
- Clear All TrackButton
ptTrk_ptClearTrack Clears all tracked planar keyframes.
- Clear BackwardButton
ptTrk_ptClearTrackBwd Clears tracked keyframes before the current frame.
- Clear ForwardButton
ptTrk_ptClearTrackFwd Clears tracked keyframes after the current frame.
- MotionMenu
ptTrk_ptMotionModel Surface degrees of freedom. Perspective solves full 8-DOF homography; Translation / Rotation / Scale / Shear (and Affine) solves 6-DOF planar shear without perspective tilt.
- Search AreaMenu
ptTrk_ptSearchMode Crop Box limits feature search and image alignment to a box around the last accepted Source position. It follows successful tracks; after loss it stays at the last accepted position. Use Whole Frame or a larger box for large jumps.
- Crop Size (%)Slider
ptTrk_ptCropPct 200% = twice the Source's bounding-box width and height. Minimum 64 analysis pixels per side; clipped to the image. Larger boxes allow more motion but cost more work.
- Adapt to Appearance ChangesCheckbox
ptTrk_ptAdaptive Adapt to changing appearance. The Algorithm can recover a blink from nearby texture around the Source when the inside stops matching; recovery respects the crop box and the Occlusion input. Turn off for strict matching inside the Source.
- Keep Searching After LossCheckbox
ptTrk_ptKeepSearching On: a frame below Minimum Agreement is left without a key and the track goes on looking. Off: the track stops there.
- Minimum AgreementSlider
ptTrk_ptMinAgree Minimum visible surface agreement (0-0.95). Tracking stops when agreement drops below this value (unless Keep Searching After Loss is on).
- Minimum Pixels Used (%)Slider
ptTrk_ptMinPixels Minimum percentage of the surface that must remain visible inside the frame and unoccluded. As the surface leaves the frame toward this limit, perspective tilt is smoothly conditioned so off-screen corners stay steady.
- Tracking Shape Follows TrackCheckbox
ptTrk_ptShapeFollows On: the shape moves with the track. Off: the shape stays where it is in the frame, and each frame is tracked from what is inside it, so new ground sliding through it keeps the track going (long moves across a surface). The patch still moves with the surface.
- Update Pattern Each FrameCheckbox
ptTrk_ptCatchEachFrame Off: every frame is matched to the reference picture. On: the reference is renewed on every tracked frame (frame to frame), for a surface whose look changes over the shot. Frame to frame drifts slowly over long shots: leave it off when the look holds.
- Use Occlusion InputCheckbox
ptTrk_ptUseOcclusion The tracker ignores what the matte on the Occlusion input covers (a hand or a person passing in front).
- RangeMenu
ptTrk_ptRangeMode Frames Track Back and Track Fwd cover: the input's frame range (the project's for a still), or First / Last.
- FirstNumber
ptTrk_ptRangeFirst First frame of a Custom Range.
- LastNumber
ptTrk_ptRangeLast Last frame of a Custom Range.
Grade6 controls
A grade of the patch alone, after the light match: gain, lift, gamma, saturation, contrast and its own mix.
- GainColour
ptGrd_ptGradeGain Multiplies the patch (the white point), per channel.
- LiftColour
ptGrd_ptGradeLift Raises or lowers the patch's blacks, per channel.
- GammaColour
ptGrd_ptGradeGamma Bends the patch's midtones, per channel (above 1 = brighter).
- SaturationSlider
ptGrd_ptGradeSaturation The patch's colour strength: 0 = grey, 1 = as it is.
- ContrastSlider
ptGrd_ptGradeContrast The patch's contrast about mid-grey (0.18): 1 = as it is.
- Grade MixSlider
ptGrd_ptGradeMix How much of the grade is used: 0 = none, 1 = all of it.
Tips
- In the Viewer, drag a point of the Source shape to reshape it. Ctrl+click or Alt+click its outline to add a point; Ctrl+Shift+click a point, or select it and press Delete, to remove it. Drag inside the shape to move it: the sample moves with it.
- Click SOURCE (MASK) at the top left of the Viewer to edit the shape again. Changing a Destination control switches the Viewer to the sample by itself, and a Source control switches it back.
- Source Translate moves the patch and its sample together; Translate, Rotate, Scale and the flips in Destination move only the sample. Reset Destination Transform puts the sample back on the Source.
- Match Darks and Brights keeps something dark that crosses the patch (a pole, a frame, a shadow) as dark as it is in the plate, instead of lifting it with the light of the brighter parts. It works with every Patch Mode but Direct Clone (No Lighting Match).
- Lighting Adaptation blends from a plain copy (0) to the full light match (1). Structure Preserve below 1 lets some of the original detail show through the patch.
- Grain Amount sets how much of the plate's grain Grain Matched (Plate Grain) puts into the patch: 1 is the plate's own level.
- Use Hold Sample From One Frame when the sample area moves its own way, with parallax or something passing through it; ticking it takes the frame you are on as the Sample Frame. Motion Blur, Shutter and Blur Samples work only with it, and are greyed out until it is ticked. Shutter 0.5 is a 180-degree shutter.
- To keep something that passes in front of the patch in front of it, connect its matte to Mask and tick Invert Holdout Mask: the plate shows where the matte is. Connect the same matte to Occlusion for the track.
- Output > Patch Only (Premultiplied RGBA) gives the patch alone with its alpha, to merge or grade it yourself.
- Already have a track? Connect it to Track. After you change that tracker, press Read Track Input on the Tracking Settings tab to read it again.
Good to know
- Tracking runs on the CPU with the ANR AI Planar Tracker's Algorithm: it needs no graphics card and no model download. The Tracking Settings tab holds that Algorithm's settings, with the same names, and the track buttons again.
- A new node starts with Soft Edges at 0, Match Darks and Brights on, Motion on Translation / Rotation / Scale / Shear, Minimum Agreement at 0 and Minimum Pixels Used (%) at 50.
- Soft Edges work inward only: the patch fades in from the drawn line, and nothing outside the shape is touched. A shape too small for the softness gets a smaller one.
- The Occlusion input keeps the occluder out of the track and out of the patch's colour, but the patch still covers it. To keep it in front, hold it out with the Mask input.
- New / Clear Mask also clears the track and Source Translate, and makes the frame you are on the Reference Frame.
- With no frame tracked yet, a track starts from the frame you are on and makes it the Reference Frame. Set To Current Frame moves the Reference Frame to the frame you are on and keeps the track.
- Read Track Input replaces the patch's track over the project's frame range, relative to the Reference Frame; a Tracker needs its tracks switched on at the Reference Frame. From a Tracker, 1 track gives a move, 2 a move, turn and scale, 3 an affine move, and 4 or more a perspective move.
Video tutorials
Something unclear or missing? Write to [email protected].