Hi,
I've been searching MMV's forums, found a bunch of GLSL shaders (chromakey.txt and chromakey2.txt) as alternative but the result isn't perfect. Is there a simple solution in MMV that will match the "chromakey" features in OBS?
At the moment, i need to chromakey in OBS, add a solid perfect green and Spout it to MMV. Then in MMV, use chromakeyfast, do my visual transformation, and Spout out it back to OBS. Until i can chromakey directly my webcam in MMV, I'll have to continue this technique... but this is CPU hungry.
I've found some interesting thing on MMV GLSL shaders: https://magicmusicvisuals.com/forums/vi ... a+key#p749
Lumakey for sky :https://magicmusicvisuals.com/forums/vi ... +key#p9042
Any other leads to fix my issue?
Thanks!
Frank
Alternative to chromakey fast
Re: Alternative to chromakey fast
Did you try the Chroma Mask module I recommended before?
-
- Posts: 44
- Joined: Wed Apr 21, 2021 5:22 pm
Re: Alternative to chromakey fast
Yes, but I couldn't then restack the original area with over the masked portion. The module did an amazing job at isolating my "body" but then that's just a black mask. You talking about the chromakey.txt GLSL?
Frank
Frank
Re: Alternative to chromakey fast
Add > ISF > Masking > Chroma Mask
-
- Posts: 712
- Joined: Sun Sep 14, 2014 8:15 am
- Location: UK
- Contact:
Re: Alternative to chromakey fast
Perhaps just "finger trouble", but I could find no combinations of settings of the Chroma Mask module that would work in the conventional manner of a chroma key. The best I could achieve was to replace the keyed colour with opaque black rather than transparent black. I think this is the issue found by the OP.
Unlikely though it seems, I believe there's a bug in the coding (EDIT: or an omission of an obvious option to allow alpha keying as well as removal of colour) . The option "Show Alpha" displays the internal float totalAlpha, so the module appears to be keying correctly. However, the "Apply Alpha" option is coded to always apply 1.0 as alpha rather than totalAlpha so the output is never transparent.
Attached is a quick hack that fixes the above, plus it substitutes HSL for RGB to facilitate selection of the chromakey hue. I've also tweaked default values of "Apply Alpha", "Hard Cutoff", "Dilate" and "Blur".
It now works for me, although I'm certain it can be improved.
Unlikely though it seems, I believe there's a bug in the coding (EDIT: or an omission of an obvious option to allow alpha keying as well as removal of colour) . The option "Show Alpha" displays the internal float totalAlpha, so the module appears to be keying correctly. However, the "Apply Alpha" option is coded to always apply 1.0 as alpha rather than totalAlpha so the output is never transparent.
Attached is a quick hack that fixes the above, plus it substitutes HSL for RGB to facilitate selection of the chromakey hue. I've also tweaked default values of "Apply Alpha", "Hard Cutoff", "Dilate" and "Blur".
It now works for me, although I'm certain it can be improved.
- Attachments
-
- Chroma Mask TP.fs
- (11.3 KiB) Downloaded 404 times
-
- Posts: 44
- Joined: Wed Apr 21, 2021 5:22 pm
Re: Alternative to chromakey fast
Thanks to both of you. I'll try the two methods. @Terry, once again thanks for your custom modules.... wow. I'll let you know how the result is.
1000x thanks
Frank
1000x thanks
Frank
-
- Posts: 44
- Joined: Wed Apr 21, 2021 5:22 pm
Re: Alternative to chromakey fast
Ok Terry, your custom module works GREAT!
Here's my setup for others if they want to give it a try.
Thanks again, I don't have to do the OBS to MMV to OBS setup anymore!
Frank
Here's my setup for others if they want to give it a try.
Thanks again, I don't have to do the OBS to MMV to OBS setup anymore!
Frank
- Attachments
-
- ScreenHunter_240 Jun. 29 09.54.jpg (38.53 KiB) Viewed 7723 times
-
- Posts: 712
- Joined: Sun Sep 14, 2014 8:15 am
- Location: UK
- Contact:
Re: Alternative to chromakey fast
Cool!
Many thanks for the update Frank!
Many thanks for the update Frank!