I have been trying to achieve a green screen and have managed in getting it mostly functional, however there are some bits that I’m sure must be easy to filter out.
Im using an image input node and inputting that to a chroma key then to an Alfa over. The result removes most of the green except for a few specks in the background, is there a node set-up that will filter out small specks?
The second problem is that the edges around the non green parts are very sharp as there is no colour spill correction (Which I don’t know how to do), I expect colour spill correction has a feathering effect to soften the edges?
Personally I never keyed in Blender, in AE and/or Nuke I usually just use Keylight and/or Primatte, kinda depending on the quality of the chroma… But it’s more work in Blender.
Yeah channel key is waaaaay better, as you can see above plan on using multiple keys added together (not necessarily with add function) to solve all the edge issues.
Alright, I got a much better image. But the only problem now is that dark areas are being removed. I tried having a bunch of colour channels targeting smaller range of colour, but the same thing happened.
As you can see it just kills anything that is black, I tried to add the colour back in but since I don’t have back lighting for my green screen the shadows on it can become visible somtimes, the pic was the worst frame.
Any suggestions on how to deal with this? Been fiddling with is for a few hours.
Hm yes I get this issue too. You can see the heavy compression artifacts in the dark regions, why did you select black as a key color in the bottom channel key node?
The idea was to select the black areas and add it back into the image. Decided to try it since I couldent figure out how not to remove it accidentally.
I do a lot of green screening and the thing I see missing in this discussion is a garbage mask around the subject and things that don’t move. A garbage mask is used to eliminate the need to key around areas that are not affected by the movement in the shot. In your video I would assume that is the left side of the screen where the actor is not.
For this shot I would make 1 or 2 different masks depending if the camera is moving or not. If the camera is not moving I would mast any green that the actor does not go into. Second I would mask the mic and screen. For the masking around the actor I would use the roto bezier addon to animate the mask, keeping it very tight to the actor.
The goal is to get rid of as much green screen as you can without keying. Then it is easier to key because you have less variation to the key making it easier to match. In your example notice the change in the shade of green from the left to the right. With masking you don’t have to deal with that (as much). This makes getting a great key much easier.
Andrew Kramer did a great tutorial on garbage masks for After Effects, with in depth explanations why it is good to use garbage masks when keying. Yes, it is for after effects, but the principal applies to masking anywhere, even in blender.
Oh, and the worse the chroma, the greater the need for garbage masks. It adds a little time to your work flow, but the results are worth it!
@place57 Thats some good advice, I will have to try it when I have more time to do a through GS project.
After much mucking about I have achieved what I believe is a satisfactory result and would like to share what I learned for anyone else having problems with GS.
First off the issue with black. Green is green, and any other colour will remain its colour, however all colours can be black given proper lighting. The trick is to keep the tolerance levels for your colour key as low as acceptable. If the value tolerance goes to high it will eventually reach a point where the colour being keyed will be so dark there is no way to distinguish between shadows and anything else that is black, this is why in the first picture I posted the microphone was only semi visible.
Second off shadows on your GS make the keying proses much harder. I noticed in the test video I made that when I was near the wall the GS started showing since it was so dark, but after moving away from the wall the shadows were filled and once again I had a clean background.
Lastly is colour spill. To correct the colour I found finding the right values were tricky, took me a while to match the outer ‘glow’ to a white/grey colour. After this the image was somewhat discoloured. By adding an RGB curves node and another colour spill key this problem was repaired.
I’m sure this could have been done with just one colour spill, but after having set up another I didn’t want to spend the time to find new values to get it working.
In this newer image of the set-up a black background was used to better display what the matte is covering.
Still cant get edges as clean as the picture Farmfeild posted, can’t even tell she is GS. I found that even with a blurred matte there is still artefacts.
yes, I tried it latter on. I also found that using a soften node before the colour key (Which I have now changed to a channel key) gave less pixelated edge. Using an RGB curve on the matte before mixing it also helped slightly.
Another methodology here is to focus on creating the alpha and then use that separately, might make it easier to focus on the parts of it, the main matte and the edge.
Edit: Must have been really tired when I wrote this, an earlier poster already wrote about the erode node and you’re already making a separate matte, sorry. #shameful
Erode/Dialate destroys the edge quality on a key. The halo he is getting is most likely due to color ringing (due to the immediate color change from a foreground to a background color in 4:2:0 color). Close examination of the source material usually reveals a saturated green halo in the original footage. I don’t know how to completely get rid of these without the use of 4:2:2 footage. These are difficult to minimize but I have found using multiple keys with one of them picking the ringing color as the key color helps. BTW the halos are usually semitransparent and are not so obvious when composited onto complex backgrounds. No key is perfect.
I have often found that that ringing effect is a result of the edge enhancement of the source camera. But if you wind all the detail out of the camera the fill isn’t very sharp.
Any camera that compresses the picture will give you GS nightmares. Sometimes on the GS plate is best to separate the color channels and blur by 2 to 4 pixels using the rgb color nodes. Then use the rgb combiner node to add the blured r & b to the combiner node with the green output unprocessed. This how it is done in nuke, digital fusion, and shake. The color sampling for 4:1:1 & 4:2:0 are to compressed around the edges to pull a clean matte. This technique is also known as chroma blurring for green screening. Sony Vegas pro has a pluging for this purpose.
If you like, I could screenshot the blender node setup for you.
If any one is going to use cameras with 4:1:1 or 4:2:0 color sampling, make sure your camera scene setups are completely flat. No extra enhancement whatsoever. Yes it will look flat but you get more color information when it comes time to grade your shots. Use blender’s color curve node to map your blacks and your whites in the shot. This will remap the green color to more suiting matte pulling. I find this technique usefull when the green background is not stardard chroma green. Some green screens will have a tint of yellow and other pigment colors. If that is the case, light your foreground one stop brighter and the background two stops lower. The color spill and edge mattes will be easier to manage.