From the course: Deke's Techniques (2018-2021)

848 What to do when Content-Aware Fill fails?

From the course: Deke's Techniques (2018-2021)

848 What to do when Content-Aware Fill fails?

- Hey gang, this is Deke McClelland. Welcome to Deke's Techniques. So a few months ago, my son Max and I put together a video about the 100-year-old art movement Dada. That video, it's cringe-y low budget, but it's got some interesting stuff. You can check it out if you like at youtube.com/c/dekepod. Anyway, I started with this Jean Arp piece called "Mustache Hat" and then I came up with my own piece "Bass Hat". Get it? It's a bass or it's a hat, which I drew in Adobe Photoshop Sketch on an iPad Pro. Oh boy, I can tell, I'm already losing you. Come on back, trust me, this is a good one. And so then I brought my "Bass Hat" into the real Photoshop running on a Mac or PC and I decided to change the aspect ratio to, let's say, vertical and fill in those gaps at the top and the bottom in that beige watercolor wash layer with content-aware fill. No brainer, right? Only instead of filling in the gaps with potentially interesting beige texture, Photoshop delivered what nobody wants, flat beige. Why in the world would it do that? Seriously, it's like it hurts my feelings. Well, the short answer is, it was actually my fault, not Photoshop's. The medium answer is, this could totally happen you, especially if your watercolor wash layer is occasionally translucent. For the long answer, keep watching. All right, so here's my take on Jean Arp's 1923 "Mustache Hat" and here's my 2019 "Bass Hat". And I want you to see how it's put together here. I'll go ahead and Alt or Option-click on the eye in front of the background so that you can see that we're starting off with a white rectangle. And then on top of that, I went ahead and painted in this sort of orange modeling. And I did so using Adobe Sketch on an iPad, although you could use some other device. Now, notice over here in the Layers panel that I have a layer mask. I'll go ahead and turn it off by Shift-clicking on that layer mask thumbnail so that you can see all of that brush work in its full glory, very easy to apply, and you can also see that we have a few transparent areas as well. All right, and then at the very top, we've got the bass hat drawing itself. All right, so let's say I want to take this rectangle and turn it into a square. If I wanted to squish the image, then I could go up to the Image menu and choose the Image Size command. And then I could go ahead and turn off the link between the width and height values right there. And with the Resample Image checkbox turned on, I could go ahead and switch my units to pixels and then notice that the width value is 2595. I'll just go ahead and copy it and then I'll select the height value and paste it. And then I'll click OK and that will give me a square as we're seeing right here. But it also gives me this undesirable stretched fish effect, which is not what I want. So I'll go ahead and press Ctrl + Z or Command + Z on the Mac. Instead, all I want to do is extend the background. And so to make that happen, go up to the Image menu and skip to the next command down, Canvas Size. And notice that the unit is set to pixels once again and that the Relative checkbox is turned off. At which point, I'll go ahead and select that height value and just paste in the value I copied a moment ago. And I'm doing that just by pressing Ctrl + V or Command + V on the Mac and then I'll click OK. And that extends the canvas like so. All right, now, I'm going to go ahead and hide the bass for the moment. And I'll select this region up here using the Rectangular Marquee tool and notice that I'm selecting down so that we have a little bit of overlap. And then I'll select this region down here at the bottom by Shift-dragging like so. And so I've given myself a little wiggle room there. And then I'll go up to the Edit menu and choose the Fill command and then make sure Contents are set to Content-Aware. Color Adaptation does not matter for our purposes. Notice that the Blend Mode is set to Normal. The opacity is 100%. I do not have Preserve Transparency turned on. If I did, that would preserve these transparent regions, which of course is not what I want. So I'll just go ahead and click OK. And then a few moments later, after Photoshop considers things, we get this completely not-a-match-at-all effect right here. And so I'll go ahead and zoom in a little. Actually, I'll press Ctrl + 0 or Command + 0 on the Mac to fit the image on screen and you can see that we have these areas of flat color. What the heck? Well, I'll press Ctrl + Z or Command + Z on the Mac to undo that change. And assuming you're working in the most recent version of Photoshop CC, you can go up to the Edit menu and choose Content-Aware Fill, which is going to bring up the dedicated Content-Aware Fill task space, which is shown right here. And a moment later, you will see everything filled with that flat color. Well, maybe the problem is that Photoshop is considering these transparent regions right here. And so armed with that brush with a little minus sign inside of it, I'll go ahead and paint these areas away so that they're not being duplicated is the idea. And my overlay color, by the way, is set to green, just in case your overlay color is not quite matching. Notice this little warning icon down here. It disappeared, but that was telling me that I was updating things and it made no difference at all. All right, so I'll cancel that. Obviously, that is not the solution. I'm going to press Ctrl + D or Command + D on the Mac to deselect the image, and I'll go ahead and grab the Spot Healing Brush right here, which uses content-aware technology by default. And so as you can see up here in the options bar, Type is set to Content-Aware. And so I'll just go ahead and paint over this transparent area right there and it turns a flat color once again. What in the world is happening? Now, you can mitigate things a little bit by turning on the Sample All Layers checkbox, which will go ahead and look at the contents of all the layers. And now, I'll go ahead and zoom in on this region right here and I will paint over it quite sloppily. Doesn't really matter for our purposes here. And notice that things are matching much better. We no longer have a flat color. We have some nice modeling. But if I zoom in, we also have this tragic edge right here. So apparently, that's not the answer. So I'll press Ctrl + Z or Command + Z on the Mac a couple of times in a row here in the most recent version of Photoshop to undo my way back so that nothing is filled in at this point. Here's the problem. Notice if I turn the background off that we have a lot of that checkerboard pattern showing up, which indicates transparent regions of the image. So everything at the top is transparent, everything at the bottom is transparent, and those holes are transparent as well, but these other areas are translucent. And so here's the point I'm trying to make. It's all one color. That's why Photoshop is cloning that one color because that's the only color it has to work with. Content-aware technology does not work with varying levels of opacity. So what you have to do is merge these layers together. Now, you don't want to do so permanently of course. That is to say you want to keep the original translucency. So what I recommend you do is Shift-click on the background so both Orange and Background are selected and then press Ctrl + J or Command + J on the Mac to jump a copy of both of them. Then right-click on this layer mask thumbnail right there and choose Delete Layer Mask. Unfortunately, it's dimmed and that's because I have multiple layers selected. So I'll just go ahead and click on that Orange layer to select it independently. Right-click on the layer mask 'cause otherwise, it's just going to get in the way. It's going to be merged with the final result. And so I'll go ahead and choose Delete Layer Mask. We still have the original ready and waiting if we need it. I'm going to go ahead and turn those two bottom layers off and then I'll Shift-click on this Background item, which is now a floating layer. And I'll merge these two layers together by clicking on the fly-out menu icon in the top-right corner of the Layers panel and choosing Merge Layers. And I'm going to rename this guy just so I don't get confused. I'll go ahead and call it Opaque, let's say, so that I know this is an entirely opaque layer. And now, I can just go ahead and paint these guys in if I want. And this time, I don't get the weird edges that I was seeing before, so that's nice. So once again, I'm working with the Spot Healing Brush and I'll go ahead and paint in this area and I'll paint in this guy as well and then we've got one more down here. All right, now, I'll press Ctrl + 0 or Command + 0 on the Mac to zoom out and I'll switch back to the Rectangular Marquee tool and I'll go ahead and select that top region with a little bit of overlap and I'll Shift-drag around this bottom region here. And now, we don't need the overhead of the Content-Aware Fill task space, so I'll just press Shift + Backspace or Shift + Delete on the Mac to bring up the Fill dialog box. All of these settings are just fine. You can go ahead and experiment with color adaptation, by the way, but that's totally up to you. I'm just going to go ahead and click OK in order to let Photoshop do its thing. This is a fairly big image, so we are going to get a progress bar. After which point, everything looks great because now, Photoshop has all kinds of different colors to clone from. And so notice if I click to deselect the image that we have a nicely expanded background. All right, now, I'll go ahead and turn the Bass Hat layer back on. Now, I want everything inside of the fish to be white, so I'll go ahead and grab this layer mask right here. And as opposed to dragging it onto the new layer, I will press the Alt key or the Option key on the Mac and drag it. And that way, I'm going to make a copy of this layer mask right there as we can see it. The problem is, we're exposing transparent pixels and so I'll go ahead and turn that white background back on so that we have this effect here. And now, I'll fill the screen with the image by pressing Shift + F and I'll go ahead and zoom in a little bit as well. And that's what you do when content-aware fill mysteriously delivers solid colors here inside Photoshop. Oh wow, you're still here? You stuck with it? How awesome is that? In that case, next week is going to be easy for you, which is when, in celebration of Thanksgiving, we're going to create a hand turkey, which could look like this or this or this or this. Deke's Techniques, each and every week. Keep watching.

Contents