Page 1 of 1

ChromaMask / Chroma Desaturation

Posted: Sun May 09, 2021 4:15 am
by frank_halfwong
Hi,

I couldn't find anything specific to this topic on the forum or in the manual for v2.3.1.

In a greenscreen Webcam feed into MMV (chromakeyfast used on the input), some transformation I use seem to create a "black background". For instance, "optical flow generator" seems to no longer allow any transparency resulting in a completely black opaque background. Is there a work around this?

Thanks!

Re: ChromaMask / Chroma Desaturation

Posted: Sun May 09, 2021 6:21 am
by Magic
Some of the effects don't support alpha channels. I'm not really sure if there's a "workaround" per se.

Re: ChromaMask / Chroma Desaturation

Posted: Sun May 09, 2021 7:55 pm
by Terry Payman
Eric wrote:Some of the effects don't support alpha channels. I'm not really sure if there's a "workaround" per se.
Not a general workaround, but there are possibilities that will work in certain cases. The first two below will give different results - hopefully one or the other will be useful to you.

1) In the case of the "Optical Flow Generator" you could restore transparency to the black regions by following it with the "Luma Key" module. Try Strength = 0.01 and Falloff = 1.0 as a starting point.

2) You can use the Vidvox "Show Alpha" ISF module to extract the alpha generated by "ChromaKeyFast". The alpha can then be re-applied after the effects chain by using using Magic's "Mask" module with "Use Alpha" unticked. I've attached the "Show Alpha" module. I found it here: https://editor.isf.video/shaders/5e7a7f ... 18206de179 .
Illustration of the above two methods
Illustration of the above two methods
Restore tranparency.jpg (98.46 KiB) Viewed 5661 times
3) On the offchance that you find a distortion module that sets alpha to 1.0 rather than distorting it to match the image you could try the "ChromaKeyFast" after the distortion rather than before.

Re: ChromaMask / Chroma Desaturation

Posted: Sun May 09, 2021 11:58 pm
by Terry Payman
Here's a demo, using the Match Alpha method (#2) and the "Edges" module in place of the "Optical Flow Generator".

Re: ChromaMask / Chroma Desaturation

Posted: Mon May 10, 2021 12:37 am
by Terry Payman
Adding an "Erode" module in the alpha feed to the "Mask" module will add a black border (right-hand image). This can be useful to isolate the camera image from the background if it would otherwise be hard to distinguish.

Re: ChromaMask / Chroma Desaturation

Posted: Mon May 10, 2021 7:00 pm
by frank_halfwong
Thank you so much for the posts i'm going to look into it tonight. I want to say, i'm so glad i got this software, the support on forums is amazing. I'm doing publicity for you guys on twitch, people are losing their minds!

Perhaps it should be a whole other post, but would you know if there is a way to control the scene switch via OBS rather than via the playlist? I can post this standalone as well, let me know what is the best course of action.

Cheers and thanks again!

Frank