Game engine live webcam to compositing nodes?


I’m trying to combine the webcam live-stream with the game 3D environment. It works pretty well with the tutorial I found on the internet. Now I want to add some nodes in the compositing (like a vignette, remove green screen, add text, add background, …) so my green screen becomes transparent with a weather info background.

But this doesn’t work. Is it possible to add nodes in the game engine at all? I’m not home in the game engine but the game-engine was the only way I found to add a live camera stream in Blender.

Is there another way to add live camera to blender render compositing? Or is there a way to use compositing in the Blender game engine?

Greetings Stijn

This will have to be done in material nodes.
From memory, when you read something from a webcam into the game engine, it does into a texture. So if you just use that texture in material nodes, it may work.
But, as I’m not sure how you’re reading from the webcam, I’m not sure.

Great, It works. I can add nodes between the material node and the output node like convert to grayscale, add color ramp for changing the grayscale to color but there are no nodes to remove the green screen (keying). I can only find them under the compositing nodes.

With the nodes I have in the material nodes I tried to make the green transparent by splitting the rgb, add some math on the green and use it as transparent. But the transparent doesn’t work. I made an easy node setup with Material --> RGB to BW --> Color ramp --> Output. In the color ramp I made the colors 100% transparent and the output shows it correct. But when I start the game engine it doesn’t appear transparent. (see picture)

sdfgeoff --> Already thanks for pointing me in the right direction. I’ll test it further.

Found it: Just a few checkboxes.
Thank you SDFGEOFF !!!
Tomorrow I’ll search the manuals for the different options under Alpha Blend but Alpha Clip works.

If you don’t mind, I’d love to see your node setup (or blend if possible). But ifyou don’t want to, it’s ok.

First video source & source:
Blend file (test): GreenScreen2.blend (1.78 MB) (the name is misleading, no green screen content )

I’ll post the end blend files when I’m ready.
Greetings Stijn.