A video storage codec which does not allow for transparency.
in
Core Library Questions
•
2 years ago
Hi guy
i have a question to ask you, anybody can help me to reply?
In fact, i made a test playing now.
I made some video with the transparent background by After effect.
I want the ball that it can to pass before one video of head, it's not passed behind the video.
But i don't know why the ball passed behind the video, i tried to modify the order code, but,it's not good.
So,i hope you can help me by one idea ,it can pass before the video?
The other question is how can i import the video of sans transparence to processing?
Thank u.
//Define a variable of position
float x=30;
float xpos,ypos;
float xspeed= 3.0;
float yspeed= 2.0;
float xdirection= 1;
float ydirection= 1;
float radius= 15.0;
import processing.video.*;
Movie myMovie;
Movie myMovie1;
Movie myMovie2;
Movie myMovie3;
void setup() {
size(640, 480, P2D);
background(0);
smooth();
noStroke();
// Load and play the video in a loop
myMovie = new Movie(this, "2d.avi");//Load this video
myMovie.loop();//Makes draw() run loop
myMovie1 = new Movie(this, "Murdoc.avi");
myMovie1.loop();
myMovie2 = new Movie(this, "Noodle.avi");
myMovie2.loop();
myMovie3 = new Movie(this, "Russel.avi");
myMovie3.loop();
}
void movieEvent(Movie myMovie) {
myMovie.read();
}
void draw() {
fill(0,12);
rect(random(xpos),random(ypos),width,height);
fill(0,0,255,50);
xpos = xpos + ( xspeed * xdirection );
ypos = ypos + ( yspeed * ydirection );
//x+=speed;
if (xpos < 0 || xpos > width) {
xdirection*=-1 ;
}
if (ypos < 0 || ypos > height) {
ydirection*=-1 ;
}
ellipse(xpos+x/4,ypos+x/4,x,x);
// tint(255, 20);
// image(myMovie, myMovie.width/2, myMovie.height/2);
//////// Displays the image at point (100, 0) at half of its size
image(myMovie, 0, 0,width/6,height/6);
image(myMovie1,130, 0,width/6,height/6);
image(myMovie2,260, 0,width/6,height/6);
image(myMovie3,390, 0,width/6,height/6);
}
i have a question to ask you, anybody can help me to reply?
In fact, i made a test playing now.
I made some video with the transparent background by After effect.
I want the ball that it can to pass before one video of head, it's not passed behind the video.
But i don't know why the ball passed behind the video, i tried to modify the order code, but,it's not good.
So,i hope you can help me by one idea ,it can pass before the video?
The other question is how can i import the video of sans transparence to processing?
Thank u.
//Define a variable of position
float x=30;
float xpos,ypos;
float xspeed= 3.0;
float yspeed= 2.0;
float xdirection= 1;
float ydirection= 1;
float radius= 15.0;
import processing.video.*;
Movie myMovie;
Movie myMovie1;
Movie myMovie2;
Movie myMovie3;
void setup() {
size(640, 480, P2D);
background(0);
smooth();
noStroke();
// Load and play the video in a loop
myMovie = new Movie(this, "2d.avi");//Load this video
myMovie.loop();//Makes draw() run loop
myMovie1 = new Movie(this, "Murdoc.avi");
myMovie1.loop();
myMovie2 = new Movie(this, "Noodle.avi");
myMovie2.loop();
myMovie3 = new Movie(this, "Russel.avi");
myMovie3.loop();
}
void movieEvent(Movie myMovie) {
myMovie.read();
}
void draw() {
fill(0,12);
rect(random(xpos),random(ypos),width,height);
fill(0,0,255,50);
xpos = xpos + ( xspeed * xdirection );
ypos = ypos + ( yspeed * ydirection );
//x+=speed;
if (xpos < 0 || xpos > width) {
xdirection*=-1 ;
}
if (ypos < 0 || ypos > height) {
ydirection*=-1 ;
}
ellipse(xpos+x/4,ypos+x/4,x,x);
// tint(255, 20);
// image(myMovie, myMovie.width/2, myMovie.height/2);
//////// Displays the image at point (100, 0) at half of its size
image(myMovie, 0, 0,width/6,height/6);
image(myMovie1,130, 0,width/6,height/6);
image(myMovie2,260, 0,width/6,height/6);
image(myMovie3,390, 0,width/6,height/6);
}
2