ADOBE AFTER EFFECTS: Forum Expressions Tutorials Podcasts Creative Cloud

Keylight "Unpremultiply Result"

COW Forums : Adobe After Effects

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
Oliver de MorasséKeylight "Unpremultiply Result"
by on Mar 5, 2012 at 8:31:50 am

I have some footage of a person shot against a green screen. Using keylight, I can obtain a nice key, however, the person has a slight white line around them. When I disable "Unpremulitply Result" in keylight, the white outline disappears. What exactly is "Unpremulitply Result" and is this what I should be doing to remove the white outline?

Thanks for your comments.

Return to posts index

Steve BlackerRe: Keylight "Unpremultiply Result"
by on Mar 5, 2012 at 6:13:10 pm

From the Keylight manual:

Use this switch to set the premultiplication of the RGB channels in the output image. If turned off, the RGB values will be multiplied by the alpha channel, thus transparent areas are always black, and semi-transparent areas are dark. If turned on, the RGB values of the output image will be not multiplied by the alpha, thus semi-transparent pixels will have full brightness in the RGB channels.

If colour correcting the image after applying Keylight you should switch on Unpremultiply Result.

If you're getting a white edge, I would try shrinking the matte a little in keylight, or try a matte choker first.

Return to posts index

Oliver de MorasséRe: Keylight "Unpremultiply Result"
by on Mar 7, 2012 at 1:49:05 pm

Thanks for your feedback Steve. What do you mean with "shrinking the matte a little in keylight" - the "screen matte" / "Screen Shrink/Grow" value as negative? Would you use the "matte choker" after keylight?

FYI, we do use a little color correction after Keylight (levels, curves etc.) - however, the end results with turning "Unpremultiply Result" off, seem to be better than playing with the matte options. Is there anything against turning "Unpremultiply Result" off?

Return to posts index

Steve BlackerRe: Keylight "Unpremultiply Result"
by on Mar 7, 2012 at 2:55:21 pm

Yes, but whether or not I'd use a matte choker would totally depend on the footage. And yes, I was referring to shrinking the screen matte inside Keylight, as that will usually help get rid of any nasty edges. But there are so many factors in getting a good key - your footage format/quality being the first, and then all the settings in Keylight. It would help to see a screenshot of your key and a screenshot of your keylight settings. Although I suspect it might be your source footage that's the issue.

Return to posts index

Dave LaRondeRe: Keylight "Unpremultiply Result"
by on Mar 6, 2012 at 7:44:08 pm

It would also help to know the camera used to shoot this and the codec of the footage.

Here's a stab in the dark: HDV makes notoriously poor chroma keys. It has to do with the codec, and there is little that can be done to improve it.

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

Return to posts index

Oliver de MorasséRe: Keylight "Unpremultiply Result"
by on Mar 7, 2012 at 1:57:25 pm

Thanks for your feedback Dave. I have tried different codecs:

- Using a Black Magic DeckLink SDI card connected to a Sony camcorder, we captured a "10 bit 4:2:2 YUV (AJA Video Systems Xena)" video

- Using a Panasonic camcorder we captured a "AVC (Component) High 4:2:2@L4.1 AVC-Intra 100" video

Both produce a small white halo around the subject when anaylsing the Red channel. Unchecking the "Unpremultiply Result" checkbox in Keylight, removes this white outline.

Any ideas?

Return to posts index

Chuck KollarsRe: Keylight "Unpremultiply Result"
by on Dec 21, 2015 at 7:05:32 pm

In a "premultiplied" image the three color channels (red/green/blue) are multiplied by the alpha channel _before_ the image is passed on or stored. Premultiplied images are produced by 3D modelling applications, and are increasingly finding their way into other CGI applications as well. Premultiplied images can often be handled internally in a faster and smaller way. They are often easier to render. They allow any of the inputs to a compositing step to be displayed separately (against a black background) with correct anti-aliasing. And they can readily produce more accurate colors for objects and operations that are affected by several nearby pixels (rather than just one pixel), such as light diffusion, some texture mapping, some reflections, and so forth. An image that is not "premultiplied" is called "unpremultiplied".

If a mismatch occurs though, it will almost always cause visible artifacts. If a premultiplied foreground image is imported into an application that was expecting unpremultiplied, by far the most frequent result is a dark or black fringe around the foreground. If an unpremultiplied foreground image is imported into an application that was expecting premultiplied, there may be a light or white fringe around the foreground, or the background may be either "ghosted" or overly bright. (In both cases the anti-aliasing is commonly not quite right too, but that's much harder to see.)

Mostly software applications handle this internally, so that within one application it generally "just works". Problems crop up mainly when an image is exported from one application and imported into another. That seems to be exactly what's happening here: apparently your application is expecting foreground inputs to be unpremultiplied. But Keylight by default is producing a premultiplied image, and so there's a mismatch, in your case signaled by a slight white line around the foreground. Telling Keylight to produce an unpremultiplied image instead is one way to eliminate the mismatch and so cause the problem to disappear. It's exactly the right thing to do.

(In most cases it's possible to instead "fixup" the mismatch artifacts. But doing so may take quite a bit of time and effort, and still won't produce quite as good a result as simply eliminating the mismatch in the first place.)

Return to posts index

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