Skip to main content

Masking Sky into a Window

Lesson 2 from: Beginner Photoshop Compositing

Jason Hoppe

Masking Sky into a Window

Lesson 2 from: Beginner Photoshop Compositing

Jason Hoppe

buy this class

$00

$00
Sale Ends Soon!

starting under

$13/month*

Unlock this classplus 2200+ more >

Lesson Info

2. Masking Sky into a Window

Lesson Info

Masking Sky into a Window

So I'm gonna start off with just one of the very basic items here and I'm going to start with my window, and what I'd like to do is I'd like to put my window on the wall and be able to open it up so that I can see through that window and put something in it, namely, my clouds. And this is a stock photo so it's shot on a white background so this is gonna give me some advantage to be able to get the background out and be able to put something in the middle of the window. So I'm going to scale this down a bit, I'm gonna use my command T for transform and hold down my shift key so that I don't skew it out of proportion. I'm also holding down my option key which allows me to scale it directly from the middle. If I don't hold down my option key, I would then scale it from corner to corner, but when I hold down my option and my shift, that allows me to scale it and scale it right from the center, so I can place my image where I want to have it, hold down my shift and option when I'm transform...

ing. I'm just gonna scale right in that location. I'm going to move that to where I want this, scale it so that it fits, and either double-click inside or hit return to set my transformation. Now I want to go in and I wanna be able to remove the white around my object. Now the key to compositing here is doing everything nondestructively. I don't want to do something that I can't go and undo, so there's certain things that I just don't do very often. One of them is going and erasing items, or going in and actually physically painting or manipulating the pixels on each layer, so we're going to do this nondestructively which meant we're going to have to use masks and when we do any color adjusting, we're going to do color adjustment layers, because in the end if I have to change anything, I don't wanna have to back up through several steps or hundreds of steps to get back to where I was, so the key to this is nondestructively Photoshopping. Very important to remember that. So if you are familiar with masks, this will make a lot of sense, but if you're not familiar with masks, we're going to make this easy for you. Now a mask is literally going into any image that you have and hiding what you don't want to see, and it's very easy to understand how a mask works, and what we do is we create a selection and anything inside the selection is what we're going to see. Anything that's outside the selection gets masked out. So what we're gonna wanna do is we're gonna wanna go through here and be able to put a selection around what we wanna see and we're gonna do this, we're gonna learn a few things about selections here to be able to get this mask to work like we want to. So we're gonna start off with getting this background, this white background masked out. Now like I said, thankfully this is a stock photo so it's on a nice white background to make it nice and simple. When we get to the advanced compositing course, then we get all kinds of crazy. But here we're gonna do it simply. So people love the magic wand tool, especially when they see a continuous tone background, they can click on the magic wand tool, it's magic and boom it's done. But when I go to the magic wand tool, there's a couple things that I want to pay attention to on how this actually works. First of all, when we get the magic wand tool, I wanna make sure that I set the magic wand tool to do exactly what I want it to do. So up in the control bar, I have two settings that I wanna pay attention to. I wanna pay attention to how the magic wand tool is actually sampling and there's a drop down menu that gives us several different ways that it samples. Now this may not seem of great importance but it really is especially when you're trying to select something that doesn't look like just a single color background. Now how this works is quite simple. If I were to go in and I were to use my magic wand tool, and I'll zoom in really close here and I were to use my magic wand tool and click on something, it's going to go ahead and I'm gonna click on a pixel and when I click on that pixel, what happens is it tries to go ahead and pick colors that are very much like itself. So using the magic wand tool, I have a point sample which means it selects a single pixel. Well I look at this window frame and it's kind of a golden yellow and my eye sees it very much as a golden yellow but Photoshop just sees it as a series of pixels. So if I go in and I choose my magic wand to sample as a point sample, it's literally picking that color pixel. And in the tolerance is how much it's going to select. A tolerance of zero means it has no tolerance for any other pixels unless it's exactly like itself. The more I set the tolerance, and a cool way to set the tolerance along with any setting in Photoshop here is you can just scrub on the word back and forth and that will allow you to set the setting, and that works on all of these areas in Photoshop where you have to enter in a value. You don't have to highlight the little field here, scroll back and forth on the word. So in this case, the higher the tolerance, the more it's going to accept the pixels that are not like itself. Higher number, higher tolerance. But I also wanna go in and I wanna set this so that it gets a better average sampling of color. There's thousands if not millions of colors in this window frame so I wanna be able to go in and get a general color. So if I were to go in and I were to sample a five by five average, that would mean it samples 25 pixels and then it picks something related to that. So that's how the magic wand tool is going to work, but the great thing is I'm not gonna select the window here, I'm gonna select the white background because it's continuous. I want the window to be inside my selection when it's done and that's gonna be a whole lot more tricky to select all the parts of the window. What's gonna be easier to go in and select the background and then invert my selection to get my window. Sometimes you have to do what you don't want to do in order to arrive at what you want. So in this case, I know the background's pretty much a white background, so I'm gonna set my average to be about a five by five average, which just in case there's variations in the white, it's gonna pick it all up. I'm gonna set a fairly low tolerance. It goes up to 255, so I'm gonna set a fairly low tolerance of like 25, okay. There is no magic to it. It depends on what you're selecting. So I'm gonna set a low tolerance and I'm going to click on the background and if I look, it does a pretty good job there. It catches those little wings right down there and so it's not including those. So what I'm not gonna do is I'm not gonna stop and start over, 'cause the magic wand tool is like an on off button for people. They click if it doesn't work, they're like, oh, I gotta change it. No, so far it's done a pretty good job, but it's not including these little shadow wings and I would like to add those shadow wings to my selection too. So what I'm gonna do is I'm gonna hold down my shift key and when I hold down my shift key here, what I'm going to get is I'm gonna get a little plus next to my magic wand tool which is going to allow me to add to my selection. I've done a pretty good job with my selection. I would like to add a little bit more to it instead of starting all over, so I'm gonna hold down my shift key and I'm going to click on those areas and it is going to add those areas to my selection as well. Now keeping the tolerance nice and low here is really good because I don't want it to add a whole lot to it. I wanna add it in little steps, so I'm gonna hold down my shift key too, oh, selected that one too. Awesome. So here's my selection. Now a key to selections. If you wanna know what is selected and what isn't, here's how you find out. Any time you create a selection and you see the selection tool, that means that you are not inside your selection. So right now I see my magic wand tool which means I don't have my tool inside the selection. If I go and I see this little arrow with this little dotted line around it, that means I am inside my selection. So now I see inside my selection is the white area. Well if I'm going to create a layer mask, everything that's inside the selection is what I'm going to see, everything outside the selection is going to be hidden or masked out. So this wouldn't work very well for me if I apply my mask 'cause I'm going to get everything but the window. So under the selection menu, I'm gonna go in and I'm gonna select the inverse, which is going to give me the opposite of my selection, and I'm gonna end up with my window here, even though it looks very much the same, you can see the little marching ants going all around the edge, so this tells me if my tool looks normal like the tool i use to select and I can see that, that tells me when I hover over that area, I am not inside the selection, but when I move it inside the window, it tells me yes I'm inside the selection so I know what's inside the selection is going to be masked out. So once I have my selections set, I'm gonna come over to my layers panel and my layer is active. I'm gonna go down to the bottom here and I'm going to add a layer mask, and it's going to go in and it's going to give me a mask. So like I said with a mask, everything inside the selection is what we see, everything outside is masked. It's very simple to understand a mask here. Black conceals, white reveals. You turn off the lights in a room, you see nothing. Really simple. So if I just saw this mask, I would be able to say, oh around this window I don't see anything. It's completely masked out. It's there if I ever need it back or my selection wasn't quite right, I could always get it back by going in and right-clicking on my mask and disabling the mask or shortcut is just simply shift-clicking on the mask to turn it on or off. It's there but I haven't gotten rid of everything. I've just simply hidden it. So now I have my window and I'd like to go in and I would like to put something inside that window. So I can do two different things. I could go in and I could remove the white from inside the window there, which I could do very easily. So I could go back to my layer here, select on the layer thumbnail because now we have two aspects of the layer. We actually have what's on the layer and we have our layer mask, and you have to make sure you select the right one because if you start doing something on it, you may be editing the image or the mask, so it's important, it's not just clicking on that layer, it's actually clicking on either the image or the mask of that layer. Now if I wanted to put a hole in this right here, I could, I could simply mask this area out and I could go in and click on the window here, I could select that area with my magic wand tool and I could then create a hole in my mask to have this window. And I could do this now that I've got my selection here I could go over to my mask and if I want to block this all out I'm gonna fill this area with black, because black is gonna conceal so if I conceal this area, what's inside my selection is what's gonna be affected. So I can fill this with black so that I can actually make it so that it shows true. Several different ways I can do that. Onto the edit menu, I could choose fill and I could say okay fill the contents with black, easy enough to do, but I'd like my shortcut, I could go over here and I have my color picker set to the default colors and if they're not set to the default colors, you simply just hit the letter D and it goes back to your default black and white colors and I would like to fill this with black. Well I have my foreground and my background colors. Nice shortcut. If I hold down command delete, it's going to go ahead and fill that area with my background color, option delete fills it with my foreground color. So I wanna fill it with black and you can see on my mask here I fill it with black, I now have a hole in my window just the way I want it to be. Right, works out really good. Now I'm gonna need this selection again because when I wanna put my sky in this window, I don't wanna have to go through and re-select this selection. I'm gonna save the selection until later. Now if I click off this, the selection's gone, so I wanna save the selection for a later use 'cause I may need it, so, under the select menu, I'm gonna go down to save selection, so I can re-energize this selection at anytime. And there it is. And what's interesting here is this is actually saving this as a channel. Hmm, channels aren't something that a lot of people use when they start Photoshop. They're like oh I don't get channels. Well you'll understand one of the reasons why we use channels here and one of the reasons why is to save a selection, 'cause that's how Photoshop saves a selection. So now that I saved the selection here, I can go into my channels panel and I can see that I have my selection right there for me at any time to work with which is great. Now when I'm done with the selection, I need to make sure I de-select because anything that I do is gonna be limited to that selection. So under the select, I can choose de-select which is command D, just to make sure that that selection's turned off. 'Cause there's nothing worse than trying to do something and find out that you still have your selection active and you can't do anything. You're trying to paint over here and it's only letting you work inside your selection. So there's my window. I'm going to go back to my move tool and my window and my mask are linked together here with that little link and this allows me to move everything around and the mask stays with it which is quite handy. So now we have our window on the wall. What doesn't look so perfect is we can't see through the glass very well. But we're gonna fix that a little bit later here. So next I would like to go in and put my sky in the window. So there's my sky, I turn that on, make sure I select that layer. Just because I turn the layer on doesn't mean the layer is actually selected. I have to both make it visible and also click on the layer to make it highlighted. Now this image is a little bit larger than my window so I'm gonna zoom out here. And another great thing about working inside fullscreen mode here is that this cloud image is much larger than my actual document. Well if I'm working in my floating window here and I do a command T for transform, I don't see my little transform handles, so working in fullscreen mode is absolutely wonderful. So when I do my command T for transform, I can now see my bounding edges which may go well beyond the edge of my document, so that I can see what's happening. But what I wanna do is I wanna scale this down and I want to be able to move this into my window so that I scale it to where I'd like it to be and there it is, right there. So I like the size of this and I would now like to go in and mask it so it fits right inside that window. Now I wouldn't go in here and click on my sky layer and then take my eraser tool and go and erase all this, because if I were to erase all this, and then I wanted to move it up a little bit, it's gone, which is not what I wanna do, but thank goodness we've got multiple undos, which is option command Z to get back. So what I'd like to do is I'd like to mask this cloud and sky here into that existing window, which would require me to make a selection around what I wanna see and I would like to see it right in my window which would require a selection. Oh didn't we already have that selection? We saved it. What forethought. So I could go back in with my selection tool and try to do another selection around the window, but I may not get it exactly the same. So what I wanna do is I wanna go back to my channels here and there's my selection, right there waiting for me. So to load that selection we can do it in several different ways. I could go back into the select menu, I could choose load selection. And it gives me a list of all of my saved selections right there and I could say okay, load my inside window selection, and when I do that and I click okay, it's going to give me my selection. Now of course I had moved my window a little bit, but it's still there, I can line that back up. Another way of doing this even easier, de-select this, I could go into my channels panel right here and I could hold down my command key and if you see what happens here when I hold down my command key, do you see that little hand, turns into that little selection around the hand? If I were to go in and command click on that selection, that will also load my selection, either way. We're gonna go back to that because we're gonna need to do other selections and that command click is gonna come in quite handy. Jason, somebody just asked, are the shortcuts you're giving on Mac or PC? They are on Mac. Okay. So command on the Mac is gonna be control on the PC. [Man In Green Shirt] Then everything else will be pretty much the same? Option on the Mac is gonna be alt on the PC. [Man In Green Shirt] Okay. So with my selection active here, I need to now line this up to where I'd like it to be. Now the key to moving a selection is moving it with your selection tool. If you move it with your move tool, you're going to get a pair of scissors, which shows you you are physically going to cut and move those pixels, so when you have a selection active, always go back to your selection tool and when you have your selection tool active, this will allow you to move just the selection, not what you have selected. Paying attention to the cursors in Photoshop, very important. So with the move tool, you'll clearly see those scissors. That means whatever you have selected is going to move with that selection. I don't wanna do that, I simply wanna position that selection. So I'm gonna take one of my selection tools, any of them, doesn't matter, and I'm going to move that right over to my window and fit this in here so I get it right at the edge of my window, just like I intended. Right there, okay. So, with selections, selections do not exist on any given layer. They just simply exist. It all depends on what layer you have selected, and then that selection will affect that layer, okay. I don't have to worry about doing a selection on this particular layer. Whatever layer I select, that's what the selection is gonna affect, it just simply exists on its own plane. So I have my selection on active. I have my sky layer selected and I would like to go in and put a mask on this. So I got my selection where I wanted to be, what's inside my selection is what I'm going to see, what's outside my selection is going to be left behind. My sky layer is selected, I click on my layer mask, everything works great. Now like I had showed you with the window, my window can move around with my mask, which makes total sense, because I wouldn't want my mask and my window to move around separately. But in this case with my sky, I would like to position it in a different location. So if I go to my sky layer with my move tool and I try to move my sky around, it moves with my mask. That's not what I want. I wanna be able to move the window or the sky, I should say, in my window, referring to my mask as my window. In this case, I would like my mask to stay exactly where it is and be able to move the picture around inside. So when I go to my sky layer, I'm going to click on this little link and unlink it so that now my mask and my image are two separate movable entities. They're linked by default when you create them, which in many cases is what you want. In this case, it's not what I want. So now I can click on the mask or the image and I can move them separately. So my mask is not linked to my image, it's gonna stay in that place, I click on my sky, and I can now move my sky, reposition my sky, enlarge or reduce my sky without having to change my actual mask or the window that I'm seeing through, which is great. There are times when I want them to stay linked together, there are times when I wanna move them independently. This is one of these times, I want my mask, or my see-through window to stay in the same place so that I can move my content all around.

Class Materials

Bonus Materials with Purchase

Beginner Photoshop Compositing

Ratings and Reviews

Susan
 

He is such a good instructor. This is a completely basic class, with a little advanced stuff thrown in for good measure. Remember, back in the day, when you'd look at an image & you'd say, "That's totally Photoshopped," but it wasn't said in a nice way? Jason makes it Photoshopped, but in a positive, magical way. He's made me see that I can do this! I can't wait to try out his lessons. I'm so glad I purchased this class. 🤗

Janaina de Assis
 

I Just loved the instructor, his voice and accent are so easy and the course was quiet funny. Easy language and material very dynamic, focused on the subject. Love his voice, sexy.

Paula Ayers
 

My first class with this instructor and I was and am thrilled. I learned so many tips and techniques that will help with my compositing workflow. He is very organized in how he works toward a finished project and that aspect alone will help me stop jumping around so much in my own work. I followed along using free images from Pixabay. Thanks so much for offering this course. I can't wait for the next one.

Student Work

RELATED ARTICLES

RELATED ARTICLES