Replace a Window in Photoshop, No Construction Required
Subscribe to Phlearn
Replace a Window in Photoshop With Color + Perspective + Exposure = The Magic Combination
When there is a need to replace a window in photoshop, or bringing part of one photo into another, it is absolutely necessary that you match the colors and perspective to make it look like it belongs there. We start with two photos, with two completely different angles of perspective. By using the transform tool, we can pull the edges of the window from Baarnijs’ photo and warp it to match the leading lines of Claude’s. This brings the perspective together, but our colors and exposure still look out of place. To match our colors, we can pull up a curves adjustment layer and apply a clipping mask. Clipping masks are a tool we use very regularly. With the clipping mask applied, the curves layer is visible ONLY where the new window is visible. We can then adjust the colors to match without worrying about affecting the rest of the photo.
Building a Frame From Pixels
The border around the window still doesn’t mesh with it’s surroundings. By using the transform tool, we can take one of the wooden boards that make up the wall and create a custom window frame from scratch. The colors and exposure of the frame can then be matched to the rest of the photo using another curves adjustment layer.
Want to become a PRO at compositing images perfectly? Check out our Phlearn PRO Compositing Tutorials
Photo by Claude Lee Sadik
Image by Baarnijs
Today, we’re going to play around with some compositing.
Hey guys, welcome to Phlearn. My name is Aaron Nace. You can find me on Twitter at AKNacer. Today, we are doing some really cool stuff with compositing. We’re using two of the family’s images. I can’t wait to get into it. It’s going to be a lot of fun. You guys are going to learn quite a bit.
We just launched a new print store, here, on Phlearn.com, and you can get to it. There is a link right up at the top. Right now, this week only, we are giving away a free print. There’s a giant banner up at the top of this page you can see. You can enter it in. All you have to do is enter our newsletter for a chance to win. If you already are a part of our newsletter, you’re already entered to win. Look at that. You didn’t even have to do anything. You just had to be a loyal, awesome Phlearn subscriber.
Let’s get into our tutorial. This is a really cool image. We have our image … this is by Claude Lee Sadik. This is by … I think it’s called, Baarnijs. If I didn’t pronounce that correctly, I apologize. Basically, what we want to do here is that Claude sent along with this image, he was like, “Man, if there was a good way to select out just these blinds here, to kind of clean this up.”
There is a good way to do it, but there’s not really a quick way to do it. Basically, if you wanted to go through something like this and use the Polygonal Lasso tool, and you wanted to clean this area up, you could click there, and then click there, and then click there. There we go. Make a selection out of that. Grab your brush tool and paint with white. You could do that. It definitely would work. You would just have to do it over, and over, and over again.
There really is no … not much of a quicker way to do that because the blinds are inconsistently space between each one of them. This space is a little bit less than that space. There’s a quite a bit going on with it.
What I figured I would do, instead of replacing … or, sorry. Instead of trying to fix this up, which sometimes, it’s just easier to replace it, here’s something else. We’re going to just take one of these windows from this image, and replace it. Why not? It will be fun.
Basically, what we’re going to do is I’m going to grab my Marquee Tool, and we’re just going to select out this window with a little bit of a boarder around it. I’m going to use my Move Tool. So just hit “V” for that. Then, hold down the Shift Key, and click and drag from one image to another one. There we go.
Here we go. Now we have a new window in this image. The only thing we’re going to run into here is the fact that this window is way smaller than the rest of the image. This image is quite large. We’re going to need to upscale the image. We can upscale the window by quite a bit or I can just downscale the background a little bit. Normally, you would just want to find a window. Why is this actually helpful? That’s a good question.
Often times, there are things in your images that you just don’t like. Trying to Clone Stamp them out and things like that can be difficult, but let’s say you could go out and photograph another window, something like that. Then, replace it in this image. This has just happened to be some images that we had from the contest, but if you went out and photographed another window, or a version with it closed, or went on a different day and photographed that, you could pretty easily replace that window with a different window.
I’m going to show you guys how to do it from a window that looks absolutely nothing like window in the actual image. I’m going to show you guys that you can still make it look pretty good. If it did look anything like the window, you could make it look very good using the same techniques.
Okay, so what I’m going to do is let’s just scale my background down a little bit. I’m going to hold down the Alt or Option key. Double-click on it, because it’s a background in this lock. If I hold Alt or Option, and double-click, it will take off the lock, and then I’m just going to scale that down, just a bit there. That’s using my Transform tools. I’m going to Command + Click on that, which turns it to Selection. Go to Image, and down here to Crop. All right, and we’ll Deselect.
Now, we did scale the image down, but we don’t scale this window up quite as far, which means you’re going to get a little bit less distortion and things like that. It’s not going to look as pixelated. Okay, how do we get this window to look like it’s this window? Well, it’s really not that hard. There are a couple of things that we want to follow. Those are basically like basic perspective rules.
On our new layer, you don’t have to do this. I’m just kind of drawing these out. These are our basic perspective guides. I’m going to just kind of follow some of these lines that are in the image and fill them with bright colors so I can see what I’m doing. I’m following these perspective lines. The blinds start here, and they go down at an angle like that. Let’s just fill that in with the area like that.
You can see, this is basically, if you guys have ever studied perspective and things like that, that’s going to create a vanishing line. Eventually, those will go to the horizon. They’re going to connect to the horizon. Think of train tracks. They go off in the distance, and they meet in the horizon. Similar thing.
All we have to do is get this window, here, to basically line up. They’re horizontal right now, these lines, because we’re looking straight at them. We just need to make them look like they’re converging. Let’s bring the opacity down just a bit on that. I’m going to hit Command + T, which is going to bring up our Transform dialogue. We’re just going to hold down the Shift Key, making sure we’re maintaining our proportions, and I’m going to line up our edges right about there. All right, that looks pretty good. I hit Enter by accident, but you don’t have to.
Now, what we’re going to do is change our perspective. To do that, hit Command + T again, hold down the Control or the Command Key, and click on one of these corners. Then, hold down the Shift Key and hold down the Option Key. Right now, I’m holding down Shift + Option + Command. If you guys are on a PC, it’s going to be Shift + Alt + Control.
Now, we can actually just adjust our perspective, which is really, really cool. You can see … I scrolled up a little too far there. I am changing the perspective of my window. Now, also keep in mind, I can get it pretty close, but if this isn’t lining up here, I can just hold down the Control Key, and pull up one of these corners at a time. Really easily, I’m able to just kind of warp this window into a place that actually fits into the overall perspective of this image. There we go. Holding down, again, the Control or the Command Key, we’re able to just warp this around.
Then, instead of looking straight at it, the window is actually following the perspective of the room, which is perfect. There we go. Let’s hit Enter, and that’s our window. The before, it was just straight on. Now, the after, is in the same perspective. That’s taken care of.
Now, let’s go ahead and put a Layering Mask on there. I’m just going to put a Layering Mask on there and paint with black, right here on my Layer Mask. We’re just going to paint directly over some of these areas that are not necessarily as needed. Then, we’re going to try to do some blending and things like that. There we go. Let’s bring that down just a little bit.
All right. I feel a sneeze coming on. That was fun. Glad you got to watch someone sneeze on video today. All right. I can’t stop it. Once it starts, you can’t stop a sneeze.
All right, there we go. That’s our new window. You can see, it’s relatively … it’s in the same perspective as the rest of the window, which is great. It doesn’t look like it should belong where the rest of the window is. That’s because the colors are totally messed up. It doesn’t … it’s the wrong color.
What we’re going to use, is we’re going to use a Curves Adjustment layer to get our colors where we want them. Then, what we’re going to do, is we’re going to use a Clipping Mask to make sure that Curves Adjustment layer only affects this current layer. Here’s how we do that.
We grab our Curves Adjustment layer, and you can see, I’ll just play around here. You can make it lighter or darker. Let’s just go ahead and make it quite a bit lighter so you can see all of the detail here. If I want this layer to only affect this layer, which this is the layer where our window is, then all I have to do is right click, and I’m going to go up here to Create Clipping Mask. Now, all of a sudden, this layer, the Curves Adjustment Layer One, is only affecting the window, which is perfect.
Let’s just click back in here. I’m going to make this a little bit darker. There we go. I’m just going to look at my colors. Between our three color-channels, red, green, and blue. Let’s start with our blue channel. Do we need more blue or less blue? If we need more, just click and drag it up. If we need less, click and drag it down a little bit. All right, less seems to be working pretty well.
Now, let’s try just our red channel. Do we want more, red or less red. Well, this has a lot of red, this, not much red. We’ll just click and drag this up a bit. There we go. Now, our reds look a little bit better.
Our green channel, that can be a little, bit harder. Usually, you want to add a little bit more green, because magentas usually don’t get a lot of magentas in photos. When you’re adjusting these, you want a little bit, more green usually.
All right, then RGB is just light and dark. Let’s bring that down. There we go. We can see, just with this Curves Adjustment layer, we’ve taken a window that is from a completely different image, completely different perspective, all that, and it’s already blending in quite well. That’s good news. Already, it looks … it really doesn’t look that bad. It doesn’t look like the original window obviously, but it doesn’t look that bad.
The next thing I want to do here, we’re just going to put a little bit of trim work on here. I’m going to grab my Lasso Tool again. We’re going to grab one of these boards here. There we go, just selecting right around one of our boards. All right, if you click a space and you don’t like it, by the way, I just did that. Hit the Delete Key or the Backspace key, and it’s just going to Backspace the last one you did. There we go.
Now, on this layer, which is our background layer, I’m going to hit Command + J. What that does is just duplicates that onto a new layer, so on our new layer, we have just a board. Okay.
Now, what I’m going to do with this board … well, I can do whatever I want with it, really. I’m going to make it fit over top of all of our other windows … over top of our new window. There we go. I’m just placing it in there, and all right.
This is something that will work on just about any photo that you decide to do. Let’s go ahead and flip that, horizontally. I think it’s going to look better that way. This will work on any photo you do. Obviously, I’m spending a little bit less time than you probably would on your final photo. There we go. That looks pretty good, too. You would want to spend a bit more time, and use a higher resolution image that you would take specifically for this purpose.
This is just a good demonstration on what you can do with replacing one element from another, even if they’re in the wrong perspective, etc. Obviously, we’ve taken something that was not at all designed to go together here, and we’re still putting them together. I think it’s a pretty cool example of something you guys can do. This is not something I would put in my portfolio by any means, but if you were in a pinch, and a client was like, “Oh, we really need that window to be replaced.”
Instead of trying to Clone it out, or something like that, you could just use a different window. There we go. That looks decent. Now, let’s Shift + Click all of those layers. There’s our each individual layers that I’ve just transformed into place. I’m going to hit Command + E, which is going to merge them all together. There we go. Now, we just need to make this look a little bit more like, hey, it should actually be there.
It’s too red. Can you guys see it kind of stands out? I’m going to hit Command + U, which is our Hue/ Saturation. I’m going to bring our saturation down just a bit. There we go. That’s going to make it blend in quite a bit better. It was red because this wall over here is quite red. Then, we’ll just bring our lightness down. There we go. All right. Pretty cool.
Then, we’ll put a Layer Mask here. I’ll kind of just fade this away. Make it look like it’s actually … there we go … actually blending in to everything, rather than having a sharp border. Just a couple quick tips that you guys … if you border wasn’t looking right, then you can go add that. You can add that to those things as well.
Just a really, cool, quick way to completely replace a window from an image that obviously is completely, totally different. Within just a couple steps, you can see. Bring that window in, warp it into place, use a Curves Adjustment layer to get your colors right. That can take a little bit of work. If you don’t get it immediately, don’t worry about it. You can always open up your Curves Adjustment layer and play around with this after the fact, like, “Oh, I want this darker. I want it lighter,” whatever you want to do. You can always change this after the fact. Just double-click right over here on your little symbol. Then, we just put a fascia on there. Those were a couple lines to help us out with our perspective.
You guys can see it really didn’t take too long, and a good way to do a bit of compositing. Now, I chose a window … very clumsy over here apparently. I chose a window because obviously there was a window there. There needed to be a light source coming in, because that’s what’s going to light our subject and color our subject as well. We chose the window. We colored it correctly, and put it in place, guys.
I hope you enjoyed this tutorial, just a cool, quick, fun thing. If you guys have any uses for this, let me know. If you have anything that you’re like, “Well, actually that could be really cool in this certain situation.” Maybe you took a picture and there was an ugly, brown door in a room, and you wanted it to be a nice door. Well, you can go take a picture of a cool, nice door that you like and replace it. Just match the color and you’ll be good.
Awesome, guys. Thanks so much for watching Phlearn. I hope you learned a lot and make sure to check out our print store available right now. Phlearning you guys later. Bye, everyone.
Want to see something really impressive? See?