ADOBE AFTER EFFECTS: Forum Expressions Tutorials Creative Cloud

Creating a luma matte from subject against black background

COW Forums : Adobe After Effects

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
Brian Murphy
Creating a luma matte from subject against black background
on Jan 30, 2012 at 6:02:13 pm

All,

I need to take footage of a subject against a pitch black background and create a luma matte from this. If I mess with the levels, I will always end up with a thin black line around whatever I am transferring into the finished matte. Anyone know a way to take the image against the black and simply turn it white with as few steps as possible?

Thanks much!
Brian



Return to posts index

Paul Roper
Re: Creating a luma matte from subject against black background
on Jan 30, 2012 at 6:40:51 pm

It's hard to give advice without seeing your footage, but I'll give it a go.

I assume you've got your white-object-on-a-black-background "matte" footage on the layer above your "fill" layer, and "Luma" set on your track matte mode.

The first thing I'd try is just applying a levels effect to your matte layer; assuming your blacks are black and your whites are white, you can grow/shrink the edges a little by adjusting the gamma setting.

Alternatively, if you want to try something more drastic, use the Minimax effect - a Minimum operation will shrink the matte, Maximum will grow it by the number of pixels specified in Radius.

- Paul


Return to posts index

Juan Manuel
Re: Creating a luma matte from subject against black background
on Jan 30, 2012 at 6:51:23 pm

If you mean you end up with a black halo around your subject, you'll need to use a combination of mask feather and matte choker to remove it


Return to posts index


Kevin Reiner
Re: Creating a luma matte from subject against black background
on Jan 30, 2012 at 7:34:17 pm

Maybe try this:
1. Precomp your footage.
2. Add a white solid and place it under your video.
3. Add curves to your video and crush the blacks, but try avoid making anything in your foreground image too dark.
3. Add Luma Key - Key Out Darker.
4. Play with Luma Key settings until it looks right.
5. Might want to mess with Matte choker effect on top of the key.
6. Add fill and turn it to black.
7. Go back to main comp and use this as a luma matte or reverse luma matte.

Mac Pro 2 x 3 GHz 6-Core Intel Xeon
32GB Memory
Dual-channel 4Gb Fibre Channel PCI Express card
Dell Display (23" flat panel)
ATI Radeon HD 5770
AJA Kona LSi SD/HD capture card
Rourke 16 TB
Flanders 2460

SOFTWARE
Mac OS X 10.6.5
FCP 7
After Effects CS5
Boris Continuum
Sapphire Plug Ins
All Trapcode Plugs
Zaxwerks Invig


Return to posts index

Dave LaRonde
Re: Creating a luma matte from subject against black background
on Jan 30, 2012 at 10:21:37 pm

Like Paul Roper said, it's tough to say without seeing the footage. The big problem lies at the edges: you tend to lose detail. If it's the subject has dark, wispy hair or a it's a reflective surface with a dark patch at the edge you could be talking a lot of lost detail.

That's why the Good Lord inspired someone to invent chroma keying, y'know.

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


Return to posts index

Kevin Reiner
Re: Creating a luma matte from subject against black background
on Jan 30, 2012 at 10:37:00 pm

I agree with Dave. The best route would be chroma keying. I was assuming that the footage had already been shot, but on second reading it doesn't appear that it has. Is chromakey out of the equation?

Mac Pro 2 x 3 GHz 6-Core Intel Xeon
32GB Memory
Dual-channel 4Gb Fibre Channel PCI Express card
Dell Display (23" flat panel)
ATI Radeon HD 5770
AJA Kona LSi SD/HD capture card
Rourke 16 TB
Flanders 2460

SOFTWARE
Mac OS X 10.6.5
FCP 7
After Effects CS5
Boris Continuum
Sapphire Plug Ins
All Trapcode Plugs
Zaxwerks Invig


Return to posts index


Andrew Somers
Re: Creating a luma matte from subject against black background
on Feb 1, 2012 at 1:42:04 am

To answer the question you asked, use a matte choker, such as "Simple Choker", plus blur, and if needed, masks. Mocha can be very helpful here.

In CS5 and later, look at using Rotobrushes and refine matte - though personally I find these new tools frustrating to use:

http://help.adobe.com/en_US/aftereffects/cs/using/WS3bf812c123007fb8513559d...



To answer the question you didn't ask - which I am assuming is "how to get a good comp with black screen", I'll continue - but first, can you post a still image of the clip you are trying to comp?



Black screen can be the ideal background for some elements intended for compositing - for instance, transparent elements such as grey smoke, water, or steam can be great against black screen as you can often composite them by simply using the additive transfer mode (when working in linear 32-bit space, or "screen" in non-linear spaces).

Black screen can also bee useful for solid objects that have sufficient lighting and limited dark areas. But a typical mistake here is to try and use the luma key plugin, or to just set a layer with levels clipped and use it to luma key.


INSTEAD, for solid objects try the hold-out matte approach.

STEPS:

1) Work in 32 bit LINEAR color space.

2) Create a comp with your background plate.

3) On top of your background plate, place TWO layers of the black screen element.

4) On the middle black screen layer, place the following effects, in this order:

Top: Levels Individual Controls - name it "invert and matte"
Middle: Blur - name it "matte soften"
Bottom: Levels - name it "matte choke"


5) Adjust as so:

* Set the top Levels, named "invert/matte", so that the black-screen area is at 1.0 value (32 bit mode white). Adjust so that the brightest area of the subject is 0.0 (black). Set the output BLACK level to 1.0, and the output white level to 0.0. Set "clip" to ON for both black and white. Using the pickwhip, connect the INPUT while level to the input black level, then adjust the input black level until the black screen is clipped white, and you are left with a black solid for the subject.

* *Optionally* drop in a TINT effect to make the clip greyscale *or* use the pickwhip to connect the input white/black for each of the RGB channels, and clip each color independently.

* Set the Blur effect to 10 pixels initially..

* Leave the bottom Levels alone for now.

6) Set this layer to MULTIPLY transfer mode.This will put a solid black area on the background plate.

7) Now, with the TOP black-screen layer, set to ADD transfer mode. If necessary, add a garbage mask, and a levels control to match the background plate.

8) Now the magic touch - Adjust the GAMMA (only) on the bottom Levels (matte choke) on the middle black-screen layer to get a clean edge. Gamma will work with BLUR, to adjust the spread/choke of the cutout matte. Adjust the blur pixels in association with gamma, to get the matte edge that you like.




SInce you are ADDing the topmost layer, you can adjust edge transparency without clipping the edge of the foreground element.

If your subject is a combination of solid and transparent objects, you will need to add a mask to the middle black-screen layer so that the areas of transparency are clipped to white.

To adjust the density of the transparent portions, duplicate the middle layer, and use the same mask to set all but the transparency region to white. Adjusting the opacity of this layer will adjust the density of the transparency.


It should be obvious that black-screen will not work well when the the subject has dark areas that are within clipping distance of the black screen area. Also, this method tends to break down with 8 bit images. Ideally, you want to be capturing at least in 10 bit LOG, or 12 or 16 bit linear (RAW), with the black-screen at least a stop below the darkest values in the subject.


Return to posts index

Kevin Reiner
Re: Creating a luma matte from subject against black background
on Feb 1, 2012 at 2:50:23 pm

Learn something everyday. Thanks Andrew.

So do you typically use this method when keying out such elements as smoke or water? We rarely use black background, but occasionally for such elements. Good to know a new technique when those time come up.

-Reiner

Mac Pro 2 x 3 GHz 6-Core Intel Xeon
32GB Memory
Dual-channel 4Gb Fibre Channel PCI Express card
Dell Display (23" flat panel)
ATI Radeon HD 5770
AJA Kona LSi SD/HD capture card
Rourke 16 TB
Flanders 2460

SOFTWARE
Mac OS X 10.6.5
FCP 7
After Effects CS5
Boris Continuum
Sapphire Plug Ins
All Trapcode Plugs
Zaxwerks Invig


Return to posts index

Andrew Somers
Re: Creating a luma matte from subject against black background
on Feb 2, 2012 at 7:03:46 am

Smoke or steam when backlit and bright, such that it would be served well by additive transfer, or additive transfer *combined* with multiply. You need the MULT layer to reduce brightness and transparency.

Also, bright elements are especially good for black screen - sparks for instance add especially well in 32-bit linear space. In additive xfer these kinds of elements are essentially self-keying.

I'm setting up to do this right now to augment a shot with a cutting torch/sparks. (An acetylene torch could not be used too close to the actors on the day for safety.)

So, I'm going to shoot a real torch element against duvetyne, cutting sheet metal that has been painted flat black. The sheet metal will be oriented close to the orientation of the steel being cut in the actual scene, and shot as a static lockdown (the nature of the shot should allow cheating perspective, even though the original camera was not moving as nodal). Then tracked and comped into the scene using ADD.

The *really cool* thing about working in 32-bit linear is the ability to "ADD" and also combine ADD and MULTIPLY to really dial things "into" a shot.


Still, I don't mean in anyway to imply that black-screen replaces green/blue/red - it is a separate tool, with its own quirks and "usefulness curve". But the next time you need to comp backlit steam, or bright things like sparks and flames, or solid objects with low contrast I think you'll be happily surprised at how quickly you can dial in a comp.


Note also the "gamma/blur" technique I mention above can also be used in color key situations. Instead of doing the actual comping inside the keying plug-in (keylight, primatte, whatever), just use the plug in to create the matte(s), and then use gamma/blur, and COLOR/ADD/MULT transfer modes (and using precomps to pre-mult etc) for bringing it all in together. While this may sound more complicated (okay, it *is* more complicated), the level of control you gain is often worth it IMO.


Side note: IMO, Ultimatte Advantedge was the only plug-in that really worked well as an "all in one" comping solution, but sadly it is not longer supported, and even if it was, it was *DOG* slow to render. Ultimatte is now focused only on their hardware solutions.


Return to posts index

<< PREVIOUS   •   VIEW ALL   •   PRINT   •   NEXT >>
© 2017 CreativeCOW.net All Rights Reserved
[TOP]