Need advice about using 3 avi files combine in real time

Hello~!

Would you please give me advices for below project idea.

I have 3 distance measuring sensors and in the idle mode, there is the first avi video playing in backgroud, if those sensors detect anyone, the second avi video is paying above background video, and if anyone approach more closed to sensors, the third avi video is playing above the other 2 videos.

the second, third video have alpha blended background, so, those 3 videos will be look like one video playing.

This is my project plan using VVVV. And for me, it’s a tricky project… cause i’m a newbie at VVVV.

Would you explain how can i make this idea to be real project.

One more thing… that avi file has sound also!!!

unlike quicktime, video for windows doesn’t support alpha blending and therefore you’d need two extra video streams with alpha channel information (and multiply them with the content streams).

if your video(s) aren’t too big i’d suggest using PNG image sequences instead (that you have to preload). another benefit: image sequences are spreadable.

have a look at my image sequence module:

imageSequence.v4p (12.4 kB)

If you need video, there are two ways by using shaders.
First is, double your video in height and put in lower half your alpha information as an black/grey/white matte. In your shader you just read upper half of video for rgb values and take lower half (y-offset) for your alpha values. Its a quite easy pixelshader. I did it like this for my diploma. I will upload it later if Im at home.
Second: I assume your 2 overlay videos are something with an object and some uninteresting background. If this background (inside overlay video) is black, you could take black values for aplha channel. Disadvantage of this way is a rough border at visible foreground objects. Or you could take a range of black values for this like from rgb 0,0,0 up to 0.1,0.1,0.1 would be mapped to alpha 0 to 1.0. Rest of rgb is visible. But this strongly depends on your content.

For sound layer, you can take waveplayer which is capable of playing different wave audios (44,1khz, 16bit) simultaneously. Which means best to split sound and video. See waveplayer.node help file (which is click upon node and press F1)
Video: filestream -> videotexture -> quad for each video and plug them (all 3) into group EX9 -> renderer EX9. Each quad has color pins, take hsv and decrease alpha pin for soft fade out/in.

Here it comes, hopefully it helps

alpha_video.zip (8.3 kB)