FeaturedPhotoshop

Photoshop for Lightroom Users: Advanced Content-Aware Fill

Last week, we uncovered the Photoshop magic that is Content-Aware Fill, and it was quite glorious indeed. However, we did the very simple version of it and didn’t really get into what happens when it doesn’t work as well as you hoped it would (or not at all), so that’s what we’re covering today (don’t let the “Advanced” up in the title through you off – this is easy stuff). You’ll only have to use this technique when things go wrong, so hopefully, this won’t be an everyday thing, but when you do need it, it’s important to know how to use this feature because it can make all the difference in the world.

Here’s our original image, and the one thing I wish wasn’t there is that black metal railing right in front of the bride. Unfortunately, it falls in a place where it covers part of her dress, and it might make for a messy clean-up with regular Content-Aware Fill, but we should at least give it a try, right? (Let’s try the simple version first).

Get the Lasso tool (the one that lets us draw freeform selections) and draw a selection around that railing in front (as seen herein).

If this image is on your background layer in Photoshop, press the Delete key (PC: Backspace) on your keyboard, and the Fill dialog pops up. If your image isn’t on the background layer, go under Photoshop’s Edit menu and choose Fill. It brings up the same Fill window either way. Once the fill window appears, make sure up top where it says ‘Contents’ it says “Content-Aware” (it says anything else, choose ‘Content Aware’ from the pop-up menu). Now click OK button, and we’ll see how our simple method of Content-Aware worked out. Well, not perfect, but not terrible. The one thing I think it did brilliantly is how it fixed the end of her dress. Seriously, that’s amazing. The door on the left, though, is kind of a mess, and in cases like this, we can use the full-featured “Content-Aware Fill” for those areas. But first, since we like the way it worked on her dress, let’s save that part in case we can use it later — Press Command-A on Mac (Ctrl-A) on Windows to select the entire image. Now press Command-C (Windows: Ctrl-C) to copy the image how it looks now, into memory.

Go ahead and reselect that railing again (use the Lasso tool) and then once its selected, go under the Edit menu and choose ‘Content-Aware Fill’ (it has its own separate menu command because when you choose this, it brings up an entire Content-Aware editing window shown here). You’ll see two images on screen — the left image is your work area — where you’re going to influence the areas Content-Aware can use to get rid of that railing. The area in green seen here is showing you the areas it can use for the repair, and since almost everything is in that green tint, it can pretty much pull from anywhere. Our job is to start taking areas away so it can’t sample from areas we don’t want it to sample from. For example, when you look at the image on the right (that’s our live preview of what’s happening), you can see the fixed area has a lot of black in it, so it probably sampled some of that from the opening between the doors, so that’s what we’re going to remove in the next step. Just a note: the top right of this panel is there to help you control what you’re seeing in your work area. Where it says “Color,” that little color swatch brings up a color picker where you could choose a different tint color, so if you were, say, working on a large area of grass, you might not want green to be the tint color – you might want red or blue, so it’s easier to see. To the right of that, I find it easiest if from the “Indicate” pop-up menu you choose Sampling Area. So that way, anything tinted is fair game for Photoshop to use, and of course, our job is to limit what it can use, so it only uses areas that make sense.

Up in the top left corner of this window is a brush tool, and it allows us to “paint away” areas we don’t need Photoshop to use for sampling, so in this case, we want to paint over our bride and over the opening between the doors, so it no longer uses those areas. What’s nice is, as we paint, we get a live preview over in the window on the right of how what we’re painting away affects the Content-Aware fill fix. If we paint away an area that makes the fix look worse, just press Command-Z (PC: Ctrl-Z) to undo that paint stroke. It has multiple undos, so don’t sweat it — feel free to try painting away different parts. You can see that painting away that door really helped and filled in the door pretty nicely. It’s not perfect, and we’re not done, but it did a good enough job that with a little Clone Stamp tool work, we’ll be set. So, we’re not done yet, but we’re closer.

Go ahead and just try painting away different parts and see how it affects your image using the live preview. Don’t forget to undo anything that looks funky. Here I’m painting over to the left side of the railing to see if it can do a better job on the bottom of the door, which is helping. Again, a little cloning work will fix that up, but I want Content-Aware to do as much as possible, so we have less closing to do. The edge of her dress is still cut off, but luckily, we copied a version where her dress looked great into memory (remember?).

Click OK in the bottom right corner of the window to apply our edited Content-Aware Fill. Now we’re going to put that version of our photo, copied into memory (the one with the good dress) to good use. Press Command-V (Windows: Ctrl-V) to paste that copy directly onto our image. It appears as its own layer in the Layers panel. Of course, it’s covering the image we just repaired, so we’re going to hide that image entirely from view, and then we’re going to paint in just the corner of her dress. Here’s how: Go to the bottom of the Layers panel; hold the Option key (Windows: Alt-key), then click the third icon from the left (it looks like a rectangle with a circle in the center). That’s the Layer Mask icon. This will hide your layer (the one with the dress that looks good) behind a black mask so it won’t be visible any longer. Now, get the Brush tool from the toolbar and care to paint over that area where the dress was missing, and it reveals just that part of that hidden top layer. You can see the image after we painted the edge of the dress in the image below. Again, it still needs a tiny bit of cloning, but you’re pretty much there.

Of course, there are more features in e Content-Aware Window than what I’ve shown you here, but since this column is for folks who are new to Photoshop, we’ll leave it for another time for now, but at least you now have a game plan when the regular Content-Aware Fill doesn’t work out the way you had hoped.

OK, next week, our journey continues as we dig a little deeper into those things we jump over to Photoshop for. See you then. 🙂

-Scott

Share: