Forum Replies Created

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • in reply to: Premultiplied questions. #206716
    augustzhuang
    Participant

    If you composite motion blur image or smoke or
    particle images, it will have some problem. And
    when you need to color correct the FG, it will sometimes
    have problems too.You can about below text from
    brinkmann’s book.

    You may come across the term ‘Premultiplied Image’, which refers to an image whose Red, Green and Blue channels have already been multiplied by a matte channel. This is almost always the type of element produced by 3D rendering software. You may also often wish to produce ‘Pre-Comped’, 4-channel elements that have already been pre-multiplied by their matte channel. You need to understand exactly how your compositing system deals with premultiplied elements. Some systems assume that the ‘Over’ operator will be fed such images by default, others may require that image and matte are brought in seperately and recombined before the ‘Over’ is performed. It is very important to understand that the relationship between image and matte can dramatically affect the results of an Over. Let’s look at some different scenarios. We’ll be using an example with a very soft-edged matte, since this is the most problematic situation.

    Consider Example 23. This is a premultiplied image over a background in a system that assumes you’re feeding it premultiplied images.

    is an Unpremultiplied image over a background in a system that assume you’re feeding it premultiplied images. Note that the foreground element, in areas where it’s matte is supposed to be Zero, is appearing as a ‘ghost’ image. If you were to check out the math of what is happening, you’ll see that in those areas of the result image, it is exactly the same as if we had simply added the two images together.

    Example 25 is a premultiplied image over a background in a system that assumes all images sent to it are not premultiplied. Such a system will automatically multiply the image by its matte channel. In this situation, we have effectively multiplied the image by its matte channel twice thereby darkening all areas of soft-edged matte. Consequently, there is a dark halo around the foreground.

    As you can see, dramatic problems can arise when you feed an Over something it doesn’t expect. The same sort of problems can arise when color-correcting premultiplied elements. In a premultiplied, 4-channel image, the image and the matte channels have a specific relationship that can cause compositing artifacts if altered.

    Because inevitably you will find yourself with a need to color-correct a premultiplied image, there is usually a tool on most systems to temporarily ‘undo’ the premultiplication, at least in the critical areas of the image. We will call refer to this tool by the rather unwieldy name of ‘Un-Premultiply’. Essentially, the tool re-divides the image by its own matte channel, which has the effect (except in areas where the matte is solid black, or zero) of boosting the areas which were attenuated by a partially transparent matte, back to approximately their original values. If your system does not have an explicit tool to perform this operation, you can hopefully use some other tool to ‘fake it’. For example, if there is a simple parsing language, you can do:
    R = R/M
    G = G/M
    B = B/M
    (and hope that you don’t get divide-by-zero errors).

    Once your image has been unpremultiplied, apply any necessary color-corrections. Then you can re-premultiply by the original matte channel, once again producing an element whose image-to-matte relationship is correct.

    NOTE: For slight colorcorrections, or when using images which have very hard-edged mattes, you may get perfectly acceptable results without going through this process. “If it looks correct, it is correct.


    in reply to: how to do things like " R=R/M, G=G/M, B=B/M", M me #206713
    augustzhuang
    Participant

    Thank you ,jeff.
    And could you please tell me
    where can I find some guide or
    tutorials about expressions? Because
    the contend in the discreet USER GUIDE
    is too simple. Thank you.

    in reply to: Inferno Z depth Question Please Help! #206673
    augustzhuang
    Participant

    I f you have a Shake or Maya Composit , you can use
    them to import the origin 3d rgb+z images, then use
    reorder to paste the z chunnel into the alpha chunnel,
    make a new sequence for Inferno to import.

    And the fate badness for Maya 3d image with Z chunnel
    is that they do not support motion blur, this always make
    me crazy.

Viewing 3 posts - 1 through 3 (of 3 total)