Page 1 of 1

Why does color effect alpha?

PostPosted: Sat Mar 02, 2024 9:57 am
by EthicalEgret
Why does the color of my background change its effective alpha? If I set the color to pure white, alpha does nothing. Why?
wtf.png
wtf.png (376.3 KiB) Viewed 639 times

Re: Why does color effect alpha?

PostPosted: Sat Mar 02, 2024 6:04 pm
by Bryan Ray
Alpha 0 doesn't make RGB invisible unless you multiply by the alpha channel. If it did, you couldn't have things like glows and flares, which are 100% transmissive but still have color.


Re: Why does color effect alpha?

PostPosted: Mon Mar 04, 2024 8:01 am
by Olivier MATHIEU
Fusion Viewers try to show you pixel with positive RGB value and near zero Alpha.... for explicite reasons given previously by Brian.
It seem natural coming from "other" software, but it's very convenient

Re: Why does color effect alpha?

PostPosted: Mon Mar 04, 2024 8:54 am
by KrunoSmithy
Bryan Ray wrote:Alpha 0 doesn't make RGB invisible unless you multiply by the alpha channel. If it did, you couldn't have things like glows and flares, which are 100% transmissive but still have color.



This. Yes.

From the Fusion manual:

Most nodes that require you to explicitly deal with the state of premultiplication of an RGBA image have a “Pre-Divide, Post-Multiply” checkbox. This includes simple color correction nodes such as Brightness Contrast and Color Curves, as well as the Color Correct node, which has the “Pre-Divide/ Post-Multiply ” checkbox in the Options panel of its Inspector settings.

This checkbox allows you to connect an RGBA premultiplied image to the node and perform a color correction operation. It takes the RGBA image input, performs a divide operation to remove the semi- transparency and then performs a multiplication operation before outputting the color corrected image. This way, the color correction is done using a nonpremultiplied image but the resulting output is a Merge-friendly premultiplied image.

Selecting the Pre-Divide/Post-Multiply checkbox will cause the image’s pixel values to be divided by the alpha values prior to this conversion, and then re-multiplied by the alpha value after this conversion. This helps to avoid the creation of illegally additive images, particularly around the edges of a blue/green key or when working with 3D rendered objects.

Controlling Premultiplication With Alpha Divide and Alpha Multiply

The Alpha Divide and Alpha Multiply nodes, found in the Matte category of the Effects Library, are available when multiple operations in a row expect a “straight” alpha channel. Instead of performing repetitive Pre-Divide/Post Multiply operations on each node, you can use these two nodes to book- end the other nodes. Simply add the Alpha Divide node when you want the RGBA image data not to be premultiplied, and add the Alpha Multiply node when you want the image data to be premultiplied again. For example, if you’re using third-party OFX nodes that make color adjustments, you may need to control premultiplication before and after such an adjustment manually.

.........................

Transparency and Color - Alpha Multiplication in ResolveFusion