ADOBE AFTER EFFECTS: Forum Expressions Tutorials Creative Cloud

Sky Replacement

COW Forums : Adobe After Effects

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
Chris TarrozaSky Replacement
by on Feb 15, 2012 at 10:13:08 pm

Below is a clip that I need to do some sky replacement on.

I have already tried following video copilot's advanced sky replacement tutorial with subpar results. The edges on the trees, especially the ones far back, were really bad. Also, his gloves and the shiny reflections off the shaft get lost. I used rotobrush to try to bring them back in but it just wasn't clean enough.

This is what I have as of now:

I used the whole luma matte method from Kramer's tutorial but I also have Red Giant's keying suite. Maybe that could give me better results but I'm pretty unfamiliar with the package.

Any help would be greatly appreciated.

Return to posts index

Dave LaRondeRe: Sky Replacement
by on Feb 15, 2012 at 10:51:09 pm

That's going to be tough. I made that same mistake once shooting intentionally against an overcast sky, assuming I could cleanly key out leaves. It was a train wreck that was only marginally acceptable.

Within the last week or so Andrew Sommers outlined a procedure in this forum for keying a subject against black, a practice I strongly advise against. Apparently, he can get acceptable results with it. You might borrow some of his techniques for dealing with your leaves: similar problems, y'know.

Dave LaRonde
Sr. Promotion Producer
KCRG-TV (ABC) Cedar Rapids, IA

Return to posts index

Kevin CampRe: Sky Replacement
by on Feb 15, 2012 at 11:31:43 pm

about the best way i've found to key white out is to multiply the rgb channels and use that as the basis for a matte.

to do this, take your footage into a new comp and add the channel combiner effect. set 'from' to 'red' and 'to' to lightness only.

duplicate that footage layer (with the effect) and set 'from' to green and also set the blending mode for the layer to multiply.

duplicate that layer and then change 'from' to blue.

you should have a black and white matte that is getting close to what would work as a luma matte. to get closer, add an adjustment layer with levels and get the blacks blacker and the whites whiter. you'll also want to add a black solid and mask the areas that need to be filled in. if needed, add a white solid and mask in an white areas.

then bring that matte comp and the original footage into a new comp and add an effect like set matte to the footage, choosing the matte layer as the matte. you can soften the matte a bit by adding channel blur, de-fringe by adding remove color matting (setting to the overcast sky color) and choke it a bit with simple choker.

you'll also want to look into light wrap techniques, and color adjust a bit to bring some blue into the image to fit with the new sky.

Kevin Camp
Senior Designer

Return to posts index

Declan SmithRe: Sky Replacement
by on Feb 15, 2012 at 11:47:03 pm

I downloaded your clip and managed to replace the sky with quite good results by masking the lower cloud layer and feathering it 363 pixels (image below shows he mask line), then using multiply as the transfer mode on the video footage. You will need to separate the golfers arm and rotoscope the golf club for the few frames it is in. I literally spent about 4 minutes on the clip below so obviously it would look better with a bit more tweeking and attention to luma balance between the foreground and background. I was more concerned with the leaves / edges, which are passable with this method.

Declan Smith
FCS3 / After Effects CS5 / Combustion / Canon 7D / Canon XL2

Return to posts index

Spencer TweedRe: Sky Replacement
by on Feb 15, 2012 at 11:52:29 pm

I think this should honestly be a pretty simple shot to do! (good job locking off your camera btw...)

Here's how I'd tackle it:

1. Duplicate your footage, so you now have 2 layers.
2. On the top layer apply the "Extract" plug-in.
3. Solo the layer and pull the Black Point up until you only have the sky. (push it until you lose your leaves - your alpha channel will be VERY crunchy, but that'll be fixed soon.)
4. Adjust the Black Softness until your edges are less crunchy, add a Channel Blur and blur the alpha channel a few pixels or so if needed. It is okay to get a little bit of trees and stuff in the layer at this point, that'll still look OK in the final comp.
5. You may need to use the pen tool and add a mask to the layer to get rid of a few specific troublesome spots (like his shoes).
6. Un-solo the layer and sandwich your sky between the two layers in your composition.
7. Set the track-matte of your sky to "Alpha Matte" so that it only appears where your first layer is.
8. Play with the blending mode of your sky until it looks good! Start with "Multiply" and tweak the opacity to see if that helps. Sometimes I also like to duplicate the top two layers and combine multiple blending modes.

- Spencer

Return to posts index

Chris TarrozaRe: Sky Replacement
by on Feb 16, 2012 at 6:42:10 pm

Thanks everyone.

I did a combination of Declan's and Spencer's methods, plus a little more tweaking. This is what I have.

Still far from perfect, we'll see what the client thinks, though I'm not too thrilled about it. The trees on the right as well as the far trees are a bit too lost for me.

Return to posts index

Spencer TweedRe: Sky Replacement
by on Feb 16, 2012 at 11:06:00 pm

Hey Chris,

It looks much better! I didn't realize at first just how blown out that sky is... You are missing a lot of data in those trees due to clipping.

At this point I only see one last solution - layer in some of your own trees. Luckily your lighting is really easy to work with, so you can probably find some good trees on Flickr that are in the public domain. Cut those out using this technique:

, match the color and just drop them over the right side of your frame. It'll take a lot of work, but that's the only way I see of fixing your composition at this point.

- Spencer

Return to posts index

Alberto BrancoliniRe: Sky Replacement
by on Apr 16, 2012 at 1:55:15 pm


I read the thread and decided to go through a quick experiment.

Back in september, an European project took me to Bosnia to give account of the things going on.
This shot was grasped casually and had never been meant to go under post.
However, I've found interesting to manage a sky replacement, just to see what is possible to achieve in extreme situations.

I followed Spencer's method and I quickly came out with this.
I just like to know what you think of it, and what's your advice for improving.
Consider I know there's an unpleasant trasparency in the front of the girl on the right, and that tracking (with Mocha) is far from perfect.

Panasonic SDT-750 in Automatic Mode.
HA preset (1920*1080, 17Mbps).
Converted in ProRes to work with it.

I also post the original.


Return to posts index

Spencer TweedRe: Sky Replacement
by on May 29, 2012 at 4:36:32 am

Looks great! As you said, the tracking needs work. But that's all I see to fix in the shot!

- Spencer

Return to posts index

<< PREVIOUS   •   VIEW ALL   •   PRINT   •   NEXT >>
© 2017 All Rights Reserved