Sub topic 1
How Photoshop fills in what you remove
Every removal tool in Photoshop does the same basic job. You mark pixels you don't want, and Photoshop replaces them with pixels it builds from the rest of the image. This chapter explains that process: what the tool looks at, what it produces, and where it breaks down. Knowing this makes later choices about tools, modes, and brush settings much easier.
Prerequisites
This chapter assumes you can already do the following:
- Open an image, zoom, and pan in Photoshop.
- Find and use the Layers panel, including creating a new empty layer.
- Select a tool from the toolbar and change its settings in the Options bar.
You don't need any retouching experience. Later chapters cover the setup and the exact steps for each tool. This chapter is about the model behind them.
The core idea: fill from context
Photoshop can't know what was behind an object you remove. A photo records only the light that reached the sensor, and anything hidden is gone. The software therefore does not recover the original scene. It synthesizes a plausible replacement, which means it builds new pixels that look like they belong.
Both the Spot Healing Brush and the Remove tool follow the same three steps:
- You paint over the unwanted area. Photoshop treats your stroke as a mask of pixels to replace.
- Photoshop analyzes the pixels around that mask. This is the source material, often called the sample area.
- It generates a fill, then blends the edge of the fill into the surroundings so the seam is hard to see.
The quality of the result depends almost entirely on step 2. If the surrounding pixels contain good information about what should be there, the fill looks natural. If they don't, the fill looks wrong, however good the algorithm is.
What the tools look at
The tools read several properties of the pixels near your stroke. Adobe describes the Spot Healing Brush as matching texture, lighting, transparency, and shading, and those four properties are a useful checklist for judging any result.
- Texture is the fine pattern of detail, such as skin pores, grass blades, film grain, or fabric weave.
- Lighting is the brightness of the area and its direction. A fill that is lighter or darker than its neighbors shows up as a patch.
- Color is the hue and saturation of nearby pixels. A removal on a sunset sky has to follow the gradient of orange into blue.
- Structure is the lines and edges that run through the area, such as a horizon, a wall edge, or a hair strand. Content-aware methods try to continue structure across the gap.
Photoshop does not literally measure these as separate numbers you can inspect. The point is that a fill succeeds when all four agree with the surroundings and fails when one doesn't. When you troubleshoot later, ask which of the four is off.
Where the sample comes from
The sample area is the region Photoshop is allowed to borrow from. Its size and location matter more than most beginners expect.
- Close to the mask. Pixels immediately around your stroke carry the strongest information about local tone and color. Most of the fill is anchored here.
- Farther away in the image. Content-aware methods can also look beyond the immediate edge for matching texture, which is how they can rebuild a patch of brick or foliage rather than just smearing the edge color.
- Other layers. By default the tools sample only the active layer. If the layer is empty, there is nothing to sample and nothing to fix. The Sample All Layers option changes this by letting the tool read the visible, composited image. The result is written to the active layer. This option is the basis of the non-destructive workflow covered in the next chapter.
The mask also affects the sample. A stroke that is much larger than the object leaves less of the real surroundings to anchor the fill and gives the algorithm more freedom to invent. A stroke that is too small can leave a ring of the old object's edge or shadow. This is why brush size is a quality control and not only a convenience, and a later chapter covers it.
What counts as "good" source material
Source material is good when it is:
- Similar and nearby. The pixels around the mask belong to the same surface as what you are replacing.
- Uniform or regular. A clear sky, a painted wall, or a repeating texture is easy to continue.
- Free of the thing you are removing. If your mask leaves part of a person's shadow or a wire's glow in the sample, Photoshop may copy it back into the fill.
Source material is poor when the mask sits on a boundary between two different surfaces, or when the object is surrounded by other objects. The tool then has to decide which side to imitate, and it may blend both.
Two families of tools
The Spot Healing Brush and the Remove tool use different approaches to the same job, and they behave differently in practice.
The Spot Healing Brush is the older tool, designed for small, isolated flaws. It blends sampled texture with the color and tone of the destination, a process called healing. You choose its behavior with a Type setting in the Options bar:
- Content-Aware synthesizes a fill from surrounding content and tries to preserve structure.
- Create Texture builds a texture from the pixels inside your stroke and uses it to fill the area. It suits fine, uniform surfaces.
- Proximity Match uses pixels at the edge of the stroke as a patch. It copies from nearby and does little analysis of structure.
The Remove tool is newer and uses a more advanced, learned model to decide what the fill should contain. It is built for larger or more complex distractions, such as a person in the background, a trash can, or a power line. Rather than offering Type modes, it analyzes the whole painted area and generates its fill in one step.
| Feature | Spot Healing Brush | Remove tool |
|---|---|---|
| Best for | Small blemishes, dust spots, sensor specks | Larger or more complex distractions |
| Fill method | Choice of Content-Aware, Create Texture, or Proximity Match | Single learned model, no mode choice |
| Typical stroke | One click or a short dab | Painting over the whole object |
| Sampling control | Sample All Layers | Sample All Layers |
| Effect on edges | Blends well on smooth areas, can smear on edges | Handles structure better, can still repeat texture |
Treat this table as a starting point. The Remove tool is not always better, and a later chapter on choosing a tool gives decision criteria. For now, the key difference is that the Spot Healing Brush lets you steer the method, while the Remove tool decides the method itself and lets you steer only the mask.
Edge blending and why seams appear
After generating the fill, Photoshop blends it into the image. If the blend is good, you can't see where the fill begins. Several things can make the seam visible:
- Mask touching a hard edge. If the stroke runs right up to a strong edge, such as a building outline, the blend has little room to transition.
- Tone gradients. Skies, studio backdrops, and skin often change brightness smoothly. If the fill doesn't follow the gradient, you see a flat patch.
- Different grain or noise. A fill with smoother noise than its surroundings looks like a soft spot when you view the photo at full size.
- Inherited shadows and halos. Objects cast shadows and sometimes leave glow or color fringing. If these fall outside your mask, they stay in the image and may be copied into the fill.
Most of these fixes come from painting a slightly larger area that includes the shadow or halo, or from removing in smaller steps. Later chapters on multi-pass removal and troubleshooting go through them.
Why results can differ between runs
Content-aware fills are not simple copies. Where Photoshop has several plausible ways to fill an area, it picks one, and two attempts with slightly different strokes can give different results. This has practical consequences:
- If the first result looks wrong, undo and paint again with a slightly different stroke instead of accepting it. Different strokes are cheap.
- Small changes in stroke shape or size can move the fill from a good result to a bad one. Treat this as normal behavior and not a bug.
- Because you can't predict the output exactly, work on a separate layer so a bad attempt is easy to discard.
Limits you should plan for
The fill model has limits, and knowing them saves time.
- It can't recover real detail. If you remove a person standing in front of a distinctive sign, the tool can't know what the sign said. It will produce something plausible, which may be wrong. Treat the output as invented content, not as a restoration.
- It struggles with structure it can't see. If a line passes behind the object and continues on the other side, the tool may continue it well. If the structure is complex, such as faces, text, or hands, the result will often be distorted.
- It can repeat texture. When the sample area is small, the algorithm may reuse the same patch several times, which produces visible tiling or repeated shapes.
- It works on pixels, not objects. Photoshop does not "know" it is removing a lamp post. It sees pixels, a mask, and a surrounding region.
- Fill is raster data. The result is made of pixels written to a layer. You can undo it or hide the layer, but you can't edit the fill's parameters afterward.
A practical consequence is that the best preparation happens before you paint. You decide what the tool can see (which layers), where it is allowed to sample (the stroke and its surroundings), and how much of the object's shadow you include.
A mental checklist for any removal
Use these questions each time you prepare a stroke. Later chapters turn each one into concrete technique.
- What is directly around the object? If it is uniform, the removal will be easy. If it is a boundary between surfaces, expect work.
- Does the object leave a shadow, reflection, or halo I should include in the mask?
- Is the stroke large enough to cover the object fully, and small enough to leave real surroundings for the sample?
- Which layer will receive the result, and which layers should the tool be able to see?
- After the fill appears, do texture, lighting, color, and structure all match?
Summary of the model
- Removal tools replace a mask with synthesized pixels based on the area around it. They don't restore what was hidden.
- A good fill matches texture, lighting, color, and structure.
- The sample area, meaning which pixels and which layers the tool reads, controls the result more than any other factor.
- The Spot Healing Brush gives you modes to steer the fill. The Remove tool picks its own method and gives you only the mask.
- Seams, smears, and repeats come from a few predictable causes: edges, gradients, grain mismatch, small sample areas, and leftover shadows.
- Results vary with the stroke, so work on a separate layer and expect to retry.
Exercise
You paint over a small tourist standing on a grassy hillside, and the fill shows a brighter, smoother patch with a faint outline of the person's shadow still visible. Using the model in this chapter, name two likely causes and one change to your next stroke.
Show answer
Likely causes: (1) the mask did not include the person's shadow, so the shadow pixels stayed in the image and may have been used as source material, and (2) the fill's grain and tone did not match the surrounding grass, which is the texture and lighting mismatch described under edge blending. Change the next stroke to cover the person and their shadow together, and keep it large enough to include the shadow but small enough to leave real grass around it as the sample. Undo the first attempt and retry, since results vary between strokes.
Exercise
A new layer sits above your photo and is empty. You select the Spot Healing Brush with Sample All Layers turned off, and clicking on a dust spot changes nothing. Why, and what setting fixes it?
Show answer
With Sample All Layers off, the tool reads only the active layer, which is empty, so there is no source material to sample. Turn on Sample All Layers so the tool reads the visible image. The result is then written to the active empty layer, which also keeps the edit non-destructive.