We closed this forum 18 June 2010. It has served us well since 2005 as the ALPHA forum did before it from 2002 to 2005. New discussions are ongoing at the new URL http://forum.processing.org. You'll need to sign up and get a new user account. We're sorry about that inconvenience, but we think it's better in the long run. The content on this forum will remain online.
Page Index Toggle Pages: 1
embed video with alpha channel (Read 510 times)
embed video with alpha channel
Apr 22nd, 2010, 10:19am
 
hi folks,
I'm a newb to processing, so i have watched and read some tutorials and i think it's quite an easy language.
but now i've got a big problem and couldn't find any help.

i want to use mov videos in my project, that i've created with after effects.
they have a transparent background. i exported them with rgb+alpha channel and wanted to add them into the processing environment.

but in there they have a black background, i couldn't get rid off.
is there any possibility to load the transparancy in or is there some kind of colour-mask-filter?

please help me!
cheers
nasnokksen.

here's the code i've made so far.

Code:

import processing.video.*;

Movie blob;
PImage keys;

void setup() {
size(1000, 500, P2D);
background(0);
blob = new Movie(this, "blob02.mov");
blob.loop();
keys = loadImage("keys01.jpg");
image(keys, 0, 0);

}

void movieEvent(Movie blob)
{
blob.read();
}

void draw()
{
if (mousePressed == true) {
image(blob, mouseX - blob.width/2, mouseY - blob.height/2); }
else
image(keys,0,0);
}
Page Index Toggle Pages: 1