Tools › Guides › Putting text behind a subject: the Photoshop way and the fast way

Putting text behind a subject: the Photoshop way and the fast way

The effect where a title passes behind someone's head. In Photoshop it is a selection, a mask and a layer order. In a browser it is a model doing the selection for you.

What the effect actually is

Three layers, in this order from the back:

  1. The original photograph.
  2. The text.
  3. A copy of the photograph with everything except the subject removed.

The top layer covers the parts of the text that fall over the subject, so the text appears to pass behind them. That is the whole trick. Everything else is craft.

It is worth knowing this because it explains every failure: if the effect looks wrong, it is nearly always the mask on layer 3.

Doing it in Photoshop

  1. Open the photograph. Duplicate the layer (⌘J / Ctrl+J).
  2. On the top copy, run Select → Subject. It is reliable on people and

ordinary objects.

  1. Refine it: Select and Mask, then the Refine Edge brush around hair.

This is the step that decides whether it looks real.

  1. With the selection active, Layer → Layer Mask → Reveal Selection. The

top layer is now just the subject on transparency.

  1. Create the text layer and drag it between the two image layers.
  2. Position the text so it genuinely overlaps the subject. If it does not

cross them, the effect does not read.

Around five minutes once you know it, and the licence is the main cost.

Doing it in a browser

The same three layers, with step 2 and 3 done by a segmentation model: it finds the subject, produces the mask, and you place the text. A few seconds, no licence, nothing uploaded.

The difference in quality is entirely in the edge. Photoshop's Refine Edge, used well, still beats an automatic mask on flyaway hair. For a title crossing someone's shoulder (which is most of this effect) there is nothing between them.

Making it look intentional

The layering is easy. These are what separate it from looking like a mistake:

Let the subject cover a real amount of the text. A word peeking out from behind an ear reads as an accident. A title where a third of it disappears behind a head reads as design.

Use a heavy weight and a large size. The effect depends on the eye completing a shape it can only partly see, and that needs enough letterform to complete. Thin text at small sizes just looks broken.

Mind the counters. Letters with enclosed spaces (a, e, o, g) go muddy where the subject crosses them. Geometric sans faces with open counters hold up best.

Put the text where the background is quiet. Sky, a plain wall, blurred foliage. Text crossing a busy background is unreadable before the subject gets involved.

Match the light. If the photograph is warm, pure white text sits oddly. Tinting the text slightly towards the photograph's own light integrates it.

Consider a slight blur on the text if the background is out of focus. Sharp text over a soft background can read as pasted on, though this one is easy to overdo.

Where it goes wrong

The mask misses a limb. Segmentation is good at the main mass of a subject and less good at an outstretched arm or a held object. If the text passes behind an arm that was not masked, it is obvious.

Hair. Always hair. A hard mask through hair gives a helmet outline. This is the honest limit of doing it automatically.

Multiple subjects. Some tools mask only the largest. Two people means checking both.

Low resolution. The mask cannot be more precise than the pixels. A small image gives a coarse edge, and there is no fixing it afterwards.

Why the file gets bigger

The result contains the photograph twice (once whole, once masked) plus the text. Flattened to a JPEG or PNG on export that does not matter, but while you are working it does, and an export that keeps the layers will be substantially larger than the original.

If you want the layers for later editing, keep them. If you want the image, flatten it.