Video stream inside scene

Hi there,
i’d like to do something similar to this old topic: Camera stream on WebGL - #4 by fselcukcan but, as i’ve specified in the last post, i’d like to put the stream in foreground.
The porpouse is to insert a viedo stream of a person inside the scene (for example using green screen technique or similar).
Do you think is it possible?

I think it’s possible. You would have to edit out the green screen in a video editor and export it to a format that has alpha channel (transparency) data. Webm seems like it might work, I would try that on a VideoTexture first.

You can also export the video as a bunch of png files and put them on a mesh if there’s no better way.

1 Like

This could help: Video As A Texture | Babylon.js Documentation

Nice example - https://playground.babylonjs.com/#GH6TZV#3
This thread also may be helpful:
Mp4 video alpha transparency

2 Likes

Thank you everyone, i’ll try following the examples you’ve posted :wink:

I think a can reach the effect i need, thank you all :+1:
I was wondering if it’s possible to use as a video stream also a youtube video. Could it work?

For Youtube video see here - Youtube video as video texture
Another way is to use CSS3DRenderer.

1 Like