How to mask green screen effect

konjurer wrote on 9/24/2014, 2:31 PM

I have recorded some video in front of a green screen and added a background video loop using the Chroma Key effect.  For the most part, it works great.  However, in one video segment, some yellow objects are also becoming transparent.  The threshold and fading sliders will not completely get rid of the effect without showing some green screen.

Is there a way to designate an area of the video to not become transparent?  

Let me ask this another way.  Say you video a person and they happen to have a green dot in the middle of their shirt.  Would there be a way to mask the chrome key effect to prevent that area of the shirt from showing the layer underneath?

I'm using MEP 2014 Plus.

 

 

Comments

terrypin wrote on 9/24/2014, 2:56 PM

Hi,

If it wasn't moving significantly, yes you could do it. But otherwise the mask itself would have to be animated in the keyframer.

--
Terry, East Grinstead, UK

Last changed by terrypin on 9/24/2014, 2:56 PM, changed a total of 1 times.

Terry, East Grinstead, UK. PC: i7 6700K, 4.0 GHz, 32GB with Win 10 pro. Used many earlier versions of MEPP, currently mainly MEPP 2016 & 2017 (Using scores of macro scripts to add functionality, tailored to these versions.)

konjurer wrote on 9/24/2014, 3:22 PM

This area of the screen is not moving.  See the problem area below...the background is bleeding through.  First, is there a way to reshoot to eliminate this undesirable artifact?  My green screen is fairly well lit.

I was hoping that I could mask off this area as shown in the polygon area below

I hope that helps explain my problem!

 

terrypin wrote on 9/24/2014, 4:13 PM

Sorry, but I can't make out what you mean from those very low res screnshots.

 

--
Terry, East Grinstead, UK

Last changed by terrypin on 9/24/2014, 4:13 PM, changed a total of 1 times.

Terry, East Grinstead, UK. PC: i7 6700K, 4.0 GHz, 32GB with Win 10 pro. Used many earlier versions of MEPP, currently mainly MEPP 2016 & 2017 (Using scores of macro scripts to add functionality, tailored to these versions.)

johnebaker wrote on 9/24/2014, 5:25 PM

Hi

It is possible to create a mask from the green screen footage (depending on the clip contents), and use this to mask out the parts you want - this also works for where the subject is moving.

Create the mask as follows:-

  1. Put the green screen video on the timeline.
     
  2. Apply Chroma key and adjust Threshold and Fading range to reduce green fringing to a minimum
     
  3. Adjust the Brightness to 100 and Contrast to 0
     
  4. Go back to the Chroma key effect and adjust the Threshold and Fading range settings to get as near pure black and white mask as possible
     
  5. Export the mask as a MXV file using the same resolution as the green screen clip.

To use the mask set up your timeline as follows

  1. Remove all effects from the green screen clip
     
  2. Import your mask and background setting the clip order as shown below
     
  3. Apply Chroma key Alpha to the mask and adjust the direction (arrow appears near beginning of the mask when you hover the mouse over it
     
  4. Depending on the subject you may  need to apply the Chroma key effect to the green screen video - in the sample i used this whas not necessary

 

HTH

John

Last changed by johnebaker on 9/24/2014, 5:25 PM, changed a total of 1 times.

VPX 16, Movie Studio 2025, and earlier versions 2015 and 2016, Music Maker Premium 2024.

PC - running Windows 11 23H2 Professional on Intel i7-8700K 3.2 GHz, 16GB RAM, RTX 2060 6GB 192-bit GDDR6, 1 x 1Tb Sabrent NVME SSD (OS and programs), 2 x 4TB (Data) internal HDD + 1TB internal SSD (Work disc), + 6 ext backup HDDs.

Laptop - Lenovo Legion 5i Phantom - running Windows 11 23H2 on Intel Core i7-10750H, 16GB DDR4-SDRAM, 512GB SSD, 43.9 cm screen Full HD 1920 x 1080, Intel UHD 630 iGPU and NVIDIA GeForce RTX 2060 (6GB GDDR6)

Sony FDR-AX53e Video camera, DJI Osmo Action 3 and Sony HDR-AS30V Sports cams.

browj2 wrote on 9/24/2014, 7:35 PM

Hi,

Here is another way, quick and dirty, especially if the zone to be protected can be covered easily by an existing mask.

I created a green screen image as a green rectangle, with a blue circle in the middle and a green triangle in the middle of the circle. The background is redish, one of the MEP backgrounds. The object is to show the blue circle and the green triangle on the redish background.

Original image:

Place background on track 1, image above on track 2, copy it to track 4. Chromakey green the image on track 2.

Bring in a hard mask, preferable no gradation, just black and white, with a shape that will be able to cover the triangle or zone to be protected. Note, bring this in as an object, not as an effect. Place it on track 3. Chromakey Alpha on the mask. Depending on which type you brought in, you may have to invert the chromakey arrow on the object. We want white to protect the zone. Resize the mask to cover the zone to be protected, that is, in my case, the white circle.

Next image shows green screen on red background. Triangle is unprotected, thus is redish. We want green.

Next image shows the mask added. You can see the black circle (which is really white) covers the triangle that we want to protect.

Lastly, the next image show the combination of all 4. Et voila, the green triangle is protected.

If you have trouble with the masks that you have, create one that is more suitable.

I like John Baker's solution for the complicated ones.

HTH

Last changed by browj2 on 9/24/2014, 7:35 PM, changed a total of 1 times.

John C.B.

VideoPro X(16); Movie Studio 2025 Platinum; Music Maker 2025 Premium Edition; Samplitude Pro X8 Suite; see About me for more.

Desktop System - Windows 10 Pro 22H2; MB ROG STRIX B560-A Gaming WiFi; Graphics Card Zotac Gaming NVIDIA GeForce RTX-3060, PS; Power supply EVGA 750W; Intel Core i7-10700K @ 3.80GHz (UHD Graphics 630); RAM 32 GB; OS on Kingston SSD 1TB; secondary WD 2TB; others 1.5TB, 3TB, 500GB, 4TB, 5TB, 6TB, 8TB; three monitors - HP 25" main, LG 4K 27" second, HP 27" third; Casio WK-225 piano keyboard; M-Audio M-Track USB mixer.

Notebook - Microsoft Surface Pro 4, i5-6300U, 8 GB RAM, 256 SSD, W10 Pro 20H2.

YouTube Channel: @JCBrownVideos

Scenestealer wrote on 9/25/2014, 6:16 PM

Hi,

Here is another way, quick and dirty, especially if the zone to be protected can be covered easily by an existing mask.

A mask you would need for your shape, could very easily be created within MEP by placing a black swatch in track 3 and using the 3D distortion effect to shape it to fit the perspective/shape of the circuit board.

You could probably even animate it by saving it in the masks folder and using "attach object to a position in the video" command.

Ss

Last changed by Scenestealer on 9/25/2014, 6:16 PM, changed a total of 1 times.

System Specs: Intel 6th Gen i7 6700K 4Ghz O.C.4.6GHz, Asus Z170 Pro Gaming MoBo, 16GB DDR4 2133Mhz RAM, Samsung 850 EVO 512GB SSD system disc WD Black 4TB HDD Video Storage, Nvidia GTX1060 OC 6GB, Win10 Pro 2004, MEP2016, 2022 (V21.0.1.92) Premium and prior, VPX7, VPX12 (V18.0.1.85). Microsoft Surface Pro3 i5 4300U 1.9GHz Max 2.6Ghz, HDGraphics 4400, 4GB Ram 128GB SSD + 64GB Strontium Micro SD card, Win 10Pro 2004, MEP2015 Premium.

terrypin wrote on 9/26/2014, 4:34 AM

My contribution, building on what the others have said.

Here's the mask of your circuit board.
https://dl.dropboxusercontent.com/u/4019461/CB-MaskWhtOnBlk-Alpha.bmp

 

Or for better quality:
https://dl.dropboxusercontent.com/u/4019461/MEP-GreenScreenProtect-1.jpg

 

Or for better quality (and typo correction!):
https://dl.dropboxusercontent.com/u/4019461/MEP-GreenScreenProtect-2.jpg

 

Or for better quality:
https://dl.dropboxusercontent.com/u/4019461/MEP-GreenScreenProtect-3.jpg

 

 

Or for better quality:
https://dl.dropboxusercontent.com/u/4019461/MEP-GreenScreenProtect-5.jpg

 

--
Terry, East Grinstead, UK

Last changed by terrypin on 9/26/2014, 9:19 AM, changed a total of 3 times.

Terry, East Grinstead, UK. PC: i7 6700K, 4.0 GHz, 32GB with Win 10 pro. Used many earlier versions of MEPP, currently mainly MEPP 2016 & 2017 (Using scores of macro scripts to add functionality, tailored to these versions.)

konjurer wrote on 9/30/2014, 11:03 PM

Thanks for the help everyone!  I started trying a few of these techniques.

michaelblountemail wrote on 2/1/2016, 3:00 PM

John

That was a great answer, I only need to use it up to stage 4 that's all I need

Thanks again

Michael