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
alpha troubles - flickering (Read 739 times)
alpha troubles - flickering
Oct 21st, 2009, 9:22am
 
Hi!

Im having a lot of trouble using video with alpha-channels.
Iv'e tried both Processings own vidio library and JMCvideo.

Every time i get something to work theres some heavy flickering going on..

Here's my attempt with JMCvideo:
Code:
import jmcvideo.*;
JMCMovie myMovie;

void setup() {
 size(500,500);
 myMovie = movieFromDataPath("5.mov");
 myMovie.loop();
}

void draw() {
 background(255);
 image(myMovie, 100, 100);
 myMovie.mask(myMovie);
}

JMCMovie movieFromDataPath(String filename)
{
 return new JMCMovie(this, filename, ARGB);
}




Anyone knows how to fix this issue?
Im in urgent need of help on this one...

Thanks,
Steffen
Re: alpha troubles - flickering
Reply #1 - Oct 22nd, 2009, 8:15am
 
Steffen K wrote on Oct 21st, 2009, 9:22am:
Code:
  background(255);
 image(myMovie, 100, 100);
 myMovie.mask(myMovie);


Untested hypothesis:

Your draw() code reads as:

- white out the screen
- draw current frame
- apply blue channel of current frame as an alpha mask (see PImage.mask()) to the PImage (that the myMovie is a descendant of)

So... what happens when the next movie frame appears Do we get frame 2's RGB data with frame 1's B channel used for the alpha value Does this cause flickering.. or is it the "usual" (common) flickering seen when running Processing sketches

-spxl
Page Index Toggle Pages: 1