View this PageEdit this PageAttachments to this PageHistory of this PageHomeRecent ChangesSearch the SwikiHelp Guide

Movie Effect: Sprint Ahead

Have you seen the commercials for Sprint where people make figures with light in the air?
sprintahead.jpg
http://www.sprint.com/ahead
Here's a saved bit of one of them: sprintcommercial.mov

At Dan Garcia's encouragement, I tried to duplicate it in JES. (Anyone want to do a Java version?)
Here's the basic algorithm:

Here's the .py file: dragTrace.py

And here's the code:
import os

def dragTrace(fromDir,target,level):
  allFiles = os.listdir(fromDir)
  allFiles.sort()
  fromPictFile = allFiles[0]
  fromPict = makePicture(fromDir+fromPictFile)
  for toPictFile in allFiles[1:]:
    printNow(toPictFile)
    # Copy all the high luminance colors from fromPict to toPict
    toPict = makePicture(fromDir+toPictFile)
    for p in getPixels(fromPict):
      if luminance(p) > level:
        c = getColor(p)
        setColor(getPixel(toPict,getX(p),getY(p)),c)
    writePictureTo(toPict,target+toPictFile)
    fromPict = toPict
  
def luminance(apixel):
  return (getRed(apixel)+getGreen(apixel)+getBlue(apixel))/3.0

#In one method, because they take a LONG time
def dopaints():
  dragTrace("/home/guzdial/cs1315/moviepainting/paint1-20fps/","/home/guzdial/cs1315/moviepainting/paint1-paint/",100)
  dragTrace("/home/guzdial/cs1315/moviepainting/paint2-10fps/","/home/guzdial/cs1315/moviepainting/paint2-paint/",100)
  dragTrace("/home/guzdial/cs1315/moviepainting/paint3/","/home/guzdial/cs1315/moviepainting/paint3-paint/",100)
  dragTrace("/home/guzdial/cs1315/moviepainting/paint4/","/home/guzdial/cs1315/moviepainting/paint4-paint/",100)
  dragTrace("/home/guzdial/cs1315/moviepainting/paint5/","/home/guzdial/cs1315/moviepainting/paint5-paint/",100)
  dragTrace("/home/guzdial/cs1315/moviepainting/paint6/","/home/guzdial/cs1315/moviepainting/paint6-paint/",100)


Examples


Here's the first try, with a glow stick: paint1.avi
paint1 001.jpg
Here are the burst frames, if you want to play: paint1-20fps.zip

Here's the generated movie: paint1.mpg
Last frame:
paint1 506.jpg


We found that using a flashlight worked even better (but don't shine directly at the camera!)
Movie: paint4.avi
First frame: paint4001.jpg
Burst frames: paint4.zip

Here's the result: paint4.mpg
Last frame:
paint4157.jpg

More examples (all with a glow stick)


Links to this Page