Skip to content

Filter Dynamic Mask

Michael Fabian Dirks edited this page May 10, 2020 · 16 revisions

Dynamic Mask Filter

With the 'Dynamic Mask' filter you can freely mask any source using any other source (or even itself) using any of the channels and various values you can set, and can even be used for very limited multiply blending.

The way it works is really simple and based on the following calculation:

mask[R] = (base[R] + value[R][R] * source[R] + value[R][G] * source[G] + value[R][B] * source[B] + value[R] * source[A]) * multiplier[R]
mask[G] = (base[G] + value[G][R] * source[R] + value[G][G] * source[G] + value[G][B] * source[B] + value[G] * source[A]) * multiplier[G]
mask[B] = (base[B] + value[B][R] * source[R] + value[B][G] * source[G] + value[B][B] * source[B] + value[B] * source[A]) * multiplier[B]
mask[A] = (base[A] + value[A][R] * source[R] + value[A][G] * source[G] + value[A][B] * source[B] + value[A] * source[A]) * multiplier[A]
color = color * mask

Media

Dynamic Mask used to simulate Multiply blending creating a Glow

Options

Input Source

Which source should be used as the input for the mask? If left blank, will use the source itself instead.

Base Value

The base value to which everything else is added to.

Input Value

The input value from channel of the input source.

Multiplier

The final multiplier after all channels have been added to the base value.

Clone this wiki locally