Wednesday, 15 December 2010

Merging POGG & AR

After spending a few days learning how to create video playback through processing i have now worked out how to combine it with my AR sketch that places cubes over the markers, so when a movie shows i video is placed on the marker instead of the cube...


Create classes for the movies

TheoraMovie myWMovie;//Win Movie
TheoraMovie myLMovie;//Lose Movie

Setup the Movies

//Win Movie Setup
myWMovie= new TheoraMovie(this, "win.ogg");
myWMovie.loop();
//END - Win Movie Setup

//Lose Movie Setup
myLMovie= new TheoraMovie(this, "lose.ogg");
myLMovie.loop();
//END - Lose Movie Setup

Marker detection setup for win movie and loose movie

if(nya.markerid==0){myWMovie.read();image(myWMovie, 0, 0);}
else if(nya.markerid==1){myLMovie.read();image(myLMovie, 0, 0);}

No comments:

Post a Comment