watch video at vimeo:
http://www.vimeo.com/8865470stopmotion machine is a sketch distributed in exported applet-form and open source.
it uses control the playstation 3 eye camera and controlp5 to have a seperate control window for controls and onion slicing (showing the old frame and the new mixed together) and a liveview window.
it has the following options:
save images on/off
demo/camera mode
debugging terminal in control window
'new movie' naming
framerate
it is in alpha phase still but fully functional and colol looking. plus easy to use and transparent in terms of that you get told through the debugging terminal everything the programm does IN ENGLISH hehe
the reason for alpha is that the programm has two fades that are not doing anything yet, plus the only option to use a ps3 eye camera.
these plus other features will be released soon.
beta testing supplied by kenneth danielsen
kind regards johannes gardsted jorgensen
http://ibeams.orgupdates:i am putting a ready to use package to my site
here is the source code:
[code]
import controlP5.*;
import processing.video.*;
import ru.cleoag.*;
PS3Eye p;
PImage img;
int a=1;
PImage screenshot;
PImage screenshotforsaving;
int cnt=0;
int cameraWidth = 640;
int cameraHeight = 480;
int cameraRate = 60;
Movie myMovie;
MovieMaker mm;
Textarea myTextarea;
String theValue;
int choice;
String tekst="\nhello from the stopmotion machine!\n\nsoftware made by:\nJohannes Gardsted Jorgensen\nreachable at:\nibeams.org";
Textfield field;
boolean showcircle=true;
boolean saveImages=false;
String movieName="nothing";
String imageName="nothing";
int fps=30;
int size = 60; // Width of the shape
float xpos, ypos; // Starting position of shape
float xspeed = 2.8; // Speed of the shape
float yspeed = 2.2; // Speed of the shape
int xdirection = 1; // Left or Right
int ydirection = 1;
ControlP5 controlP5;
ControlWindow controlWindow;
ControlWindowCanvas cc;
public int sliderValue = 40;
public int sliderValue1 = 40;
void setup() {
size(640,480);
frameRate(60);
xpos = width/2;
ypos = height/2;
p = new PS3Eye(this);
p.start(cameraWidth,cameraHeight,cameraRate);
screenshot = loadImage("vj.jpg");
img = createImage(cameraWidth,cameraHeight,RGB);
int controlwidth=410;
int controlheight=200;
controlP5 = new ControlP5(this);
controlP5.setAutoDraw(false);
controlWindow = controlP5.addControlWindow("controlP5window",100,100,controlwidth,controlheight)
;
controlWindow.hideCoordinates();
controlWindow.setBackground(color(40));
Controller mySlider = controlP5.addSlider("contrast",0,255,controlwidth-160,160,100,10);
Controller mySlider2 = controlP5.addSlider("brightness",0,255,controlwidth-160,180,100,10);
mySlider.setWindow(controlWindow);
mySlider2.setWindow(controlWindow);
Textfield field = controlP5.addTextfield("textField",controlwidth-160,10,150,20);
field.setWindow(controlWindow);
Controller bang1=controlP5.addBang("new_movie",10,10,50,20);
bang1.setWindow(controlWindow);
Controller bang2=controlP5.addBang("add_frame",70,10,50,20);
bang2.setWindow(controlWindow);
Controller bang4=controlP5.addBang("end_record",130,10,50,20);
bang4.setWindow(controlWindow);
Controller bang3=controlP5.addBang("home",190,10,50,20);
bang3.setWindow(controlWindow);
Controller toggle1=controlP5.addToggle("demo_or_camera",false,10,controlheight-30,10,10);
toggle1.setWindow(controlWindow);
Controller toggle2=controlP5.addToggle("save_images",false,100,controlheight-30,10,10);
toggle2.setWindow(controlWindow);
controlWindow.setTitle("control");
myTextarea = controlP5.addTextarea("myTextarea2", tekst,controlwidth-160,50,150,100);
myTextarea.moveTo(controlWindow);
mySlider.setWindow(controlWindow);
myTextarea.setText(tekst);
myTextarea.setColorForeground(0xffff0000);
cc = new MyCanvas();
cc.pre(); // use cc.post(); to draw on top of the controllers.
controlWindow.addCanvas(cc);
myMovie = new Movie(this, "station.mov");
myMovie.loop();
myMovie.frameRate(2);
}
void movieEvent(Movie myMovie) {
myMovie.read();
}
void draw() {
//myMovie.jump(random(sliderValue*f,sliderValue1*f));
controlP5.draw();
switch(choice){
case 1:
tekst="enter a framerate between 10 and 100 and press enter"+"\n"+tekst;
myTextarea.setText(tekst);
choice=2;
break;
case 2:
if(key==10 && keyPressed==true){
if(theValue!=null&&theValue.length()==2){
fps=Integer.parseInt(theValue);
choice=3;}else{
tekst="not a real framerate, try again"+"\n"+tekst;
myTextarea.setText(tekst);
}
}
break;
case 3:
tekst="write a name for the file, using the textfield and press enter"+"\n"+tekst;
myTextarea.setText(tekst);
choice=4;
keyPressed=false;
break;
case 4:
if(key==10 && keyPressed==true){
newMovie();
tekst="start adding new frames press 'add frame' or your hotkey"+"\n"+tekst;
myTextarea.setText(tekst);
choice=0;
}
break;
}
//ps3 eye camera on
if(showcircle==false){
p.update();
p.imageCopy(img.pixels);
img.updat