How to Replace a White Background in Photoshop
A had this self-portrait just holding champagne bottles that I took with a hard flash set on a tripod right next to the camera. This created the flat light and hard shadow. Since I took it in front of a white wall it was relatively easy to use Photoshop's Focus Area selection tool to make the wall disappear and create this funky colorful background. A few things that I played with are Step and Repeat to create the background stripes and the Screen blend mode to seamlessly integrate the smoke.
Before / After:
Getting started
- Simply create a copy of your background layer: Cmd + J Ctrl + J. This just ensures that you have a backup of the place you started at.
1- Curves
I decided to focus first on adding contrast to the picture with a curves adjustment layer:
- Create a Curves adjustment layer.
- Play with the curve to create an S-Curve that adds contrast. That means pulling the curves slightly upwards near the top and slightly downwards near the bottom.
2- Levels
Let’s play with a Levels adjustment layer to give the image a slightly faded effect and increase the blue tints in the shadows:
- Create a Levels adjustment layer.
- Bring the dark point to the right to increase the contrast. In this case, I brought it to a value of 23.
- Also budge the Midtones (the gray point) slightly to the right. I set mine to a value of 0.90.
- Bring the dark output to the left as well to something that looks good, 44 in this case. This lightens the darker areas and creates the washed-out look.
- Change to the blue channel and increase the first output level to something that looks good, 20 in this case.
3- Soft Light Copy
I wanted even more contrast so I created a copy and applied a Soft light blend mode to it:
- Duplicate the layer Cmd+J Ctrl+J and set the duplicate to a Blend Mode of Soft Light.
- Set the opacity of the duplicate to 30% so the effect is not so strong.
- Next I wanted just one main layer so it’s easier to extract the background, so I merged the duplicate with the main layer. Just select the two layers, right click and choose Merge layers.
4- Color Fill
The first thing I did before starting to extract the background is create the background base color behind the main layer:
- Select the backup background layer and create a Color Fill adjustment layer, so that the adjustment layer is behind the main layer we’re working on.
- Set the color to a slightly dark red, #731515 in this case.
5- Extracting the Subject From the Background
Extracting the subject from the background, especially with a white background like in this picture, is relatively easy in Photoshop using the Focus Area selection tool:
- With the main layer selected, go to Select > Focus Area.
- In the Focus Area dialog, I chose a view mode of Overlay to help me see what would be selected.
- You might have to play around with the values to arrive at a result as close to perfect as possible. Here I went with an In-Focus range set to Auto, which selected a range of 3.50.
- Use the Focus Area Add and Subtract tools found on the side of the Focus Area dialog to click on the picture where selection should be added or removed.
- I made sure to also select the shadow, because the shadow will be completely recreated in the next step.
- If the selection is a bit jagged or rough in certain areas, you can click on Refine Edge and then play with different radius values. From that refine edge dialog, you can also paint around the edges of the subject to have Photoshop recalculate things.
- Back in the Focus Area dialog, in the Output to selection, choose Layer Mask.
- At this point, if needed, you can still refine the edges further with the Mask Edge dialog, which is essentially the same as the Refine Edge. To access it, click on the layer mask and then on Mask Edge button in the mask properties panel.
6- Recreating the Shadow
Recreating the shadow is simple enough:
- Duplicate the main layer Cmd+J Ctrl+J and move the duplicate layer under the main layer in the layer order.
- Move the duplicate slightly down and to the right of the composition using Shift + → and Shift + ↓ with the Move Tool → V active.
- Temporarily hide the main layer to better see what you’re doing.
- Create a Hue/Saturation adjustment layer and in the properties panel click on the bottom left icon to clip the adjustment to the layer.
- Set the saturation all the way down to -100.
- Decrease the Lightness to something that looks good, -85 in this case.
- Select the layer mask associated with the layer and apply a Gaussian Blur filter to it to have a softer shadow. In this case I applied a Gaussian Blur of 15px.
- You can now unhide the main layer.
7- Striped Background
Creating the striped background might seem complicated, but it’s actually pretty simple with the Step & Repeat function:
- Create a new layer under the shadow layer.
- If needed to help out, hide all the layers on top temporarily to better see what you’re doing.
- Use the Marquee Tool → M to create a stripe shape selection.
- Set your colors to the default ones D and fill the selection with the black foreground color Option+Delete Alt+Delete.
- Make sure that the layer is positioned at the very top of the image.
- Duplicate the layer Cmd+J Ctrl+J and hit Cmd+I Ctrl+I to invert the colors of the duplicate.
- Move the duplicate right under the first one.
- Merge the duplicate with the first stripe by selecting the two layers, right-clicking and choosing Merge layers.
- With the layer that has the two stripes selected, hit Option+Cmd+T Alt+Ctrl+T to transform a duplicate of it.
- Use the Shift + ↓ to bring that duplicate right under the first stripe layer.
- Now hit Shift+Option+Cmd+T Shift+Alt+Ctrl+T to repeat the transformation on more duplicates until you cover the whole image with stripes.
- Select all the stripe layers and merge them together by selecting the layers, right-clicking and choosing Merge layers.
- Set the opacity of the stripe layer to 70% to let the background fill color through.
- Add a layer mask to the stripe layer.
- Select the Gradient Tool → G.
- Select the gradient that goes from black to white and draw a diagonal line from the bottom right corner to partially hide the bottom part of the stripped layer and bring the background color through even more in that corner.
8- Smoke Overlay
Here’s a good free pack of smoke pictures you can use. For this composite I used two smoke pictures:
- Create a new layer on top of the striped background layer.
- Import your 2 chosen smoke pictures into the file by selecting File > Scripts > Load Files Into Stack.
- Move them around and resize and rotate them as needed with the transform tool Cmd+T Ctrl+T to get the proper placement for them.
- Set the Blend Mode of each of the smoke layers to Screen and their opacity to 40%.
9- Corner gradient
I added a slight gradient on top of all the layers from black to transparent in the upper left corner. Adding an overlay on top of a composite often helps to blend and make it seem more believable that the subject and the background are together:
- With the topmost layer selected, create a new layer Shift+Cmd+N Shift+Ctrl+N and click on Ok.
- Set the Blend Mode to Soft Light and the Opacity to 50%.
- Select the Gradient Tool → G.
- Select the gradient that goes from black to transparent and draw a diagonal line in the upper left corner to create the corner gradient.
Done! A slightly more complex one, but still easy to accomplish nonetheless when broken down in separate steps.
🌄 Image info:
- Camera: Nikon D800
- Focal length: 50mm
- Shutter speed: 1/125s
- Aperture: f/8
- ISO: 100