In Depth: Keying: Pre-Processing Greenscreen Footage for Keying

News, Tutorial, In Depth Jan 16, 2014 at 01:10 PM

Welcome to second installation of Toolfarm’s In Depth series on keying. If your greenscreen footage didn’t turn out as perfectly as you had hoped, here are some things that you can do to fix problems and not create new ones.

Greenscreen Pre-Process

Introduction

Imagine this scenario: You light your greenscreen just right. Your camera settings were spot on. The lighting is even. There is not much noise. Shadows are not a problem. because your actor is standing at the right distance from your greenscreen. You don't have any spill. You have saved gobs of time and stress because you shoot it properly. 

Oh wait! Your footage is not perfect? You've gotten footage shot by someone else. No? You shot it and you just don't know what you're doing because you're an editor, not a D.P. You'll learn how to do it right with experience. I know, a lot of video editors and motion graphics artists are now expected to do it all. I feel for you. You're used to sitting behind a computer and you're suddenly thrown into a studio. You will need to fix it in post.

See part 1 in this series:
In Depth: Keying: Introduction & Frequently Asked Questions about Shooting Greenscreen

Pre-processing Greenscreen Footage (AKA Fixing problems before you key)

As tempting as it is to just start applying keys when you have your green screen footage in your NLE, there are some things that you may need to do to prepare footage with problems for the process. Noticed that I used the word "may". Not all steps are necessary and it will depend on the problems in your footage. These steps will hopefully improve your footage enough that you can end up with a good quality key in the end, and speed up your workflow and your render times.

Remove Field Interlacing

Luckily, I don't deal with field issues much these days since I mainly work with progressively shot footage.

Warning, this is Deinterlacing 101. If you have to work with footage with fields, you will need to remove field interlacing before keying. Yes, you can key interlaced fields, but if you're shooting vertically and plan to rotate or scale interlaced footage, you're inviting a mess of problems. Some people may argue that you're removing half of the resolution of footage by removing fields, and this is, in fact, true. This is a huge benefit of working with progressively shot footage – you don't lose half your resolution when you remove field interlacing. However, have you ever tried to key interlaced footage? It can be done, but it's a mess.

fields

deinterlaced fields

The right portion of the image has those tell-tale “comb teeth”. The video scaled 200% to accentuate the issue.

To remove field interlacing, you must first determine the field order. DV NTSC is always lower field first, while HD 1080i is upper field first. Progressive video, as explained earlier, has no fields, so if you can shoot progressive, you should!

Want to know more about determining field order?

Check out Creating Motion Graphics with After Effects by Chris & Trish Meyer for great tips on determining field order.

RE:Vision Effects FieldsKit - If you need a stronger tool, FieldsKit allows for many more field separation and pull down options than After Effects built-in options. FieldsKit works with After Effects, Premiere Pro, Final Cut Pro, Combustion and other After Effects compatible products.

Boris Continuum Deinterlace is included with both Boris Continuum Complete and the Boris Continuum Unit: Film Style.

If you're converting to 24fps, check out Red Giant Frames. Start with regular interlaced video, then apply Red Giant Frames' sophisticated algorithms for a smoother, professional de-interlaced look of 24p film. 

Denoise / Degrain / Deartifact Footage

You will get cleaner keys if you denoise your footage first. Noise can come from poor lighting, JPEG and other types of compression, film grain or half-tone patterns. Noise can even be induced by some filters and plug-ins. In DV footage, blue will almost always be the noisiest channel while green is the cleanest channel. 

rgb

The noise per channel is obvious when each channel is shown side by side in a quadrant. 1. RGB, 2. Red channel, 3. Green channel. 4. Blue channel. (Footage credit: Angie Mistretta/Toolfarm - Professional Keying with Keylight from Toolfarm Expert Series, Toolfarm Price: $39.90, MSRP: $42.00). Also used in Plug-in to After Effects, Ch. 14.)

So, what can you do with that information to make noise removal better?

Hot Workflow Tip!

In After Effects you can view the full RGB and single channels at the time.

To do this "use the pull down menu at the top of the Composition panel and select New Comp Viewer. A new tab with the same video will open along the top of the Composition panel. Click to lock one of them and drag the other to the left side of the Composition panel, until the side of the window highlights. Let it go and you should see two videos side by side. Command+Option+Shift+N will split the panel in one click!" You can do this with all 3 color channels and RGB as well.

This hot workflow tip is an excerpt from Plug-in to After Effects.

Noise Reduction Tips (Read more here!)

  1. Always use a light touch and do not use degrain or denoise plug-ins too heavily. 
    It is often better to leave some noise in your footage than to over process and lose detail in your shot. Just because you can denoise your footage doesn't mean you should!
  2. If you have the option to denoise per channel, that is the best option. If you take a look at the separate RGB channels, it's highly likely that your blue channel has the most noise. Removing more noise on the blue channel (or wherever your noise may be) will help keep the detail in your footage.
  3. Sampling areas for degraining. If your plug-in allows for choosing your own sampling, like the After Effects Remove Grain plug-in and Cinnafilm Dark Energy Anti-Matter, choose an area that doesn't have texture. For example, if you have a shot of clear sky, the ocean and sand, you would want to sample noise from the sky, where the color is as even as possible. If you take a sample from an area with texture, like sand or moving water, the filters will reproduce that texture.

These tips come from a two part In Depth Article I wrote a few months ago on Noise/Grain plug-ins.

A Pre-Process Preset by Mats Olsen

I learned a technique for lessening jaggy edges from my friend Angie Mistretta, who did some training for us at Toolfarm. The technique involved using Channel Combiner, Channel Blur and then Channel Combiner again. I was going to include it but I wanted to figure out why it worked the way it did. Google sent me to a 2004 post on aenhancers.com about a preset made by Mats Olsson. It basically includes exactly what I was going to explain.

Read: A good keyer for DV (using Keylight)

Download Mats Olsson Preset here

The are a couple of things about this preset that I should give you a heads up on.

  1. Depending on the version of After Effects you're using, the preset tries to link to an obsolete version of Keylight. You'll likely need to replace it with the current version Keylight in After Effects. Just keep the old one in so that you can copy the settings. 
  2. Channel Combiner is an 8-bit effect, which should not cause any problems, but you'll see a little yield sign warning you of this in the Effect Controls panel. 

There are many plug-ins and filters for noise reduction. indicates my favorite

Even Out Your Greenscreen & Brighten your Green

Do you have unevenly lit footage? Does the lighting shift around your actor? There are plug-ins and techniques that can even out and brighten the green and make it easier to key.

This is another step that is not needed much of the time because of the use of garbage mattes. I'll go into garbage mattes in detail in a future article. If you do need to even out your greenscreen, make sure that you do not adjust foreground colors that affect your actor's skin and clothing. Take screen shots of before and after and toggle them on and off if you need to. Also, watch your edges. You don't want them to become steppy. There's no point in making something easier to key if it's just going to make your key look steppy and discolored anyway!

uneven lighting

Notice how the light levels fade as it moves toward the floor.

In the example above, the luminance level is much brighter around his head than it is around his shorts. There are some tricks you can use to make this less of a gradient. It's just very important that you make sure that you don't affect your edges and make them jaggy or affect the color of your footage. If you have a lot of spill, you may not be able to do much to even out your greenscreen because you would be affecting your footage as well as the greenscreen. There will be some experimentation that will need to take place to get it just right.

even

On this example, I've used several of the preprocess techniques to reduce noise, even out the greenscreen and brighten it up.

Yes, that is a marked difference! I did go a bit over the top with it for the purpose of demonstration, but allow me to explain the technique. Reduce, deartifact, smooth.

  1. Reduce Noise. I used ABSoft Neat Video Pro Reduce Noise.
  2. Deartifact. This HDV footage needed it, some will not. I used Red Giant Key Correct Deartifactor.
  3. There are a couple of ways to smooth the greenscreen lighting. I used Red Giant Key Correct Smooth Screen.

Below is a tutorial from 8bitdigitaltv about preprocessing your footage to make it easier to key. They have an interesting technique that uses the Selective Color filter that ships with After Effects.

Remove Spill

Spill is green color that is reflected off of your greenscreen and is cast onto your actor. Depending on the your actor's hair, skin and wardrobe colors and reflectivity, spill can be a big problem! It can be very easy to fix, or difficult on finely detailed, extremely reflective or semi-transparent areas.

Spill
The example above is from the Green Screen Plates archive. The actress has noticeable spill on her coat, skin and her fancy strappy heels.

I am not going to go into spill removal here because I have an upcoming article in this series that is dedicated entirely to spill. Although color correction is not recommended at this point either, spill removal should not be a problem. You're just removing the green, after all, and your shot will be composited.

A Few Spill Suppressor plug-ins:

Stay tuned for a full-length article dedicated to spill removal, with lots of examples and a few good tricks!

Create Garbage Mattes

In my book Greenscreen Made Easy, I talk quite a bit about garbage mattes. "A garbage matte is a loose animated mask around your foreground footage to exclude areas of your footage you do not want to keep, like uneven greenscreen lighting, shadows, tracking dots, props, wires and rigging. Using garbage mattes limits the amount of green that your keyer will have to process, speeding up your keying process. You'll get faster keys with less heavy-handed adjustments. " With the use of a garbage matte, you may not need to bother to make your greenscreen color smoother.

garbage matte

Here is a garbage matte drawn in After Effects.

Garbage mattes are too important to just gloss over in an article like this so I plan to dive deep in the next article, along with the process of creating procedural mattes with core mattes, a mutli-matte technique that will allow you to divide and conquer problem areas in your footage..

What NOT to Do

Now that you've learned a few things you can do to improve the quality of your footage, here are a few tips on how to not make things worse for yourself in the post-production process.

Don't Over-process Your Footage

Don't remove too much noise so that your footage is blurry. Don't remove so much spill from your actor that it changes their skin tones. Don't even out your greenscreen if it doesn't need it. You'll only end up creating jaggy edges.

Don't Change Pixel Aspect Ratio Before Keying

Pixel aspect ratio (PAR) is how square and non-square pixels look on your computer.

Pixel Aspect Ratio

Hot Tip for working with non-square PAR

Use a broadcast video monitor to view output from your workstation, so that you can see your final work with pixel aspect differences and accurate color representation.

If you're not great at math

If you can't figure it out, try this nifty Pixel Aspect Ratio Calculator.

If you're working in square pixels but your footage is HDV, D1 or some other non-square format, key before you change your pixel aspect ratio. Rick Gerard talks about this in an old post on the Adobe forums. "If you have some particularly difficult green screen footage shot on HDV or DVCPRO HD for for example you may want to pull your key in a comp that matches the footage so that the keying can work with the original pixels but that's the only time that you may gain a very slight advantage using a non square pixel comp for production. I've never had the need." You also do not want to scale before keying, because scaling up can cause stretching and smearing, making footage more difficult to key. 

Learn more about Pixel Aspect Ratio

Don't Color Correct Yet

If your colors are a bit off, don't be too tempted to adjust them here. Wait until you're compositing with your background plates to color correct. Some plug-ins can degrade your footage and the idea is to keep your footage as pristine and untouched as possible.

Summary

I know it's not the most fun job in the world, but if you end up with less than perfect greenscreen footage to work with, it's not the end of the world. Not everything can be fixed but I do believe a lot of it can be salvageable, and even good. Hopefully, your key will look great in the end and no one will even know that you had any problems.

In the next installment of this Toolfarm In Depth series on greenscreen, I will talk about garbage mattes. Then I'll talk about procedural mattes, a method to divide and conquer problem areas during your key. I still have a few topics to cover in this series, including spill suppression, the keyers, and compositing your foreground and background plates.

Also, thanks again to Jason James, who gave me a whole bunch of greenscreen footage for my book Plug-in to After Effects. 

Posted by Michele Yamazaki

TAGS

Comments

You Must Be Logged In to Comment.