Les modes de fusion définissent la manière dont l’entrée et la sortie d’un module sont combinées (fusionnées) avant que la sortie finale du module ne soit transmise au module suivant dans le pixelpipe.
Classic blending modes, designed for display-referred RGB (constrained to 0-100%), implicitly define a fulcrum at 50% (gray) or 100% (white) in their algorithms, depending on the blend mode. Because scene-referred is not subject to these restrictions, this fulcrum needs to be explicitly defined by the user when performing blending operations in the “RGB (scene)” color space. The additional blend fulcrum parameter will be presented to the user when using one of these blend modes in this color space. The effect depends on the operator used. For example, values above the fulcrum might be brightened and values below darkened, or vice versa.
La sortie finale d’un module est calculée « par pixel » comme suit :
où « sortie_fusionnée » est une combinaison des images d’entrée et de sortie, selon le mode de fusion (ci-dessous), et « l’opacité » est définie « par pixel » par une combinaison du masque et du paramètre d’opacité globale. Une opacité de 0% produit une image identique à l’image d’entrée du module.
The reverse button (the polarity toggle next to the blend-mode selector) effectively reverses the roles of the input and output images in the ‘per-pixel’ computation:
where the blended_input is a combination of the output and input images, depending on the blend mode below where output and input image references are reversed. In “reversed” blend modes, an opacity of 0% outputs an image that is identical to the output image of the module.
Modes normaux
- normal
- The most commonly used blend mode, “normal” simply mixes input and output to an extent determined by the opacity parameter. This mode is commonly used to reduce the strength of a module’s effect by reducing the opacity. This is also usually the blend mode of choice when applying a module’s effect selectively with masks. This mode is also known as the “over” Porter-Duff alpha blending operator (see alpha compositing for more details).
- normal bounded
- not available in the “RGB (scene)” color space
- This blend mode is the same as “normal”, except that the input and output data are clamped to a particular min/max value range. Out-of-range values are effectively blocked and are not passed to subsequent modules. Sometimes this helps to prevent artifacts. However, in most cases (e.g. highly color-saturated extreme highlights) it is better to let unbound values travel through the pixelpipe to be properly handled later. The “normal” blend mode is therefore usually preferred.
Modes arithmétiques
- addition
- Add together the pixel values of the input and output images, lightening the output. When blending in the “RGB (scene)” color space, the pixel values of the output image are multiplied by a value proportional to the “blend fulcrum”.
- subtract
- Subtract the pixel value of the output from the input. When blending in the “RGB (scene)” color space, the pixel values of the output image are multiplied by a value proportional to the “blend fulcrum”. Pixel values less than 0 are set to 0.
- multiply
- Multiply the pixel values of the input and output together. When blending in display-referred color spaces, pixel values are between 0 and 1.0, the final output will be clamped and will always be darker. When blending in the “RGB (scene)” color space, this value is further multiplied by a value proportional to the “blend fulcrum”. In this case, values may be greater than 1.0 and therefore brighten the base image. This may have other side-effects, such as updating the white point in the filmic module.
La fusion multiplier simule un filtre optique à densité variable, où la densité est définie par la sortie du module. Elle a de nombreuses applications, de l’amélioration de l’éblouissement et du contraste local (lorsqu’elle est utilisée avec un filtre de flou ou un filtre passe-bas) à assombrir/éclaircir (dodging and burning) et aux améliorations du contraste global (lorsqu’elle est utilisée avec l’exposition). Le pivot définit le seuil d’intensité de sortie entre l’assombrissement et l’éclaircissement (toute valeur RVB inférieure au pivot s’assombrira).
- divide
- Divide the pixel values of the input by the output. When blending in the “RGB (scene)” color space, the pixel values of the output image are multiplied by a value proportional to the “blend fulcrum”.
Since this is the inverse of the multiply mode, it will darken where multiply brightens and vice versa. Everything else works in essentially the same way.
- screen
- not available in the “RGB (scene)” color space
- Invert the input and output pixel values, multiply those values together and invert the result. This yields approximately the opposite effect to “multiply” mode – the resulting image is usually brighter, and sometimes “washed out” in appearance.
- average
- Return the arithmetic mean of the input and output pixel values.
- difference
- Return the absolute difference between the input and output pixel values.
- geometric mean
- Return the square root of the product of the input and output pixel values.
- harmonic mean
- Return the product of the input and output pixel values, multiplied by 2 and divided by their sum.
Modes d’amélioration du contraste
Les modes suivants ne sont pas disponibles dans l’espace colorimétrique de fusion « RVB (scène) » car ils reposent sur une hypothèse de « 50% de gris moyen » qui ne s’applique qu’aux espaces colorimétriques non linéaires et relatif à l’affichage.
- overlay
- This mode combines the “multiply” and “screen” blend modes: The parts of the input where the output is brighter, become brighter; The parts of the image where the output is darker, become darker; Mid-gray is unaffected.
- softlight
- This mode is similar to “overlay”, except the results are softer and less bright.
- hardlight
- This mode is not related to “softlight” in anything but name. Like overlay mode it is a combination of “multiply” and “screen” modes and has a different effect above and below mid-gray. The results with hardlight blend mode tend to be quite intense and usually need to be combined with a reduced opacity.
- vividlight
- This mode is an extreme version of overlay/softlight. Values darker than mid-gray are darkened; Values brighter than mid-gray are brightened. You will probably need to tone down its effect by reducing the opacity
- linearlight
- This mode is similar to the effect of “vividlight”.
- pinlight
- This mode performs a darken and lighten blending simultaneously, removing mid-tones. It can result in artifacts such as patches and blotches.
Modes canaux de couleur
Canaux Lab
Les modes suivants sont uniquement disponibles pour la fusion dans l’espace colorimétrique Lab.
- Lab lightness
- Mix the lightness from the input and output images, while taking the color channels (a and b) unaltered from the input image. In contrast to “lightness” this blend mode does not involve any color space conversion and does not clamp any data. In some cases this blend mode is less prone to artifacts than “lightness”.
- canal a de LAB
- Fusionner le canal de couleur « a » de Lab à partir des images d’entrée et de sortie, tout en prenant pour les autres canaux ceux de l’image d’entrée sans les modifier.
- canal b de LAB
- Fusionner le canal de couleur « b » de Lab à partir des images d’entrée et de sortie, tout en prenant pour les autres canaux ceux de l’image d’entrée sans les modifier.
- Lab color
- Mix the Lab color channels (a and b) from the input and output images, while taking the lightness unaltered from the input image. In contrast to “color” this blend mode does not involve any color space conversion and does not clamp any data. In some cases this blend mode is less prone to artifacts than “color”.
Canaux RVB
Les éléments suivants sont disponibles uniquement lors de la fusion dans les espaces colorimétriques RVB.
- RGB red channel
- Mix the “red” channel from the input and output images, while taking the other channels unaltered from the input image. When blending in the “RGB (scene)” color space, the “red” channel from the output image is multiplied by a value proportional to the “blend fulcrum”.
- RGB green channel
- Mix the “green” channel from the input and output images, while taking the other channels unaltered from the input image. When blending in the “RGB (scene)” color space, the “green” channel from the output image is multiplied by a value proportional to the “blend fulcrum”.
- RGB blue channel
- Mix the “blue” channel from the input and output images, while taking the other channels unaltered from the input image. When blending in the “RGB (scene)” color space, the “blue” channel from the output image is multiplied by a value proportional to the “blend fulcrum”.
Canaux TSV
Les éléments suivants sont uniquement disponibles lors de la fusion dans l’espace colorimétrique « RVB (affichage) ».
- HSV value
- Mix the lightness from the input and output images, while taking color unaltered from the input image. In contrast to “lightness” this blend mode does not involve clamping.
- HSV color
- Mix the color from the input and output images, while taking lightness unaltered from the input image. In contrast to “color” this blend mode does not involve clamping.
Autres
- lightness
- Mix lightness from the input and output images, while taking color (chromaticity and hue) unaltered from the input image.
- chromaticity
- Mix chromaticity from the input and output images, while taking lightness and hue unaltered from the input image. This blend mode uses RGB ratios, divided by a Euclidean norm.
- lighten
- not available in the “RGB (scene)” color space
- Compare the pixel values of the input and output images, and output the lighter value.
- darken
- not available in the “RGB (scene)” color space
- Compare the pixel values of the input and output images, and output the darker value.
- hue
- not available in the “RGB (scene)” color space
- Mix hue (color tint) from the input and output images, while taking lightness and chroma unaltered from the input image.
- color
- not available in the “RGB (scene)” color space
- Mix color (chroma and hue) from the input and output images while taking lightness unaltered from the input image.
Attention : Lorsque les modules modifient considérablement la teinte (par exemple lors de la génération de couleurs complémentaires), ce mode de fusion peut entraîner un fort bruit de couleur.
- coloradjustment
- not available in the “RGB (scene)” color space
- Some modules act predominantly on the tonal values of an image but also perform some color saturation adjustments. This blend mode takes the lightness from the module’s output and mixes colors from input and output, enabling control over the module’s color adjustments.