Forum Replies Created

  • Chuck Kollars

    December 21, 2015 at 7:05 pm in reply to: Keylight “Unpremultiply Result”

    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.)

We use anonymous cookies to give you the best experience we can.
Our Privacy policy | GDPR Policy