Thursday, April 22, 2010

Proof of Concept: Snowcrash Effect

Here we go.

Using FFMPEG and Netpbm in Cygwin I created an effect that turned out very close to what I had in mind. With more time I can clean the images up, and I probably need different film footage with more consistent lighting. Anyway I'm very proud of what I produced, which is an original effect that has probably been done before but while I searched, it was to be ungooglable.

I started with two versions of my video footage, one with the green masked out and the other with red masked out. To create the mask I converted the selected brightness of red and green to blue and red respectively. This was done to avoid too much of the image to be masked and gave me more control in this aspect.

With the red masked out, I placed the subject in video footage into the first background which was the garage. I then created a mask from the green and applied it to the second background which was the dojo and ninja suit. I merged the two and created an animated video which shows the figure in the garage, then the original background is pulled off of everything around him to leave him standing as a ninja training in a dojo.





#!/bin/bash

# create folders for images

mkdir blueconvert

mkdir bluemasked

mkdir RedImages

mkdir maskinvert

mkdir merged

mkdir Snowcrashed

mkdir GreenImages

mkdir FinalMerge

mkdir GreenMask

mkdir greenconvert


# extract images from Original video file

echo "Extracting Images"

ffmpeg -i RedFootage.avi -f image2 RedImages/%d.ppm

ffmpeg -i GreenFootage.avi -f image2 GreenImages/%d.ppm



# Take wanted red from all images Blue for mask

echo "Turn Red To Blue"

FILES=RedImages/*.ppm
b=1

for i in $FILES

do

ppmchange -closeness=29 red blue RedImages/$b.ppm >blueconvert/$b-blue.ppm
let b=$b+1
done

# Take all the blue and mask it out

echo "Make mask out of blue"

FILES2=blueconvert/*-blue.ppm
c=1

for i in {1..76}

do

ppmcolormask -color blue blueconvert/$c-blue.ppm >bluemasked/$c-masked.pbm
let c=$c+1
done

# Invert the color mask

echo "Inverting Mask"

FILES3=bluemasked/*-masked.pbm
d=1

for i in {1..76}

do

pnminvert bluemasked/$d-masked.pbm >maskinvert/$d-maskinvert.pbm
let d=$d+1
done

# Merge the background with the foreground

echo "Merging Images"

FILES4=maskinvert/*-maskinvert.pbm
e=1

for i in {1..76}

do

pamcomp background/FirstBackground.ppm RedImages/$e.ppm -alpha=maskinvert/$e-maskinvert.pbm >merged/$e.ppm

pamcomp background/FirstBackground.ppm RedImages/$e.ppm -alpha=maskinvert/$e-maskinvert.pbm >FinalMerge/$e.ppm

let e=$e+1
done

# Take wanted green from all images Red for mask

echo "Turn Green To Red"

FILES=GreenImages/*.ppm
z=1

for i in {1..76}

do

ppmchange -closeness=40 green red GreenImages/$z.ppm >greenconvert/$z-green.ppm
let z=$z+1
done

# Create Mask for Green Image

echo "Creating Mask for Green Image"

FILES5=greenconvert/*-green.ppm
f=1

for i in {1..76}

do

ppmcolormask -color red greenconvert/$f-green.ppm >GreenMask/$f-masked.pbm
let f=$f+1
done

# Apply Green Masked to the merged images

echo "Applying Green Mask to Images"

FILES6=GreenMask/*-masked.pbm
g=1
h=26

for i in {1..76}

do

pamcomp background/FinalBackground.ppm merged/$g.ppm -alpha=GreenMask/$g-masked.pbm >FinalMerge/$h.ppm
let g=$g+1
let h=$h+1
done

#convert manipulated images into a video

echo "Creating Video"

ffmpeg -f image2 -i FinalMerge/%d.ppm Snowcrashed/SnowcrashedOutput.avi

Friday, April 16, 2010

Film Footage: Snow Crash Effect

Looks rough right now but maybe you can start to get an idea for what my effect is going to look like with this footage I have filmed.



The lighting inconsistency with the green sheet is intentional for the effect.

Sunday, April 11, 2010

Rio Grande Valley SIGGRAPH Meeting: The Making of Tim Burton's Alice in Wonderland

An interesting presentation and Q&A session by Bob Winter, CG Supervisor of Sony Imageworks Albuquerque branch, and Jeff Schu, Lead Animator, for the latest film incarnation of "Alice In Wonderland" was held this past Saturday.

Bob Winter explained how the movies effects were created and how every frame of this film was manipulated in some way, either digitally or physically. What I found surprising about his explanation is that when applying the effects, most of the characters were not computer generated, but distorted afterward. For example, in the scenes with the Queen of Hearts, Helena Bonam Carter's scene is shot multiple times from multiple angles, with and without every single character in the scene, then the distortion to make her head gigantic and her body tiny is applied; without turning her into a computer generated character (the technique I wrongfully believed was being used at first). The scene is then pieced back together and she seamlessly interacts with the other characters in that scene.

Jeff Schu broke down one shot of the movie, illustrating the steps that an animator must go through to get to the final polished product. They start with a very rough animatic given to them by the director, and work up a rough CG animation based on this animatic which goes back to the director. There is a back and forth with the animators and director over the course of two and a half months, an animation is worked up and sent to the director and he sends his review of the latest one explaining what he likes, dislikes, what should be added, removed or any new ideas he came up with. After the two months of discourse, the final polished 10 seconds of animation is ready to be put into place with the rest of the movie. It wasn't a surprise to me how much work goes into movies like "Tim Burton's Alice In Wonderland" but it was surprising to see how the animators work with a director they never even meet.

And just for the hell of it, VIA College Humor, this is how I imagine it really is to work with Tim Burton.

Friday, April 9, 2010

Script Clip Storyboard: Snowcrash Effect


In my storyboard I depict a scene where Hiro puts the sunglasses on and the room around him becomes the digital realm. I plan to have the real room "un-peel" itself off of him and his surroundings.


For my concept in separating background from foreground objects, using green screen techniques or others, I am creating an effect inspired by the book Snow Crash. In the book the protagonist, Hiro Protagonist; who is also the hero, dons a set of goggles that place him virtually into an internal digital network where he has access to a wealth of information and also a dojo where he can practice with his samurai sword, which is in reality a piece of rebar.