COMP CAM: Final documentation 1

Sae and my final project, currently titled “Cave temple for training digital ninjas,” incorporated ideas and work from a few of the projects we worked on during the semester.  We were interested in using Pepper’s Ghost along with live video feeds to put people in a new space.  At first we were interested in doing an installation in an abandoned store front, using a video feed with some effects like the video filters I had made and background cancelation so people could see themselves as ghosts in real time.  Unfortunately, none of the real estate agents I tried calling ever responded to my messages.

So we decided to do something smaller scale and eventually settled on a cave.  The cave was inspired by an interest in meditation and self discovery.  We planned to project people into the cave as they were looking into it, seeing themselves journey into the cave, projected on several plexi glass Pepper’s ghost screens.  First, we build a prototype with three screens.

This video is a test, using a video of Loie Fuller, with the RGB images separated across three screen to show the depth.

Once we had that working, we started building the cave.  We cut up a large piece of foam, made a big volume, then cut the cave from it.  We cut two tunnels and filled them with plexi and fit the cave to the top of a monitor, where we would be projecting video feeds and fx.

You can see the Apple default background, which actually looks pretty cool, reflected in the cave.

Then we carved out the top of the cave to look like a big stone, painted it with white primer, a layer of reddish spray paint, and a layer of grey spray paint.  We sanded everything done to get a ruddy gray color.

We made a little rock to hold the camera.

Once we had that set up, we created a little scene with a fortune cat and a camera to get our live feeds.  We put video filters on the feeds to create two feelings, one for each entrance into the cave, the first being slow and serene, the second fast and frenetic.  We also read ascii values out of the image files we were taking in with the camera to create the weird background text, which is supposed to recreate the Apple default background.  The effects we used looked something like this:

This imagery, of course, is project inside the cave onto different layers, to get a 3D effect.  When we showed the project in class, it was a bit disappointing, because there was too much going inside the cave, and our intentions were not very clear.  We decided to revamp the project for the show, to include a live meditating subject to be projected into the middle of the cage, and a reworked version of the text effects to look more like the Apple default background, and then removing the crazy effects completely.

I will document the progress for our new project in a second part.

Here’s code for the FX, written in processing:

PImage bkgCancel(Capture feed, PImage bkg) {
  Capture video = feed;
  PImage b = bkg;
  PImage img = createImage(w, h, ARGB);
  int n = w*h;
  float thresh = 100;
  float d = 0;

  //if (video.available()) {
  //video.read(); // Read a new video frame
  video.loadPixels(); // Make the pixels of video available
  // Difference between the current frame and the stored background
  for (int i = 0; i < n; i++) {      color currColor = video.pixels[i];     color bkgdColor = b.pixels[i];     float r1 = red(currColor);     float g1 = green(currColor);     float b1 = blue(currColor);     float r2 = red(bkgdColor);     float g2 = green(bkgdColor);     float b2 = blue(bkgdColor);     d = dist(r1, g1, b1, r2, g2, b2);     img.loadPixels();     if (d > thresh) {

      img.pixels[i] = video.pixels[i];
    } 
    else {
      img.pixels[i] = color(0, 0, 0, 0);

      img.updatePixels();
      video.updatePixels();
    }
  }
  //}
  return img;
}
PImage slow_fader(PImage img) {
  simg = img;

  if (xsignal > simg.width-1 || xsignal < 0) {      xdirection = xdirection * -1;   }    else {     xsignal += (speed*xdirection);   }   if (ysignal > simg.height-1 || ysignal < 0) { 
    ydirection = ydirection * -1;
  } 
  else {
    ysignal += (speed*ydirection);
  }

  simg.loadPixels();

  ximg.loadPixels();
  int xsignalOffset = int(xsignal)*simg.width;
  for (int x = 0; x
PImage scary(PImage img1, PImage img2) {
  s1 = img1;
  s2 = img2;
  float thresholder = 100;

  s1.loadPixels();
  s2.loadPixels();
  for (int x = 0; x thresholder) {
        //if so display the foreground color
        //vloop.pixels[loc] = color(0,0,0,0);
        float r = abs((red(vc)-red(bc))); 
        float g = abs((green(vc)-red(bc)));
        float b = abs((blue(vc)-blue(bc)));

        s2.pixels[loc] = color(r, g, b, 255);
      } 
      else {
        //if not display green
        //vloop.pixels[loc] = color(red(bc), green(bc), blue(bc)+10, 220);
        s2.pixels[loc] = color(0, 0, 0, 0);
      }
      //vloop.pixels[loc] = img.pixels[loc];
    }
  }

  s1.updatePixels();
  s2.updatePixels();

  return s2;
}

And code for the text fx:

  ////////BACKGROUND TEXT SECTION
  if (cap) {

    if (bkgcount > txtlines.length-2) {
      bkgcount = 0;
    } 
    else {
      bkgcount++;
    }
    bkgs = txtlines[bkgcount];
    if (bkga > height/50) {
      bkga = 0;
    } 
    else {
      bkga++;
    }

    if (millis() > bkgtimer + bkgtime) {
      for (int k = 0; k < bkgs.length(); k++) {
        fill(random(225), random(10), random(255));

        pushMatrix();
        translate(200, 0);
        text(bkgs.charAt(k), k*random(10), random(100, 200)+bkga*bkgc);
        text(bkgs.charAt(k), k*random(5), random(200, 250)+bkga*bkgc);
        text(bkgs.charAt(k), k*random(20), random(1200, 1210)+bkga*bkgc);
        text(bkgs.charAt(k), k*random(2), random(10, 50)+bkga*bkgc);
        text(bkgs.charAt(k), k*random(3), random(30, 35)+bkga*bkgc);
        popMatrix();
      }
      bkgtimer = millis();
      bkgtime = sin(bkgsine) * 100;
      bkgsine += bkginc;
      bkgc = random(200);
    }
  }
Advertisements

Author: owen ribbit

poop

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s