So, i have an animation of a car moving, and i’m trying to use mask on it, exactly the same video, but i only exported the alpha channel.
I’m trying to play them simultaneously, so they overlap, but they seem to be playing at different timings, so it looks like this:
And my code looks like this:
import processing.video.*;
PImage img;
Movie video, mask;
void setup() {
size(600, 840);
img = loadImage("comtexto.png");
img.resize(width, height);
video = new Movie(this, "1.mp4");
mask = new Movie(this, "2.mp4");
mask.loop();
video.loop();
}
void draw() {
background(img);
video.mask(mask);
image(video, 0, 0);
}
void movieEvent(Movie m) {
m.read();
}
Why aren’t they overlapping? They are exactly the same size and length video.