Navigation
  • Home
  • Recent
  • Most Active
  • Popular
  • Blog
  • Credits
  • RSS
  •   Interaction
  • Register
  • Statistics
  •   Help
  • Suggestions
  • Contact Us
  • How to Edit
  • Help



  • [Edit]


    In computer graphics, alpha compositing is often useful to render image elements in separate passes, and then combine the resulting multiple 2D images into a single, final image in a process called compositing. For example, compositing is used extensively when combining computer rendered image elements with live footage.
    In order to correctly combine these image elements, it is necessary to keep, for each element, an associated matte. This matte contains the coverage information - the shape of the geometry being drawn - and allows us to distinguish between parts of the image where the geometry was actually drawn and other parts of the image which are empty.

    To store this matte information, the concept of an alpha channel was introduced by A.R.Smith in the late 1970s, and fully developed in the 1984 paper Compositing Digital Images, by Thomas Porter and Tom Duff. In a 2D image element which stores a color for each pixel, an additional value is stored in the alpha channel containing a value between 0 and 1. A value of 0 means that the pixel does not have any coverage information; i.e. there was no color contribution from any geometry because the geometry did not overlap this pixel. A value of 1 means that the pixel is fully opaque because the geometry completely overlapped the pixel.

    If an alpha channel is used in an image, it is common to also multiply the color by the alpha value, in order to save on additional
    multiplications during the compositing process. This is usually referred to as premultiplied alpha. Thus, assuming that the pixel color is expressed using RGB triples, a pixel value of (0.0, 0.5, 0.0, 0.5) implies a pixel which is fully green and has 50% coverage.

    With the existence of an alpha channel, it is then easy to express useful compositing image operations, using a compositing algebra defined in the Duff and Porter paper. For example, given two image elements A and B, the most common compositing operation is to combine the images such that A appears in the foreground and B appears in the background; this can be expressed as A over B. In addition to over, Porter and Duff defined the compositing operators in, out, atop, and xor (and the reverse operators rover, rin, rout, and ratop) from a consideration of choices in blending the colors of two pixels when their coverage is, conceptually, overlaid orthogonally:



    The over operator is, in effect, the normal painting operation (see Painter's algorithm). The in operator is the alpha compositing equivalent of clipping.

    As an example, the over operator can be accomplished by applying the following formula to each pixel value:

    C_o = C_a + C_b imes left(1 - alpha_a

    ight)

    alpha_o = alpha_a + alpha_b imes left(1 - alpha_a

    ight)

    where Co is the result of the operation, Ca is the color of the pixel in element A, Cb is the color of the pixel in element B, and αa and αb are the alpha of the pixels in elements A and B respectively. This assumes that the pixel colors of each element have already been premultiplied by alpha.

    Alpha compositing on images can be done in most graphics programs.


        Alpha compositing
            Alpha Blending
            See also

    top

    Alpha Blending
    Alpha blending is a convex combination of two colors allowing for transparency effects in computer graphics. The value of alpha in the color code ranges from 0.0 to 1.0, where 0.0 represents a fully transparent color, and 1.0 represents a fully opaque color.

    The value of the resulting color when color Value1 with an alpha value of Alpha is drawn over an opaque background of color Value0 is given by:

    Value = Value0(1.0 - Alpha) + Value1(Alpha)


    The alpha component may be used to blend to red, green and blue components equally, as in 32-bit RGBA, or, alternatively, there may be three alpha values specified corresponding to each of the primary colors for spectral color filtering.

    Alpha blending is natively supported by these operating systems/GUIs:

    top

    See also




     
    Search more:
     

       
    Source Privacy License Download Contact Us Atlas
    Scientus.org Dictionary (Yet Another Wiki) RC : 1.39
    MIT OpenCourseWare
    This article is licensed under the GNU Free Documentation License [copyleft]. It uses material from the Wikipedia article "Alpha compositing". link