0

Now that there is a live compositing in the viewport in blender 3.5, is there a way to take green screen footage which has not been keyed, and key it live within a 3D image, without having to render it through the composition first in order to generate an alpha channel and remove the green background?

I’m thinking of using “Image As Planes” when compositing a green screen image in a scene.

tomh
  • 558
  • 4
  • 17
  • Why not try by your self? I'm a Mac user so I can't test it, but from this list under Matte section you can see Keying node.is not supported yet, but Color Key or Color Spill are already available.... So some kind of Keying is possible. – vklidu Apr 07 '23 at 05:53
  • I'm not sure how to do that, as it's effectively doing it to a shader object before the final comp. It's kind of like the equivalent of a pre-comp in After Effects, but I'm not sure how to acheive that in Blender. – tomh Apr 08 '23 at 15:45
  • I don't know what have you tried and where you failed ... Info how it works is here or check Manual Anyway image plane in 3D scene will be composite with entire scene in viewport, so if scene contain similar color to key color, it will be matted as well (you would have to mask plane with object ID or what ever) ...so keying by shader sounds to me better, it is not at that quality as Keying node, but with mentioned nodes above it is comparable. – vklidu Apr 09 '23 at 06:31
  • On top of that ... Shader solution will math image in its full resolution, that will handle matte edge or semitransparent pixels better than when it will be composite from viewport scale. Probably would be helpful if you can share some screen or mockup how you scene (viewport) looks like to let as better picture of what we are dealing with. Thanks – vklidu Apr 09 '23 at 06:40

1 Answers1

2

From this list (under Matte section) you can see - Keying node is not supported yet, but Color Key or Color Spill are already available.... So some kind of keying is possible.

(I'm a Mac user so I can't test it or give you a more info.)


Shader

Some matting you can do inside shader directly ... here is Image as Plane ...

enter image description here

Create simple node group comparing your image with key color ...

enter image description here

Nodes Group incorporate into shader ...

enter image description here enter image description here

Shader - a bit of adjustments

In shader above hairs are quite cropped to wash out semitransparent pixels in hairs and body is contaminated by green spill color. Also in black parts are holes for a what reason.

enter image description here enter image description here

There is a few things you can make it better ... to better control darker and brighter variations of key color add Compare nodes for Saturation (S) and Value (V) channel ...

enter image description here

enter image description here enter image description here

To handle contaminated hair pixels - in this case worked just copy the node group and adjust values ...

enter image description here enter image description here

enter image description here enter image description here

In this node tree the first HSV node corrects green spill color in entire image, the second HSV node adjusting image colours at edge mask.

The Match > Color > Multiply node is there to mix key color mask with edge mask. With Factor of this node you can control semi-transparency of the edge mask.

Alternatively you can make it a bit blur with Image Blur node group easily found on internet.

enter image description here

vklidu
  • 36,165
  • 1
  • 61
  • 135