Blend Mode

Navigation:  Pandoras Box > Device Control > Video Layer Control >

Blend Mode

Previous page Return to chapter overview Next page

Blend modes in digital image editing are used to determine how two layers are blended into each other. On Pandoras Box Servers and Players, the default blend mode (called “normal”) is simply to hide the lower layer with whatever is present in the top layer. However, as each pixel has a numerical representation, a large number of ways to blend two layers is possible.

Normal

The lower layer will be hided by the content on the top layer.
_img270

Mask / Fill

With a combination of the Blend Modes Mask and Fill a key and fill effect can be set up:
Layer A is supposed to be mixed with Layer B with a Mask in between that benefits from all sizing, positioning and rotation features in 2D and 3D.
The mask can be anything, a still image or a video file.

_img271

This KEY+FILL effect is based on the layer stack from back to front, as the back layer is being rendered first and every other layer is rendered on top of the previous one. By making use of this technique every layer can make use of the alpha blend modes to define how its pixel RGB+Alpha (RGB32) values are mixed with the previous rendered images.

_img272

Layer 1 = Background Content

_img273

Layer 2 = Black&White Mask.

Set the Blend Mode to “Mask”. Add a White Key and key out all white parts of the image.
The “mix” parameter of the White Key needs to be set to 255

_img274

This is the result of Layer 1 and Layer 2.

_img275

Layer 3 = Content to be filled onto the mask. Set Blend Mode to “Fill”.

_img276

This is the result: the Key & Fill effect.

Please note:
When alpha blend modes are used the opacity ranges from 1-255, a zero value switches off the layer to be rendered, and therefore switches the mode back to default opacity mixing.

If the Key & Fill Layers (Layer 2 and 3 in the example above) should be faded in / faded out, please use the Mix-Parameter of the White Key of the Mask Layer to do so, instead of using the Opacity of both Layer 2 and 3.

Screen

With Screen blend mode the values of the pixels in the two layers are negated, multiplied, and then negated again. The result is a brighter picture.

_img277

Add

This blend mode simply adds pixel values of one layer with the other. In case of values above 255 (in the case of RGB), white is displayed.

_img278

Custom

Here you may use a customized blend mode. By default the blend mode normal is set.
To create your own blend mode, you have to modify the dedicated entries in the tweak config file.
This can be found here:
Pandoras Box root folder\data\config\tweak_config.txt

When opening this .txt-file scroll down to this section:

;---------------------------------------------------------------------------------;

;description:
;define custom layer blending with operation and mode for color and alpha.

;possible values for blend operations are defined in D3DBLENDOP

;find more information here: http://msdn.microsoft.com/en-us/library/bb172509(VS.85).aspx

;possible values for blend modes are defined in D3DBLEND

;find more information here: http://msdn.microsoft.com/en-us/library/bb172508(v=vs.85).aspx

;default:
;blendOpColor=1
;srcBlendColor=5
;destBlendColor=6
;blendOpAlpha=1
;srcBlendAlpha=5
;destBlendAlpha=7

[LayerBlending]
blendOpColor=1
srcBlendColor=5
destBlendColor=6
blendOpAlpha=1
srcBlendAlpha=5
destBlendAlpha=7

;---------------------------------------------------------------------------------;

Modify the entries under the section [LayerBlending] to create your own blend mode, like described below in the tweak_config.

Please note:
Close the PB application before editing the tweak config file!
These edited mode settings have to be done on each PB device that should be able to use this mode!