How To Replace A Sky In GIMP

0Comments

skycompare

One of the realities of Gimp is it doesn’t have all the tools Photoshop does.  In her post How To Replace A Sky In Photoshop, Helen Brady used a feature called “Blend If” in the blending options panel.  This feature is great at helping replace a blown out sky but it doesn’t exist in Gimp.  So, with her permission, I’ve taken her basic instructions and tweaked them to gain the same results from Gimp.

Without further ado, here is one useful method for replacing a sky in Gimp.

1) Fire up Gimp and open an image needing sky replacement and then drag in a sky image to the Layers panel.  Rename the dragged image “Sky”.  Click on the eye icon to the left of Sky to hide it from view for now.

sky1

2) With the background layer highlighted, select the Fuzzy Selection Tool (for a list of tools and icons, check out Gimp – An Introduction) and click any location in the sky.  This tool will select regions with similar color attributes, so the more uniform the sky, the better the results.  If not all the sky is selected, hold down Shift and keep clicking sky elements until it is all selected.

3) Select the Sky layer then click on Layers then Mask then Add Layer Mask.

sky2

4) In the dialog box that appears, click the button for Selection and then click Add.

sky3

5) Click on the box next to “Sky” to make the layer visible.  The sky from the Background layer will now be replaced by the sky from Sky.  But you may notice there is a harsh edge left by the mask.  I’ve included a zoomed crop here to show an example.

sky4

6) To get rid of that border we’ll start by clicking on the Sky layer then, on the top menu, click Layer and Duplicate Layer.  Right click on the new layer and click Edit Layer Attributes.  Rename this layer “Border”.  Your layer section should now look like this.

sky5

7) With the Border layer selected, click Layer from the top menu, Mask and Delete Layer Mask.

8) Now select the Background layer and repeat step 2) above.

9) Select the Border layer and then, from the top menu, click Select and Border.  In the selection screen that appears pick a pixel width of around 5 depending on your image.  Also select Feather Border.

sky6

10) Repeat steps 3 and 4 above with the Border layer selected.

You’re just about done!!

While you will now have a passable photo, you might want to tweak the curves of the background or sky layers.  Adjust as needed to match the general brightness and contrast of the foreground objects.  Once you’re tweak is finished you can merge the visible layers (located under the Layer menu item) and save in any format you wish, or leave it un-merged.  The choice is yours!

In the end, you should have an image that looks something like this:

sky7

NOTE: It would be more elegant to create two layers of the sky initially.  I chose the method above to help show the effects of only using the one mask without a border enhancement.  It also helps simplify things for those just starting to use Gimp.  Repetition is a wonderful tutor. 🙂

Read more from our Post Production category

Peter West Carey leads photo tours and workshops in Nepal, Bhutan, Costa Rica, Panama, Alaska, Seattle and Los Angeles. He is also the creator of 31 Days to Better Photography & 31 Days of Photography Experiments, web-based tutorials taking curious photographers on a fun ride through the basics of learning photography.

  • kanelstrand

    Thank you for finally posting a GIMP tutorial!

  • Aaron

    It should be noted that you will likely want to adjust the curves of the foreground layer as well. In this example, the foreground is extremely bright compared to the comped in sky, which gives it a very unnatural look.

  • Actually Aaaron,
    I think that the foregroun has also been modified, but the curves were adjusted in a way that the building looks even brighter than on the previous photo…

  • I agree that it looks unnatural.
    Perhaps its better to expose for the sky first 😉

    #just_teasing #don’t_flame_me

  • Finally a Gimp tutorial!
    You should definitively do more of those! 🙂

  • johnny

    Great tutorial,thank you. But how can I drag another image to he layer panel?

  • Why not just highlight the sky using the Fuzzy Selection tool (holding down shift to get it all), then use Levels and Color Saturation?

  • Thanks for the comments. On second look, on another machine, the building could use better adjustment, I agree. I made the edits while on the road on a travel laptop, meaning it’s not the calibrated machine I have at home. My apologies for the off color on the building.
    Those adjustments are what I meant when I typed “you might want to tweak the curves of the background or sky layers. Adjust as needed to match the general brightness and contrast of the foreground objects. “.
    I guess it’s time to calibrate my travel laptop!

    Thanks for the feedback!

  • Thanks, can’t wait to try it.

  • Nathan Jones

    Great to see some GIMP coverage. Thanks!

  • Charles Cosgrave

    Please put on more Gimp tutorials. Thanks for this one

  • Darin

    Another fan of GIMP! Thanks! Don’t see this too often. I just took a bunch of pics out at Garden of the Gods and the sky is blown out in quite a few of them. Looking forward to putting this to good use. Thanks again

  • Nice tutorial. I know a couple way of achieving this same thing, but didn’t know this one. In fact, one of the very first shots on my photoblog showed this same effect.

    I agree with previous posters: It’s important to go beyond just the sky replacement and address coloring and other elements to make the photo look more natural.

  • Great tutorial,thank you

  • The best way I’ve found to do an edit like this is to take a proper exposure of the subject, in this case the building.
    Then I’ll look for an open shot of the sky by itself at close to the same angle.
    Then I simply layer the building over the sky shot and erase the bad sky out.
    If the edges are too sharp between the building and sky I’ll use stitching say around 2~5 pixels and set it to blend with the base image, giving a softer transition or delineation from one layer to the next.
    I’ve found it looks more natural that way.
    The angle of the sky shot isn’t absolutely critical but it helps make the final image more believable when their are clouds.

  • P.S.
    I’ve also taken bracketed shots and layered them together as well, that way you get the proper exposure of everything.
    You can also achieve excellent results using HDR editing as well.

  • I also should add that this process took the correct exposure of the building and made it look different, darker and more contrasty, adding to the over edited look of the second image.

  • Thank you for having a GIMP version of a previous Photoshop tutorial. Please keep these up.

    Not all of us are going to give Adobe $600 when GIMP is a highly polished, FREE, alternative.

  • christina

    I like this site , its very interesting , i use ` Microsoft Digital Image Suite` , i find it very easy to use and you can do a lot of what you can do on Photoshop (ok not all but much easier to understand)and you get good results to.Well worth using if you find Photoshop hard to use .

  • magnoliasouth

    Love the tutorial and thank you!

    Any advice on annoying trees with a lot of leaves?

    I had to snort over the “take a proper exposure of the subject” advice because that instruction is totally useless . If you are unlucky enough to have a point and shoot camera, and you have a decent photo in a washed out sky, then fixing it is the only answer.

    I am a former Paint Shop Pro user and there was a way to easily select the sky in only a few clicks by adjusting the cutting ribbon then blending and such. Gimp lacks this finesse and I need a better way to get around the tree and hair issues.

  • Dreama Kennedy

    More Gimp tutorials, PLEASE 🙂

Some Older Comments

  • Dreama Kennedy December 24, 2010 02:49 am

    More Gimp tutorials, PLEASE :-)

  • magnoliasouth May 1, 2010 01:29 am

    Love the tutorial and thank you!

    Any advice on annoying trees with a lot of leaves?

    I had to snort over the "take a proper exposure of the subject" advice because that instruction is totally useless . If you are unlucky enough to have a point and shoot camera, and you have a decent photo in a washed out sky, then fixing it is the only answer.

    I am a former Paint Shop Pro user and there was a way to easily select the sky in only a few clicks by adjusting the cutting ribbon then blending and such. Gimp lacks this finesse and I need a better way to get around the tree and hair issues.

  • christina August 20, 2009 05:29 am

    I like this site , its very interesting , i use ` Microsoft Digital Image Suite` , i find it very easy to use and you can do a lot of what you can do on Photoshop (ok not all but much easier to understand)and you get good results to.Well worth using if you find Photoshop hard to use .

  • Jozef Nagy August 20, 2009 03:04 am

    Thank you for having a GIMP version of a previous Photoshop tutorial. Please keep these up.

    Not all of us are going to give Adobe $600 when GIMP is a highly polished, FREE, alternative.

  • Don Reeves August 12, 2009 11:56 am

    I also should add that this process took the correct exposure of the building and made it look different, darker and more contrasty, adding to the over edited look of the second image.

  • Don Reeves August 12, 2009 11:52 am

    P.S.
    I've also taken bracketed shots and layered them together as well, that way you get the proper exposure of everything.
    You can also achieve excellent results using HDR editing as well.

  • Don Reeves August 12, 2009 11:49 am

    The best way I've found to do an edit like this is to take a proper exposure of the subject, in this case the building.
    Then I'll look for an open shot of the sky by itself at close to the same angle.
    Then I simply layer the building over the sky shot and erase the bad sky out.
    If the edges are too sharp between the building and sky I'll use stitching say around 2~5 pixels and set it to blend with the base image, giving a softer transition or delineation from one layer to the next.
    I've found it looks more natural that way.
    The angle of the sky shot isn't absolutely critical but it helps make the final image more believable when their are clouds.

  • Henrik August 11, 2009 01:05 am

    Great tutorial,thank you

  • Rick August 8, 2009 08:05 am

    Nice tutorial. I know a couple way of achieving this same thing, but didn't know this one. In fact, one of the very first shots on my photoblog showed this same effect.

    I agree with previous posters: It's important to go beyond just the sky replacement and address coloring and other elements to make the photo look more natural.

  • Darin August 8, 2009 06:08 am

    Another fan of GIMP! Thanks! Don't see this too often. I just took a bunch of pics out at Garden of the Gods and the sky is blown out in quite a few of them. Looking forward to putting this to good use. Thanks again

  • Charles Cosgrave August 8, 2009 02:08 am

    Please put on more Gimp tutorials. Thanks for this one

  • Nathan Jones August 7, 2009 11:32 pm

    Great to see some GIMP coverage. Thanks!

  • Ed Barnat August 6, 2009 10:45 pm

    Thanks, can't wait to try it.

  • Peter Carey August 5, 2009 09:42 am

    Thanks for the comments. On second look, on another machine, the building could use better adjustment, I agree. I made the edits while on the road on a travel laptop, meaning it's not the calibrated machine I have at home. My apologies for the off color on the building.
    Those adjustments are what I meant when I typed "you might want to tweak the curves of the background or sky layers. Adjust as needed to match the general brightness and contrast of the foreground objects. ".
    I guess it's time to calibrate my travel laptop!

    Thanks for the feedback!

  • Amy @ Muddy Boots August 5, 2009 02:54 am

    Why not just highlight the sky using the Fuzzy Selection tool (holding down shift to get it all), then use Levels and Color Saturation?

  • johnny August 4, 2009 10:28 pm

    Great tutorial,thank you. But how can I drag another image to he layer panel?

  • Guindilla August 4, 2009 06:16 pm

    Finally a Gimp tutorial!
    You should definitively do more of those! :-)

  • Paul Smart August 4, 2009 05:20 pm

    I agree that it looks unnatural.
    Perhaps its better to expose for the sky first ;)

    #just_teasing #don't_flame_me

  • Nikonboy August 4, 2009 05:04 pm

    Actually Aaaron,
    I think that the foregroun has also been modified, but the curves were adjusted in a way that the building looks even brighter than on the previous photo...

  • Aaron August 4, 2009 08:33 am

    It should be noted that you will likely want to adjust the curves of the foreground layer as well. In this example, the foreground is extremely bright compared to the comped in sky, which gives it a very unnatural look.

  • kanelstrand August 4, 2009 08:08 am

    Thank you for finally posting a GIMP tutorial!

Join Our Email Newsletter

Thanks for subscribing!


DPS offers a free weekly newsletter with: 
1. new photography tutorials and tips
2. latest photography assignments
3. photo competitions and prizes

Enter your email below to subscribe.
Email:
 
 
Get DAILY free tips, news and reviews via our RSS feed