Video Texture with Alpha

hey blendheads!

the python TEXTURE module (to play videos in the bge) does not support alpha
and videoformats doesnt too…

i try to get around that

so i render the alpha channel to a seperate videofile
and i want to place it in the second texture-slot to control the alpha of my object

the problem is that i cant access the texture-slots because the texture-module is working with matID

i could solve it with material nodes… but is there a better/easyer way ?

any help would be much appreciated
thx
Tobi

test using material nodes for mixing in the alpha channel from second material diffuse channel failed.

reason: looks like the texture module cant access node submaterials…

i do

get matID for the movie screen

matID_alpha = bge.texture.materialID(obj, "MA" + obj['material_alpha'])

is it wrong?
or how to access node material - is it different then standard materials ?

any other ideas ?

the problem is that i cant access the texture-slots because the texture-module is working with matID

I was under the impression that you can access the textures themselves, if they are the first texture of the material

From the api for materialID:

This method works for basic tex face and for material, provided the material has a texture channel using that particular texture in first position of the texture stack

So the alpha texture goes in the first position.

If that doesn’t work, you can also get the images themselves, apparently.
Make sure that the 2 images that you replace with video textures are not the same.

I’m not sure your statment is completly true… actulaly I think the video texture does support alpha… even simple cromakeying, so it will render an image transparent where it finds a solid blue color… can you post a simple demo file of what you want to achieve?
It will surely be possible with a glsl shader, but maybe there is a simpler way.

hope this is helpfull