Previous topicNext topic

ChromaMask / Chroma Desaturation

Questions, comments, feedback, etc.
Post Reply
frank_halfwong
Posts: 44
Joined: Wed Apr 21, 2021 5:22 pm

ChromaMask / Chroma Desaturation

Post 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!
Magic
Site Admin
Posts: 3440
Joined: Wed Apr 09, 2014 9:28 pm

Re: ChromaMask / Chroma Desaturation

Post by Magic »

Some of the effects don't support alpha channels. I'm not really sure if there's a "workaround" per se.
Terry Payman
Posts: 710
Joined: Sun Sep 14, 2014 8:15 am
Location: UK
Contact:

Re: ChromaMask / Chroma Desaturation

Post 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 5640 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.
Attachments
Show Alpha.fs
(423 Bytes) Downloaded 260 times
Terry Payman
Posts: 710
Joined: Sun Sep 14, 2014 8:15 am
Location: UK
Contact:

Re: ChromaMask / Chroma Desaturation

Post by Terry Payman »

Here's a demo, using the Match Alpha method (#2) and the "Edges" module in place of the "Optical Flow Generator".
Terry Payman
Posts: 710
Joined: Sun Sep 14, 2014 8:15 am
Location: UK
Contact:

Re: ChromaMask / Chroma Desaturation

Post 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.
frank_halfwong
Posts: 44
Joined: Wed Apr 21, 2021 5:22 pm

Re: ChromaMask / Chroma Desaturation

Post 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
Post Reply