Sub topic 3
Isolating the Subject Cleanly
This chapter assumes you know Photoshop's panels and tools, can work with layers and opacity, and can make basic selections. It covers how to cut a subject out of its background so that later shadows and reflections have a clean edge to work from. Chapters on layer masks and non-destructive editing come before it. Here they are applied to a real cut-out.
Why the cut-out matters for shadows and reflections
A shadow or reflection copies the shape of your subject. Any flaw in the cut-out is copied with it. A white halo around the subject becomes a bright outline in the reflection. A jagged edge becomes a jagged shadow. A hole in the mask becomes a hole in the reflection.
For this reason, spend your time on the cut-out before you build any effect. You want three things:
- An edge that matches the sharpness of the original photo.
- No leftover background color along the edge (fringing).
- A mask you can still edit later, because you will often reuse it.
Choose a selection method by subject type
No single tool works on everything. Pick the tool by looking at the edge you need to keep.
| Subject | Edge character | Good starting tool |
|---|---|---|
| Product, bottle, shoe | Hard, high contrast | Object Selection, then Select and Mask |
| Car, furniture | Hard edges, large curves | Pen tool or Object Selection |
| Person, animal | Soft, hair or fur | Select Subject, then Select and Mask with Refine Hair |
| Glass, thin plastic | Semi-transparent | Channels-based selection, plus hand painting |
| Plain studio background | Uniform color | Magic Wand or Color Range |
Object Selection and Select Subject use machine-learning detection to guess the subject. They are fast and give a good first pass. Treat the result as a starting point. They tend to cut off thin parts such as straps, antennas and chair legs, and they often include a bit of the floor under the subject.
The Pen tool is slower but gives the cleanest hard edge. Draw a closed path, then choose Make Selection from the Paths panel with a feather of 0.5 px or less.
Build the cut-out as a layer mask
Do not delete the background pixels. Use a mask so you can fix mistakes later.
- Duplicate the photo layer, or convert it to a Smart Object first so that any filters you add stay editable.
- Make a selection of the subject with your chosen tool.
- Choose Select > Select and Mask. Refine the edge there (next section).
- Set Output To: to Layer Mask. Click OK.
Photoshop adds a mask thumbnail to the layer. White areas in the mask show the subject. Black areas hide the background. Grey areas are partly transparent.
To make the mask visible while you work, hold Alt (Windows) or Option (Mac) and click the mask thumbnail. This shows the mask itself in grayscale. Painting on it with a hard black or white brush corrects mistakes. The shortcut X swaps the foreground and background colors, so you can toggle between painting black and white quickly.
Refine the edge with Select and Mask
Select and Mask is where most of the quality comes from. The settings below are the ones that matter for cut-outs.
- View Mode. Use On Black or On White to check for fringes. A halo that is invisible on the original background shows up clearly on a contrasting one. Check both, and also check a mid-grey and a color similar to the scene where you will place the subject.
- Smooth. Removes small bumps from the selection outline. Keep it low (0 to 5) for subjects with real texture, or you will round off corners.
- Feather. Blurs the edge of the mask. A very small value (0.3 to 1 px) can match a slightly soft photo. High values make the subject look pasted on.
- Shift Edge. Negative values move the edge inward. A value of -10% to -30% often removes the thin line of old background without visibly shrinking the subject.
- Refine Hair or Refine Edge Brush. Paint along hair, fur or foliage so Photoshop works out partial transparency there instead of making a hard decision.
- Decontaminate Colors. Replaces edge pixels that carry background color with colors from nearby subject pixels. Turn it on for any subject photographed against a strongly colored background.
Decontaminate Colors changes pixel color, so it cannot output to a layer mask on the same layer. When you turn it on, set the output to New Layer with Layer Mask. The original layer stays untouched, and you get a new layer with cleaned edge colors and a mask.
Check the edge in context
Edges that look right on white often look wrong on the scene. Place a temporary solid fill layer below your subject. Use a color close to the final ground or wall. Zoom to 100% and look at the edge at the brightness you will see it.
Common faults and their fixes:
| Symptom | Cause | Fix |
|---|---|---|
| Light outline | Background color left in edge pixels | Shift Edge inward, enable Decontaminate Colors, or use Layer > Matting > Remove White Matte |
| Dark outline | Original shot had a dark background | Layer > Matting > Remove Black Matte, or paint inward on the mask with a soft low-opacity brush |
| Stair-stepped edge | Selection made with feather 0 at low resolution | Add 0.5 px feather, or refine the path |
| Missing thin parts | Automatic detection skipped them | Paint white on the mask with a small hard brush |
| Floor patch under the subject | Selection included the contact area | Paint black on the mask where the subject meets the ground |
The floor patch deserves care. The spot where a subject touches the ground is exactly where you will later place a contact shadow. Make sure the mask follows the true bottom edge of the subject, so the shadow can start at the right place.
Handling soft and semi-transparent edges
Hair, fur, motion blur and glass have partial transparency. A hard mask makes them look cut with scissors.
For hair, paint over the edge with Refine Hair in Select and Mask. If stray strands remain, add a new empty layer, set it to clip to the subject, and paint color sampled from nearby hair with a small soft brush. This avoids touching the mask.
For glass and similar subjects, a channel-based selection helps:
- Open the Channels panel and find the channel with the most contrast between subject and background.
- Duplicate that channel.
- Use Image > Adjustments > Levels to push the background to white and the subject to black.
- Ctrl-click (Cmd-click) the channel thumbnail to load it as a selection, then invert it if needed.
Because a glass subject is partly see-through, its later reflection and shadow will be affected too. The shadow of colored glass is lighter and tinted. Note this now, and keep the mask's grey values rather than forcing them to pure white.
Keep the mask reusable
You will use the subject's shape several times: to make a shadow, to make a reflection, and possibly to adjust color. Two habits save work.
- Name your layers. Call the cut-out "Subject" and keep it at the top of the shadow and reflection group.
- Load the mask as a selection when needed. Ctrl-click (Cmd-click) the mask thumbnail. The selection includes the soft grey edge values, so shadows made from it inherit the same edge.
If you want a copy of the shape on its own, right-click the mask and choose Add Mask to Selection, then make a new layer and fill it. That is the starting point for the shadow shapes in later chapters.
Here is the full workflow in one view.
Common mistakes
- Over-feathering. A blurry edge on a sharp photo looks wrong and makes shadows look disconnected.
- Judging only on white. Always check on a background similar to the final scene.
- Cutting at low zoom. Work at 100% or higher on edges. Errors of a few pixels are easy to miss when the whole image is on screen.
- Ignoring resolution. If the subject is small and the final image is large, the edge will be soft after scaling. Do the cut-out at the final size.
- Forgetting the base. Soft cut-out edges are fine on hair, but the bottom of a product should stay crisp so a contact shadow can meet it.
Exercise
You cut out a bottle photographed on a bright blue backdrop. On a warm brown floor, a thin blue outline shows around the edge. Name two settings or commands that remove it, and say which output option you must choose when using the color-based one.
Show answer
Use Shift Edge with a negative value in Select and Mask to pull the mask inward, and turn on Decontaminate Colors to replace the blue edge pixels with nearby subject colors. Because Decontaminate Colors changes pixel color, set Output To to New Layer with Layer Mask rather than Layer Mask alone. Layer > Matting > Defringe is another valid option.
Exercise
Why should you check a cut-out against a test background before building a shadow, and why should you avoid Layer > Layer Mask > Apply until the end?
Show answer
The shadow and reflection are copied from the subject's shape, so edge faults such as halos, holes or a floor patch carry into them. A test background similar to the final scene shows these faults. Applying the mask deletes the hidden pixels, so you could no longer repair the edge when a problem shows up later.