-
Notifications
You must be signed in to change notification settings - Fork 3k
Filter Dynamic Mask
Dynamic Mask allows to mask any Source or Scene with any other Source or Scene, enabling very complex and stunning effects. Use Red, Green, Blue and Alpha channels separately to create multiple blended sources, or just use it as a live updateable mask for your webcam.
The calculation used to generate the mask is relatively simple Matrix math. It takes the given configuration options and the input mask source, then calculates a mask out of them. Then it uses a simple multiply operation to generate the final color. The full code for the operation is below:
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
In the above matrix math, the Base Value of any Channel is described as base[#]
. This is then added to the Red/Green/Blue/Alpha Input Value of the Channel multiplied by the Input Source for the given channel. That step is repeated for all four channels, and then multiplied by the Multiplier for the given channel. Finally the mask is multiplied with the actual Source the filter was applied to, resulting in the masking effect.
Version Information
Status | Version |
---|---|
Added | 0.7 |
Unstable | N/A |
Stable | N/A |
Deprecated | N/A |
Removed | N/A |
Which source should be used as the input for the mask? If left blank, will use the source itself instead.
The base value to which everything else is added to.
The input value from channel of the input source.
The final multiplier after all channels have been added to the base value.
This work is licensed under a Creative Commons Attribution 4.0 International License.
The wiki has been under repeated automated attacks by bots, with attempts to phish or infect unsuspecting users with malware, trojans and similar software. As a response to these attacks and GitHubs complete ineptitude at handling this situation, we have decided to write-protect the wiki for the time being. If you wish to submit changes to the wiki, please do so over Discord. Thank you for understanding!
- 🟢 3D Transform
- 🔴 Auto-Framing
- 🟠 Blur
- 🟢 Color Grading
- 🔴 Denoising
- ❌ Displacement Mapping
- 🟢 Dynamic Mask
⚠️ SDF Effects- 🔴 Shaders
- 🔴 Spout
- 🔴 Upscaling
- 🔴 Virtual Greenscreen
- 🔴 Shaders
- 🔴 Sink
⚠️ Source Mirror
- 🔴 Shaders