Inpaint
Removes objects by rebuilding the masked area out of texture and structure found elsewhere in the same image.
Paint over a power line, a tourist, a watermark, a dust speck, or a scratch, and Inpaint fills the hole with material that continues the surrounding brickwork, foliage, sky, or fabric. It searches the rest of the picture for patches that match the edges of the hole, assembles the best-fitting arrangement of them, and blends the result into place so the seam does not show.
Inpaint rearranges pixels that are already in your image. It runs locally and deterministically on your machine, and never sends the image anywhere.
What it cannot do
Section titled “What it cannot do”Inpaint has no model of the world, so it cannot invent something that was never visible:
- A face or a hand. Anything with anatomy the eye knows by heart comes back subtly wrong.
- Readable text or a logo. Letterforms are copied as shapes, not as letters, so the result reads as text-like scribble.
- An object that appears only once. If the thing you masked was the only one of its kind, there is nothing to copy it from.
Inputs
Section titled “Inputs”- image is the picture you are repairing.
- mask marks the area to fill: white is filled, black is kept.
The mask must be the same size as the image; if it is not, the node says so and asks you to put a Resize node in between. Any mask source works, including Mask Paint, Roto, Mask From Image, Color Range, Magic Wand, or a mask cleaned up with Mask Refine.
Wiring a color image straight into the mask input reveals the Mask From dropdown, which chooses whether the image’s brightness, its transparency, or one of its channels is read as the mask.
An empty mask is not an error: with nothing marked, the image passes through unchanged.
Source Locality
Section titled “Source Locality”There is one control, and most of the time you can leave it alone. Source Locality sets how far across the image Inpaint looks for texture. Toward Nearby it prefers texture close to the mask; toward Global it widens the search over the whole picture. The default sits in the middle and is tuned to give the best balanced result with no adjustment, so treat it as a starting point rather than something to tune every time.
Reach for it in two situations:
- Something from a distant part of the image is being pulled into the fill and looks out of place. Move toward Nearby.
- The texture you want is a long way from the area you are removing, and the fill settles for something bland close by. Move toward Global.
Moving the slider never changes which pixels are masked, and the fill never spills outside the mask.
Parameters
Section titled “Parameters”Pins
Fill
How far across the image Inpaint looks for texture to fill the masked area with.
- Nearby prefers texture close to the mask.
- Global widens the search across the whole image.
Start at the default. Move toward Nearby when something from a distant part of the image is being pulled into the fill. Move toward Global when the texture you want is farther from the area you are removing.
Mask
How the connected color image is read as a mask
Usage Tips
Section titled “Usage Tips”- Mask a little wider than the object. Include its shadow, its soft edge, and any halo. A leftover rim gives the fill something wrong to match against, and it will faithfully continue the wrong thing.
- Give it something to copy. A mask surrounded by plenty of the same material fills convincingly; a mask that touches the edge of the frame, or covers nearly everything, leaves nothing to sample.
- Repeating structure and organic texture are the easy cases. Brick, tile, fencing, and window grids rebuild cleanly, and so do grass, sand, foliage, cloud, and stone.
- Continuing an edge is harder than filling a field. A mask straddling a horizon or a roofline has to carry that line across the gap, so give the contour a good run of clean image on both sides.
- Split a large removal into passes. Chaining a second Inpaint after the first usually beats one big fill.
- Combine with Mask Paint to select the area interactively.
Scratches, dust, and dead pixels
Section titled “Scratches, dust, and dead pixels”One-pixel scratches, wire-thin lines, and isolated dead pixels are handled by a repair path built for exactly that case, and it engages on its own when the mask is that shape. There is nothing to switch on and nothing to configure.
32-bit documents
Section titled “32-bit documents”In a 32-bit document Inpaint works on the float pixels directly rather than through an 8-bit conversion, so overbright values, negative values, and the document’s color space survive the fill. Transparent regions do not leak color into the fill.
Batches
Section titled “Batches”Inpaint runs per frame, so a batch (from Collect or Image Folder) fills every frame with the same settings. The mask input is per frame too, so a batch of images and a matching batch of masks line up frame for frame.
When it stops
Section titled “When it stops”Inpaint turns the node red and says so plainly rather than publishing a half-finished image when:
- There is not enough texture to sample from. The mask covers everything, or leaves no usable material around it.
- It runs out of working memory. A single fill has a fixed budget. Work at a smaller image size, or fill a smaller area at a time.
- The image and mask do not go together. The mask is a different size from the image, or is not a single-channel image.
Results from earlier versions
Section titled “Results from earlier versions”Inpaint fills differently than it did in ArcBrush 1.5 and earlier. The fill is recalculated every time a document is opened rather than stored in the project file, so an older project containing an Inpaint node shows the new fill when you reopen it. Nothing on disk is rewritten until you save, and your mask, graph, and other nodes are untouched. If you exported an image from an older fill and want exactly that picture, keep the exported file.