0
$\begingroup$

I have these really cool green screen effects that can be applied to a plane (they are videos), but I need to chroma key the green out of it so it only has the effects themselves. How can I do this? Thanks!

$\endgroup$
1
$\begingroup$

This is a simple node setup in Blender's Compositor. If you're unfamiliar with this part of Blender, leave a comment and I'll add step by step as to how to get into it.

If only wishing to remove the green and not overlay a background, i.e. have a video with just the effects, delete the BKD movie Node. Replace the Alpha Over Node with a "Set Alpha" node. Connect it as shown below.

You'll end up with an alpha layered output. If not needing the alpha layer, render in H264 AVI (RGB). (or your favorite format)

If you do want the Alpha layer, you'll need to render the video as a series of Alpha layered .png images. Make sure to create/select a special folder for these. There'll be a lot!
These can be compressed into a single file for storage.

I've found it easier if the key colour isn't as bright as it's shown in the top pic. (bottom of the keying node)

-=====-

Getting the resultant movies onto a plane -

Simply texture the plane using "Generated" mapping for starters to see how it goes. You can revert to UV mapping if you prefer.

In the image properties "Image" tab, make sure to click on "Auto Refresh" so the movie or image sequence will play.

$\endgroup$
13
  • $\begingroup$ Thank you for that, but I'm still kind of confused. All I want to do is have an effect on a plane and take out the green. Does this explain it? $\endgroup$ Sep 10 '17 at 23:29
  • $\begingroup$ Also idk what BDK is.. sorry for my lack of knowledge! $\endgroup$ Sep 10 '17 at 23:32
  • $\begingroup$ @GodzillaDude, It can't be done in the 3D window in Blender Render that I'm aware of. You have to use the Compositor. Use the 2nd node setup and texture a plane with the rendered series of alpha layered pics (video frames) that it produces. The abreviation "BKD"=Background. Sorry for that, old habits die hard. See 2nd paragraph after 2nd pic. - I'll make a video for you if you're still confused. $\endgroup$
    – Edgel3D
    Sep 11 '17 at 3:48
  • $\begingroup$ @Edgel3D you can do it 3D view but the quality and ability to edit the key won't be as good as the compositor. See my answer below. $\endgroup$
    – 3pointedit
    Sep 11 '17 at 9:11
  • $\begingroup$ Yes Edgel if you can make a video for me that would be amazing, man again I'm really sorry I've been using Blender for years now but I kind of have trouble when it comes to these sorts of things. $\endgroup$ Sep 17 '17 at 17:02
1
$\begingroup$

You can isolate a specific colour as long as you have good separation between foreground colours and background colours. This method wont be as accurate as the proper Keyer node available in the compositor and there are no blur functions to erode or dilate the mask. Also there is no easy way to add a mask shape to the key, unless you edit the geometry using a boolean modifier or some UV projection trick.

Here I have used the node Separate HSV to grab the hue channel. I tweak the input hue using a HSV node to target the green grass.

Cycles Material Chromakeyer

Finally I modify the alpha by increasing the contrast using a Ramp node.

*Note that I am using an emission node to make sure that there are no shadows, but you may want to cast a shadow on the background image.

$\endgroup$
3
  • $\begingroup$ I'll note this one down, thanks! How would it go for a movie sequence though? Light and shade changing as the cam moves etc? I've used frame by frame masks in the past. That works very well for extracting objects from existing video, but it's a lot of work. $\endgroup$
    – Edgel3D
    Sep 11 '17 at 17:12
  • $\begingroup$ Masking requires a slight modification to the image mapping. Then you edit the vertices and animate shape keys. Youre right though the key wont be anywhere near as good if the colour is to similar to the foreground. $\endgroup$
    – 3pointedit
    Sep 11 '17 at 21:13
  • $\begingroup$ @Edgel3D I have not used any masks to create this key. I have simply altered the colour profile of the source image to generate an alpha image. You could make a mask with a boolean modifier as well. Of course its best (quality) to do all the keying in the compositor then apply the generated alpha key to the material in 3D view, but its faster my way ;-) $\endgroup$
    – 3pointedit
    Sep 12 '17 at 1:49

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.