In this video, I'm going to show you how to
replace skies in Photoshop.
Hi.
Welcome back to the Photoshop Training Channel.com.
I'm Jesus Ramirez.
In this video, I'm going to show you how to
replace the sky of any photo like a pro.
This tutorial has two examples.
In the first example, I will show you how
to do a simple sky replacement.
You will learn useful extracting techniques
that will allow you to easily take out the
sky from a photo.
Then, we will move to a more complex sky replacement
with a completely different look, and I'm
gonna show you how you can match that look
onto your original photo.
In this tutorial, you will learn three compositing
concepts that will allow you to replace skies really easily.
The concept are masking, which will allow
you to hide the original sky, and put in the
new one behind it.
Color matching, that will allow us to match
the color of the sky from the old image to
the new image, and perspective, which basically
means aligning the horizon lines above the images.
Don't worry if you're a beginner.
I divided up this tutorial into small digestible
chunks, so that anyone could follow along,
no matter the skill level.
And before we start, I would like to let you
know that I was interviewed by my friends
Glyn Dewis and Dave Clayton, for the, He Shoot
He Draws Podcast.
It's a great podcast about photography and
design.
In my interview, we talked about everything
including my upbringing, how YouTube works
and of course, Photoshop.
Make sure that you check it out and listen
to it, or place a link right below, under
the description.
Okay.
Let's get started with the tutorial.
This is the file that we're going to work
with.
It contains this background layer, and this
layer that we're going to use to replace the sky.
So, the first concept that we're going to
talk about it masking, which is going to allow
us to hide the original sky from the photo,
so that we can add the replacement sky.
There's a lot of ways in which you can do
it.
You can of course, use any of the selection
tools, like the quick selection tool, and
then create a Layer Mask.
This is a Layer Mask icon.
If I click on that, with a selection active,
I can create a Layer Mask.
Now, this can become a really difficult task,
in images like this one, where we have a lot
of detail, like in the palm trees here.
So, there's actually easier ways of making
selections than using the the traditional
selection tools.
One of the things that we can do is go into
the channels panel, and we can use a channel
as a selection, so we have these three channels.
Notice that they're black and white images,
and you can think of them as Layer Mask.
If I come back into a layers panel and once
again, just create a regular selection and
create a Layer Mask, you will see the Layer
Mask thumbnail.
If I hold alt option on the Mac and click,
you will see what the Layer Mask actually looks like.
And it's just simply a black and white image.
White reveals, black conceals and the different
shades of gray, show different levels of luminosity.
And, I'm gonna delete the Layer Mask for now.
And with that information, we can come back
into the channels panel and we can see that
the channels are black and white.
Remember, black hides, white reveals.
So, which of these channels will give us the
best Layer Mask?
That's the blue channel, because the sky is
blue, so the blue channel is emitting blue light.
Obviously, the sky will, will be white, because
that's where most of the blue light will be.
And, the car is also blue, which is why it's
really bright.
And, the trees and palm tress are gonna be
dark.
So, this is going to create the contrast that
we want, to create a Layer Mask.
If I hold Ctrl Command on the Mac and click
on the channel thumbnail, you'll see that
I would load the channel as a selection.
Then, I can click on RGB, go back into the
layers panel and create a Layer Mask.
This gives us the opposite of what we want.
I can click on the invert button in the properties
panel, and that inverts a Layer Mask and that
gives us, essentially what we want.
We extracted the sky from the photo.
But, there's a better way of doing this.
We're still gonna use channels, but in a different
way.
So, what I'm going to do is, delete the Layer
Mask, and I'm going to double click to the
side of the layer here, to bring up the layer
style window, and from the Blend If options,
we can use these sliders to hide luminosity,
or the information in the channels.
So, if I select the blue channel, this is
basically like selecting the blue channel,
from the channels panel.
So, anything that was white in the blue channel
is controlled by this white slider, also notice
that I'm the, this layer slider, which means
that this will control the layer that I currently have selected.
In this case, the original photo.
Anything that was black in that blue channel
is controlled by this dark gray slider.
So, if I click and drag this point, which
controls the blue light and drag it to the left,
I make the blue pixels invisible.
Notice that right away, I start making the
sky invisible.
And I also have the advantage of adding the
other channels in controlling them as well,
to make the blend, so it gives you a lot of
flexibility.
In this case, we only really need to worry
about the blue channel.
And when we adjust the blue channel,
we also, of course, affect the water and the car, 
but that's okay.
We can fix that later.
So, this is a great technique for replacing
skies, because it gives you more flexibility
than simply using a selection or the channels.
So, click and drag the slider to the left.
The sky will disappear and obviously if you
have other areas that are blue, they will
also disappear, but that's something you can
fix later.
Then, you can hold alt option on the Mac and
click on this point to split in half, and
spread 'em away from each other and that creates
a smoother transition between the invisible
and visible points.
It's very noticeable here on the car.
Notice as I get this point closer to the original
point, the transition is much harder, so I
want the soft transition and that really helps
out in the palm trees and leaves here.
So, you can fine tune these sliders as much
as you want.
You can press okay, and then come back and
edit if you need to.
Another way of opening the layer style window's
by right clicking and selecting blending options,
and it comes up again and you can continue
adjusting if you need to.
But, anyway, for now, this is going to work.
And, if this explanation wasn't enough for
you, and you wanna learn about how the blend
and slides work, then check out my crash course
on Blend If, I'll place a link right below,
under the description so you can check it
out.
I go into a lot of detail on how this tool
works, so check it out.
Now, in this case, this is not necessary,
but I'm going to show you a trick that you
probably don't know.
If you look at the layer thumbnail, you can
see the sky.
We're really not dealing with transparency,
because we can see the original pixels 
here in the thumbnail.
And if I hold Ctrl Command on the Mac and
click on the layer thumbnail, notice that
I don't actually select the opaque pixels.
I select the entire canvas, the entire image.
So, that means that I don't actually have
real transparency here.
If you wanted real transparency, you can right
click on the layer and select, convert to
smart object and look at the layer thumbnail
now.
Now, we're dealing with real transparency,
so if I hold Ctrl Command on the Mac and click
on that layer of thumbnail, you can how I'm
now selecting the opaque pixels in the image.
I'm going to undo that, just because I don't
need it for this image, but I wanted to show
you that trick, just in case it was useful
in your project.
Let me know in the comments, if you enjoyed
that trick and if you knew it already.
Now, we're going to move onto the second compositing
concept, which is matching color.
And what I'm gonna do now is I'm gonna press
control J, command J on the Mac to duplicate
that original copy and I'm just gonna place
that above everything.
Right click and select clear layer style,
and we're gonna use this duplicate to bring
back the car, and the water.
So, it's really simple.
All you really need to do is select the rectangular
marquee tool and make a selection around the
things that you want to keep.
You can add to the selection by holding shift
and clicking and dragging, so I will do just
that, to add the top of the car.
And then, I'm going to click on the new Layer
Mask icon, and I have a Layer Mask.
And notice how that immediately brings back
the car and the water.
One thing that You may want to do is blur
the edge of the mask, so that it's not so
sharp and the easiest way to do that is, with
the Layer Mask selected in the layers panel
is go into the properties panel, and from
the properties panel, you have this slider
titled, feather and we can just use the feather
slider to blur it, so that it's not so sharp.
Then, I can double click on the hand tool,
so that we can see the entire image, and that
should look much better.
And the great thing about using these techniques
is that they are non destructive, which means
that you can always come back and make adjustments
if you need to.
Just so that we know what's going on, I'll
just rename this layer and I'll just call
it, car and water, because that's what this
layer's bringing back, the car and the water.
And, we're gonna work with the sky now, so
I'm gonna drag the sky up and enable it.
This is a sky that we're going to work with.
When you're working with a sky, just like
with any other composite, you have to make
sure that the color and lighting of the image
match.
Notice that in this case, the sun is on the
right hand side of the image, the brightest
side of the sky is on the right side, and
the darkest side is on the left.
In the original image.
And I'll duplicate this layer, drag it up,
and delete the Layer Mask, and I'll just call
this one, sample, just so we can use it as
a sample layer.
So, that's the color of the sky obviously
and the bright side is on the left.
The dark side is on the right.
So, we need to make sure that this sky matches
that.
So, I'm going to press control T, command
T to transform, right click, and select, flip horizontal.
So now, that matches.
Just like with any other composite, you also
need to make sure that the color, luminance
and saturation match.
So, if I were to take this sky layer and drag
it all the way to the bottom, you can see
how I've now replaced the sky, but it doesn't
look that realistic, because we haven't matched
the color of the scene and the brightness
of the scene.
So, you always have to do that, even when
replacing skies, so that the image looks more
realistic, specially if at some point, you
decide to bring in a sky that's completely
different, like this sunset sky here.
So, at the end of the tutorial, I'll show
you how to match something like this, but
for now, we're going to keep things simple,
and we're simply gonna work with this sky
and we're gonna match it to the original sky,
so that it matches the scene.
So, what I'm gonna do now is simply click
and drag this layer down, and you can already
see the difference.
See how the original sky's much brighter and
it has a different blue.
Well, you have to match that.
You can match that by doing many different
things, but in this case, we're just gonna
keep things simple, and I'm going to create
a levels adjustment layer, and I'm going to
click on this icon, to clip it to the layer
below, which means that this adjustment layer
will only control the sky and nothing else
in the scene.
So, the first thing I'm going to do is show
you something.
If I make a extreme adjustment like this one,
you'll notice that I changed the luminosity
of the image, but I've also changed the saturation.
So, we don't want that.
We want this layer to only control the luminance
of the image.
So, watch what happens when I change the blending
mode from normal, to luminosity.
See that.
This is normal, and this is with luminosity.
The luminosity blend mode allows this adjustment
layer to only change luminosity and not saturation
and that's what we want.
So, I'll reset this layer, I'll even delete
this Layer Mask and rename this layer, just
to make things clear.
So, this layer is only controlling luminosity.
So then, I can click and drag on the black
point and drag it to the right, to make the
entire image brighter, and I can adjust the
contrast of the image by dragging this center
point and just adjust the image accordingly.
So, now we have a similar brightness in the
image, and obviously the color doesn't match,
so we can use many different methods, but
to keep things easy, I'll use a hue and saturation
adjustment layer.
I will also clip it to the two layers below,
so that they only affect the sky, and I'll
increase saturation and adjust the hue, just
to try to get the sky to be a similar blue.
It doesn't have to be 100% the same and obviously
you can keep fine tuning the sliders until
you get a closer match.
But, in this case, this is a close enough
match.
So, I will select this layer by clicking on
it, and then hold shift and clicking on the
sky layer, then pressing control G, Command
G on the Mac, to put it into a group and I'll
call the group, sky.
Then, I can drag that group all the way to
the bottom and disable the sample layer and
you can see the sky there.
So, when I click on the sky layer, I can click
and drag it and position it accordingly, now
that the color matches.
Also, now that the color and luminosity match,
you'll notice that you're gonna remove a lot
of that fringing around the edges of trees
and leaves.
The reason that you get that fringing is because
the original background is vastly different
than the background that you bring in, so
matching the luminosity and the color, will
help minimize that fringing.
Now, we'll move onto the third compositing
concept, and that is perspective, and it's
very important for every composite including
sky replacements, so perspective and compositing
simply means, making sure that the horizon
line, of all the elements of the image, match.
In this case, it's very simple.
We can see the beach here and horizon line
is there, right where we started the mask.
So, with this sky that we're bringing in,
you can see that the horizon line is right
about here, right in between these yellow
flowers and the tree line.
And we can simply click and drag that right
about there, and now the perspective matches,
so the scene is more realistic.
If we didn't match the perspective and drag
the clouds all the way down here, the scene
doesn't look as real.
You can sort of see that these clouds are
going into the water there, and it doesn't
look very realistic.
That's because the perspective doesn't match,
so always make sure that the perspective matches.
And, if the horizon line is not this obvious
in your image, just think about it this way.
Where does the ground plane meet the sky and
that's where the horizon line is.
If the horizon line and perspective still
confuse you, no worries.
I have a tutorial just about how perspective
works with compositing.
I'll place a link right below, under the description.
I highly recommend this tutorial, because
it's very important and it's something that
a lot of people disregard when creating composites
in Photoshop.
So, check out that tutorial right after this
video.
So, now that we placed the sky into the scene,
we can fine tune the entire image.
For example, the left side of the image, should
be a lot brighter.
You can see that in the original sky.
This is much brighter.
I can create a curves adjustment layer, just
to change it up a bit.
You could also use levels, if you feel more
comfortable with it.
The point is, is that I'm just going to brighten
up the entire sky, like so.
Then, with the Layer Mask selected, I'm going
to click on invert, to completely hide that
effect, and with the brush tool, I'm going
to use the right bracket key on the keyboard,
to make the brush larger and make sure that
my foreground color is white.
Remember, white reveals, so I'm going to pain
to reveal the effect.
When I use the brush tool, I always like to
use fade, which allows you to reduce the intensity
of the last tool that you used in Photoshop.
In this case, the brush tool.
So, I can bring down the opacity of that brush
stroke, so I can control how bright I want
that left side of the image and you can see
that in the Layer Mask thumbnail, that Layer
Mask changes.
White, completely shows that effect.
Black completely hides it, and the different
shades of gray are different levels of opacity
for that effect.
So you can fine tune it accordingly.
So, at about 75% looks good in this case and
I'll press okay.
Now, the final thing that I like to do when
replacing skies is really zoom in there and
see if I have any problem areas, so I can
zoom in and enable the sample layer and you
can see that I sort of lost some of the detail
found in that spot.
And, I can click on the car in water Layer
Mask and paint with white.
I'll use the left bracket key on the keyboard
to reduce the size of my brush.
Disable the sample layer and select the Layer
Mask.
Make sure that I have white as my foreground
color and just paint with white, to bring
back some of those pixels that I accidentally
hid when using the Blend If.
And I can always compare with my original
image and just bring some of those back, wherever
you need to like these areas here, like so.
And obviously you wouldn't need to do that
on the entire image.
I'm sure that I missed some areas here in
the palm tree as you can see, but again, you
can easily fix those, by painting with white
on that Layer Mask and I'm not gonna spend
too much time doing this.
All the fine tuning is really not that important
for the tutorial, but it's definitely important
for your images.
You may need to go in there and adjust the
color of the sky, if you need to, even the lightness.
Whatever you need to do to make it work.
But that's the advantage of working with these
techniques.
They're non destructive, which means you can
edit them anytime, so always make your adjustments
at the end, once you have everything in place.
So, that's before, and after.
I also mentioned earlier that I was gonna
show you what to do with that sunset photo,
and I've already started the project, just
to save a little bit of time.
It's basically the same image that we worked
on.
The only difference is that we have this photo
of a sunset.
We have the original image that also has the
same Blend If adjustment and we have this
car and water layer that brings back the pixels
that make up the car and the water.
So basically, we've already accomplished two
of the three basic steps.
Masking and perspective.
Now, we need to work on color and before we
do that, I wanna show you something.
I'm going to show you what the original images
looks like and I'll just bring it and I'll
just scale it up and move it to the top of
the layer stack, so that you can see something.
This sunset image is obviously back lit, the
sun is in the back, so then that means that
a lot of the foreground elements are going
to be very dark, so this is sort of what we
have to match, to make this image realistic,
and to do so, we're going to simply use adjustment
layers.
So, I'm going to put these two layers into
a group, by holding shift and clicking them
both, then pressing Ctrl G, command G on the
Mac and now they're in a group.
Then, I can go into the new adjustment layer
icon and create a levels adjustment layer,
and I'll simply click on the white point,
drag it to the left to make everything much
darker, and I'll click on this middle point
and drag it to the right, to bring in more
contrast into the image.
Obviously I affected the sky and I don't wanna
do that, so I can click on this icon to make
a clipping mask.
And, notice how the image now is looking much
more realistic.
We have a couple of problems.
One of the biggest ones is that the water
doesn't look realistic, so instead of changing
the color, I'll just use the water from the
original image, and to do that, I can simply
just paint with black on that Layer Mask,
to bring in the original water from that photo,
like so.
And, I wanna bring in some of the color from
the background onto the foreground.
One of the easiest way to do that is by pressing
control J, command J on the Mac to duplicate
that sunset sky and drag it to the very top
of the layer stack.
Then, go into filter, blur, Gaussian blur,
and blur it so that you lose all detail, but
you keep the main colors.
Then, press okay, and we're going to use a
blending mode that allows us to keep both
hue and saturation, and that's exactly what
color does.
Obviously, the hue blending mode only uses
hue.
Saturation only uses saturation and color
uses both hue and saturation.
Then, I can just reduce the opacity to zero
and scale it up accordingly just so that we
can get a little bit of that color on there.
In some cases you may need to create a Layer
Mask and paint with black, to remove those
black pixels from the water, but again, that
goes back into the category of fine tuning
the image, which we're not gonna spend too
much time with on this tutorial, but remember
that, that's really where you create great
composites when you start spending time on
those small details.
But, the important thing for this tutorial
is for you to learn the three things that
really help you create realistic sky replacements.
Masking, color, and perspective.
Let me know in the comments below if you enjoy
these techniques.
Also, if you found this tutorial useful, click
on that like button.
If this is your first time at the Photoshop
Training Channel, then don't forget to click
on that subscribe and notification buttons.
Don't forget to check out the He Shoots He
Draws Podcast.
I'll place a link with my episode down below
in the description.
Thank you so much for watching and I will
see you at the next tutorial.
