I don't know why I am having such a block against this, but I am. Here's what I am trying to do.
I have three videoplanes:
#1 = background image
#2 = live feed of a performer in black & white (binary image)
#3 = texture to be applied to performer
Goal: whatever is white in the live feed (#2) becomes a window to the texture (#3). Whatever is black in the live feed becomes transparent and shows the background image (#1).
I'm trying to do everything I can in gl using jit.gl.videoplane for the mixing/blending.
I've been able to get the first part to work without a problem...however I'm am really not sure if the blend modes I am using are right. To get the live feed to be filled with the texture I have the texture set to layer 2, blendmode = 1 0. The live feed is layer 3, blend mode 0 3. Don't know if that is right, but it works up to this point. I have the background set to layer 1, and it just doesn't matter what blendmode I use, nothing shows up (not surprising). I'm pretty certain what I need to do is create an alpha channel to the live feed...whenever the image is white alpha = 1., black alpha = 0. I started on this, but I think my lack of understanding of blend_modes is going to keep me from seeing any results.
I know a patch will be helpful and am working on one now to follow-up with, but if anyone has any pointers in the meantime, it would be hugely appreciated.