Tuesday, May 11, 2010

IFDM Final
Here is the final video of the IFDM assignment. The piece is inspired by the commercial world of Times Square in New York and the world of high fashion. A Prada commercial, which incorporates the illustrations of James Jean, was especially motivating. The advertisement can be found here. Another influence was a commercial by Louis Vuitton, which in turn was inspired by superflat artist Takashi Murakami. Our piece derives more of it's composition from the Prada video, with it's smooth, dream-like atmosphere. The color scheme and narrative are closer to the Louis Vuitton work. Both have more of a hallucinigenic brightness to them, as well as a more cheeky story to tell. In the Louis Voitton world, a little girl is swallowed by a panda to enter a world of fancy. Heart Image follows the path of a heart, the pseudo logo of our company, as it makes it's way, beatifically down to the streets of Times Square.
Our piece hopes to capture the glamor and energy of both the worlds it takes inspiration from.

Saturday, May 1, 2010

Midterm "Assignment 5"

MIDTERM
For this assignment we were assigned to take a movie and dump the frames into a folder and edit them to be something different. For this I changed my frames from color to black and white using gimp. I then used my terminal to execute all my scripting and coding.




Converting and Putting Frames in Tmpframe
This code here is my first code that converted the video from mts to mpg and then dumped the frames into tmpframe:

183 ffmpeg
184 cd ~/Documents/
185 ls
186 ls -l | grep INTRO*
187 cd INTRO\ TO\ MODELING/
188 ls
189 ffmpeg -i 00012.MTS -s 640x480 car.mpg
190 ls
191 mkdir tmpframe
192 ffmpeg -i car.mpg -f image2 tmpframe/frame-%04d.ppm
193 ppminvert frame-0001.ppm > inverted.ppm

Rename
This first script was ran to rename all the frames from having the 0001 to just being a number from 1 to 630:

#!/bin/bash

# Script to remove excess zeros from file names

clear


i=100

while [ $i -ge 100 ]
do
mv frame-0$i.ppm frame-$i.ppm
i=$[ $i+1 ]
done


Convert
This script used ffmpeg to convert all the frames from ppm to jpg:

#!/bin/bash

# Script to convert ppm files to jpeg

clear

i=1

while [ $i -le 630 ]
do
ffmpeg -i frame-$i.ppm frame-$i.jpg
i=$[ $i+1 ]
done


MAking Frames Back Into a Movie
This is the script that put all the frames back together into an mpg movie:

#!/bin/bash
# Natasha Keller
# Script to Make MPG Movie using FFMPEG

clear

echo "Executing script to convert PPM files to AVI format"

## Initially tried using a while loop
# then found single line in man page that would
# accomplish what i needed.

# This program when ran after the conversion to JPG
# program will conver the JPG images into an MPEG movie

# Note: The default framerate, bit rate, and size were used


#i=1

#while [ $i -le 630 ]
#do


ffmpeg -f image2 -i frame-%d.jpg out.mpg

#i=$[ $i+1 ]
#done

echo "Movie complete. Please view out.avi in Quicktime."

Monday, April 26, 2010

Green Screen Compositing Project

Green Screen Video:
Done in Maya


Camera got a little wacky at the end, something we will fix for the final.

Compositing Code:

'Green Screen Compositing

Strict

Global AppTitle$="Green Screen Compositor"

Graphics(800,600)


Global PixMapBack:TPixmap
Global PixMapFront:TPixmap
Global PixMapResult:TPixmap
Global PixMapBKsmall:TPixmap
Global PixMapFsmall:TPixmap
Global PixMapResultSmall:TPixmap
Global i,j,pixel,PixTmp:Long
Global autotest:String
Global BaseBackName:String="bk"
Global BaseForegroundName:String="fg"
Global BKindexString:String="0001"
Global FGindexString:String="0001"
Global BKindex:Int=1, FGindex:Int=1
Global Backgroundfile:String = "bk0001.png"
Global Foregroundfile:String = "fg0001.png"

'--- Build file names if command line arguments are present
If AppArgs.length > 2
Backgroundfile = AppArgs[1] + "0001.png"
foregroundfile = AppArgs[2] + "0001.png"
EndIf

'---- Create full size background and foreground pixmaps
PixMapBack = LoadPixmapPNG(Backgroundfile)
PixMapFront = LoadPixmapPNG(Foregroundfile)

'---- Creae full size result pixmap
PixMapResult = CreatePixmap(720,480,PixmapFormat(PixMapBack))

'---- Create half size pixmaps for display purposes
PixMapBKsmall = CreatePixmap(360,240,PixmapFormat(PixMapBack))
PixMapFsmall = CreatePixmap(360,240,PixmapFormat(PixMapBack))
PixMapResultSmall = CreatePixmap(360,240,PixmapFormat(PixMapBack))

ProcessImage()

If AppArgs.length > 3 Then autotest = AppArgs[3] Else autotest = "manual"


'********************** Main Loop *********************************
If autotest = "auto" '--- If command line arg3="auto" then process all images and exit
UpdateDisplay()
Flip
AllFrames()
Else

While Not KeyDown(KEY_ESCAPE) And Not AppTerminate()
UpdateDisplay()
Flip

If KeyHit(KEY_COMMA) Then PreviousFrame()
If KeyHit(KEY_PERIOD) Then NextFrame()
If KeyHit(KEY_SPACE) Then AllFrames()
Wend
EndIf
End


'------------------ Process All frames after current frame ------------------------
Function AllFrames()
Local Done = 1

While Done <> Null And Not KeyHit(KEY_ESCAPE)
Done = NextFrame()
If Done <> Null
UpdateDisplay()

'--------- Display ESCAPE message
SetColor(210,210,210)
DrawRect(420,50,350,30)
SetColor(0,0,0)
DrawText("Press ESCAPE to stop",422,52)
SetColor(255,255,255)

Flip
EndIf
Wend

If Done = Null
PreviousFrame() '--- Back up to last good image file
Else
Flip
SetColor(210,210,210)
DrawRect(420,50,350,30)
SetColor(255,0,0)
DrawText("Release ESCAPE now",422,52)
SetColor(255,255,255)
Flip

While KeyDown(KEY_ESCAPE)
'--- Wait for escape key to be released
Wend
EndIf

End Function




'------------------ Move to next frame (Return null if file error) -------------
Function NextFrame:Int()
Local LoadResult

BKindex = BKindex + 1
BKindexString = String.fromint(BKindex)
BKindexString = AddZeros(BKindexString)
Backgroundfile = BaseBackName + BKindexString + ".png"

FGindex = FGindex + 1
FGindexString = String.fromint(FGindex)
FGindexString = AddZeros(FGindex)
Foregroundfile = BaseForegroundName + FGindexString + ".png"
LoadResult = LoadPix()
If LoadResult <> Null Then ProcessImage()
Return LoadResult
End Function



'------------------ Move to previous frame (Stop at frame 1) ------------------
Function PreviousFrame:Int()
Local LoadResult

BKindex = BKindex - 1
If BKindex < 1 Then BKindex = 1
BKindexString = String.fromint(BKindex)
BKindexString = AddZeros(BKindexString)
Backgroundfile = BaseBackName + BKindexString + ".png"

FGindex = FGindex - 1
If FGindex < 1 Then FGindex = 1
FGindexString = String.fromint(FGindex)
FGindexString = AddZeros(FGindex)
Foregroundfile = BaseForegroundName + FGindexString + ".png"

LoadResult = LoadPix()
If LoadResult <> Null Then ProcessImage()
Return LoadResult
End Function





'-------------------- Load Pixmap files (Return null if file error) ---------------
Function LoadPix:Int()
PixMapBack = LoadPixmapPNG(Backgroundfile)
If PixMapBack <> Null Then PixMapFront = LoadPixmapPNG(Foregroundfile)
If PixMapBack = Null Or PixMapFront = Null
Return Null
Else
Return 1
EndIf

End Function



'------------------ Add zeros to beginning of string to fill in 4 digits ---------
Function AddZeros:String(strin:String)
Local i:Int

For i = 1 To 4
If strin.length < 4 Then strin = "0" + strin
Next

Return strin
End Function




'-------------------------- Draw Frame around picture -----------------------
Function DrawFrame(Posx:Int, Posy:Int, SizeX:Int, SizeY:Int)
'SetColor(60,60,60)
'DrawRect(Posx,Posy,SizeX+2,SizeY+2)
SetColor(127,127,127)
'DrawRect(Posx-1,Posy-1,SizeX+4,SizeY+4)
'SetColor(220,220,220)
DrawRect(Posx-2,Posy-2,SizeX+6,SizeY+6)
SetColor(255,255,255)
EndFunction




'----------------------- Process the Foreground and Background Images ------------------------------------
Function ProcessImage()
Local rd,gr,bl

'--- Make a half size background image to display
For i = 0 To 359
For j = 0 To 239
pixel = ReadPixel(PixMapBack,2*i,2*j)
WritePixel(PixMapBKsmall,i,j,pixel)
Next
Next

'--- Make a half size foreground image to display
For i = 0 To 359
For j = 0 To 239
pixel = ReadPixel(PixMapFront,2*i,2*j)
WritePixel(PixMapFsmall,i,j,pixel)
Next
Next

'--- Make composite picture
For i = 0 To 719
For j = 0 To 479
'--- Copy background image unchanged
pixel = ReadPixel(PixMapBack,i,j)
WritePixel(PixMapResult,i,j,pixel)

'--- Copy only non-green pixels from foreground image
pixel = ReadPixel(PixMapFront,i,j)
rd = (pixel & $0FF0000) Shr 16 'Get RED part of pixel
gr = (pixel & $0FF00) Shr 8 'Get GREEN part of pixel
bl = pixel & $0FF 'Get BLUE part of pixel
'--- IF pixel is not mostly GREEN, then copy it to result image
If ((gr - rd + gr - bl) < $080) Then WritePixel(PixMapResult,i,j,pixel)
Next
Next

'--- Make a half size result picture to display
For i = 0 To 359
For j = 0 To 239
pixel = ReadPixel(PixMapResult,2*i,2*j)
WritePixel(PixMapResultSmall,i,j,pixel)
Next
Next

SavePixmapJPeg(PixMapResult,"Result" + FGindexString + ".jpg")

EndFunction




'---------------- Update the display ---------------------
Function UpdateDisplay()
Cls() 'Clear the screen

'--- If right mouse button the display the color under the cursor
If MouseDown(2)
PixTmp = ReadPixel(PixMapFront,MouseX(),MouseY())
DrawText(Hex$(PixTmp),600,100)
EndIf

'--- Draw a small background picture
DrawFrame(4,44,360,240)
DrawPixmap(PixMapBKsmall,5,47)

'--- Draw a small foreground picture
DrawFrame(4,339,360,240)
DrawPixmap(PixMapFsmall,5,340)

'--- Draw a small result picture
DrawFrame(399,179,360,240)
DrawPixmap(PixMapResultSmall,400,180)


'--------- Display Keyboard instructions --------------
SetColor(210,210,210)
DrawRect(420,480,350,100)
SetColor(0,0,0)
DrawText(" Controls:",422,482)
DrawText("'>' for next frame",422,498)
DrawText("'<' For previous frame",422,514)
DrawText("'SPACE' to process all frames",422,530)
DrawText(BaseBackName + "--" + BaseForegroundName + " " + BKindex + " " + FGindex, 422,546)
SetColor(255,255,255)

End Function



echo off

if [%1]==[] goto usage
if [%2]==[] goto usage

::Execute the green screen compositing program
greenscreen1 %1 %2 auto
::Next execute ffmpeg to convert the result to an AVI movie file
ffmpeg -i Result%%4d.jpg result.mpg

goto done

:usage
echo "Missing file names !!!"
echo " "
echo " Usage:"
echo "composite BackgroundFileName ForegroundFileName"
echo " "
echo "BackgroundFileName is the base name of the first of the sequence of background images"
echo " example: if your first image file is bk0001.png then BackgroundFileName will be bk"
echo " "
echo "ForegroundFileName is the name of the first of the sequence of green screen images"
echo " example: if your first image file is fg0001.png then ForegroundFileName is fg"
echo " "
echo " Note: file names must have a four digit number at the end and must be png files"
echo " "

:done

Thursday, April 8, 2010

Storyboard For Big Project

Storyboards







For our project our concept is an add that promotes a fashion store. In the add we have a logo that goes through New York City and paints the town. Our logo that we have chosen is a heart. Our heart will be designed and decorated. The logo will float through NYC and "paint" the city. The city will be bland and as the heart floats to the city we will add texture to the buildings.

Sunday, March 28, 2010

Some Movies I Have Seen Recently

Alice in Wonderland

This was an awesome movie. The special effects were pretty amazing. I saw this movie at century 24 in the new 3D XD theater. I really liked this movie it was entertaining and funny and all around fun.

Bounty Hunter

This movie was awesome! This movie is now one of my favorite movies. It was very funny. I recommend this movie to everyone! I give it an A for awesome!

Sherlock Holmes

Sherlock Holmes was a really good movie. I really enjoyed it. It was pretty much what I expected. With this film there are many possibilities for sequels and I hope to see another one in the future.

Tuesday, March 2, 2010

Terminal =]


Today in class we began learning how to use our Terminal.
Here's what we did in class:
ls
mkdir tmp
ls
>tmp
man ls
q
ls -a
cd ..
ls
>MH13
cd
ls
>tmp
cp -r tmp tmp2
ls
>tmp tmp2
mv tmp2 tmp3

(mv= move cp -r=copy rm= remove- becareful using rm- no UNDO- removes permanent)

rm -r tmp3
ls
>tmp

cd ..
cd..
cd home/(hit tab)
cd ../..
ls
>(computer information)

(tmp directory is a temporary junk folder that you can create and should not hold important info for long amounts of time or ever)


ls cygdrive
>c t
ls cygdrive/t
> (stuff)
ls cygdrive/t/cygwin/
>(stuff)

cd cygdrive/c/
>(Changes to directory cygdrive)
ls
> (cyg directory info)
cd /home/(hit tab)

date
>(todays date)
history
>(histroy of what you've done today)
history > /home/(tab)/fileName
cd~
ls
>tmp fileName
less fileName
>(your history)





We were told to take a tutorial on how to use the terminal. Being lucky my boyfriend has a degree in computer engineering and is working on his masters in the same now. I asked him to show me some things in my terminal.
Here's some of the stuff he showed me:


Thursday, February 25, 2010

COLOR WHEEL ASSIGNMENT FOUR

Color Wheel


The Code:
;Below makes the new image and displays it
(define img (car (gimp-image-new 512 512 0)))

(gimp-display-new img)

;this creates the new layer and adds it to the new picture
(define layer (car (gimp-layer-new img 512 512 0 "blah" 100 7)))

(gimp-image-add-layer img layer -1)

;this adds the points to the wedge
(gimp-free-select img 6 #(0 180 0 300 255 255) 2 TRUE FALSE 0)

;this creates the gradient
(gimp-edit-blend layer 0 0 0 100 0 FALSE FALSE TRUE 1 0 FALSE 0 255 255 255)

;this gives the gradient and wedge it's color
(gimp-context-set-foreground '(148 0 211))

(gimp-edit-blend layer 0 0 0 100 0 FALSE FALSE TRUE 1 0 FALSE 0 255 255 255)

;this defines the layer of the new wedge and does the same as above
(define layer (car (gimp-layer-new img 512 512 0 "blah" 100 7)))

(gimp-image-add-layer img layer -1)

(gimp-free-select img 6 #(0 180 0 300 255 255) 2 TRUE FALSE 0)

(gimp-edit-blend layer 0 0 0 100 0 FALSE FALSE TRUE 1 0 FALSE 0 255 255 255)

(gimp-context-set-foreground '(255 0 255))

(gimp-edit-blend layer 0 0 0 100 0 FALSE FALSE TRUE 1 0 FALSE 0 255 255 255)
;this is the rotation which tells the position of the wedge
(gimp-selection-none img)

(gimp-rotate layer TRUE 6.75 )

;same as above for a new wedge
(define layer (car (gimp-layer-new img 512 512 0 "blah" 100 7)))

(gimp-image-add-layer img layer -1)

(gimp-free-select img 6 #(0 180 0 300 255 255) 2 TRUE FALSE 0)

(gimp-edit-blend layer 0 0 0 100 0 FALSE FALSE TRUE 1 0 FALSE 0 255 255 255)

(gimp-context-set-foreground '(128 0 0))

(gimp-edit-blend layer 0 0 0 100 0 FALSE FALSE TRUE 1 0 FALSE 0 255 255 255)

(gimp-selection-none img)

(gimp-rotate layer TRUE 7.22)

;same as above for a new wedge
(define layer (car (gimp-layer-new img 512 512 0 "blah" 100 7)))

(gimp-image-add-layer img layer -1)

(gimp-free-select img 6 #(0 180 0 300 255 255) 2 TRUE FALSE 0)

(gimp-edit-blend layer 0 0 0 100 0 FALSE FALSE TRUE 1 0 FALSE 0 255 255 255)

(gimp-context-set-foreground '(255 0 0))

(gimp-edit-blend layer 0 0 0 100 0 FALSE FALSE TRUE 1 0 FALSE 0 255 255 255)

(gimp-selection-none img)

(gimp-rotate layer TRUE 7.69)

;same as above for a new wedge
(define layer (car (gimp-layer-new img 512 512 0 "blah" 100 7)))

(gimp-image-add-layer img layer -1)

(gimp-free-select img 6 #(0 180 0 305 255 255) 2 TRUE FALSE 0)

(gimp-edit-blend layer 0 0 0 100 0 FALSE FALSE TRUE 1 0 FALSE 0 255 255 255)

(gimp-context-set-foreground '(255 127 0))

(gimp-edit-blend layer 0 0 0 100 0 FALSE FALSE TRUE 1 0 FALSE 0 255 255 255)

(gimp-selection-none img)

(gimp-rotate layer TRUE 8.18)

;same as above for a new wedge
(define layer (car (gimp-layer-new img 512 512 0 "blah" 100 7)))

(gimp-image-add-layer img layer -1)

(gimp-free-select img 6 #(0 180 0 307 255 255) 2 TRUE FALSE 0)

(gimp-edit-blend layer 0 0 0 100 0 FALSE FALSE TRUE 1 0 FALSE 0 255 255 255)

(gimp-context-set-foreground '(255 255 0))

(gimp-edit-blend layer 0 0 0 100 0 FALSE FALSE TRUE 1 0 FALSE 0 255 255 255)

(gimp-selection-none img)

(gimp-rotate layer TRUE 8.67)

;same as above for a new wedge
(define layer (car (gimp-layer-new img 512 512 0 "blah" 100 7)))

(gimp-image-add-layer img layer -1)

(gimp-free-select img 6 #(0 180 0 310 255 255) 2 TRUE FALSE 0)

(gimp-edit-blend layer 0 0 0 100 0 FALSE FALSE TRUE 1 0 FALSE 0 255 255 255)

(gimp-context-set-foreground '(172 255 50))

(gimp-edit-blend layer 0 0 0 100 0 FALSE FALSE TRUE 1 0 FALSE 0 255 255 255)

(gimp-selection-none img)

(gimp-rotate layer TRUE 9.18)

;same as above for a new wedge
(define layer (car (gimp-layer-new img 512 512 0 "blah" 100 7)))

(gimp-image-add-layer img layer -1)

(gimp-free-select img 6 #(0 180 0 320 255 255) 2 TRUE FALSE 0)

(gimp-edit-blend layer 0 0 0 100 0 FALSE FALSE TRUE 1 0 FALSE 0 255 255 255)

(gimp-context-set-foreground '(0 255 0))

(gimp-edit-blend layer 0 0 0 100 0 FALSE FALSE TRUE 1 0 FALSE 0 255 255 255)

(gimp-selection-none img)

(gimp-rotate layer TRUE 9.73)

;same as above for a new wedge
(define layer (car (gimp-layer-new img 512 512 0 "blah" 100 7)))

(gimp-image-add-layer img layer -1)

(gimp-free-select img 6 #(0 180 0 325 255 255) 2 TRUE FALSE 0)

(gimp-edit-blend layer 0 0 0 100 0 FALSE FALSE TRUE 1 0 FALSE 0 255 255 255)

(gimp-context-set-foreground '(0 255 127))

(gimp-edit-blend layer 0 0 0 100 0 FALSE FALSE TRUE 1 0 FALSE 0 255 255 255)

(gimp-selection-none img)

(gimp-rotate layer TRUE 10.3)

;same as above for a new wedge
(define layer (car (gimp-layer-new img 512 512 0 "blah" 100 7)))

(gimp-image-add-layer img layer -1)

(gimp-free-select img 6 #(0 180 0 330 255 255) 2 TRUE FALSE 0)

(gimp-edit-blend layer 0 0 0 100 0 FALSE FALSE TRUE 1 0 FALSE 0 255 255 255)

(gimp-context-set-foreground '(0 255 255))

(gimp-edit-blend layer 0 0 0 100 0 FALSE FALSE TRUE 1 0 FALSE 0 255 255 255)

(gimp-selection-none img)

(gimp-rotate layer TRUE 10.88)

;same as above for a new wedge
(define layer (car (gimp-layer-new img 512 512 0 "blah" 100 7)))

(gimp-image-add-layer img layer -1)

(gimp-free-select img 6 #(0 180 0 332 255 255) 2 TRUE FALSE 0)

(gimp-edit-blend layer 0 0 0 100 0 FALSE FALSE TRUE 1 0 FALSE 0 255 255 255)

(gimp-context-set-foreground '(0 191 255))

(gimp-edit-blend layer 0 0 0 100 0 FALSE FALSE TRUE 1 0 FALSE 0 255 255 255)

(gimp-selection-none img)

(gimp-rotate layer TRUE 11.47)

;same as above for a new wedge
(define layer (car (gimp-layer-new img 512 512 0 "blah" 100 7)))

(gimp-image-add-layer img layer -1)

(gimp-free-select img 6 #(0 180 0 335 255 255) 2 TRUE FALSE 0)

(gimp-edit-blend layer 0 0 0 100 0 FALSE FALSE TRUE 1 0 FALSE 0 255 255 255)

(gimp-context-set-foreground '(0 0 255))

(gimp-edit-blend layer 0 0 0 100 0 FALSE FALSE TRUE 1 0 FALSE 0 255 255 255)

(gimp-selection-none img)

(gimp-rotate layer TRUE 12)



href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiC5ZCr8FdwYdmk7eIOnV-mIiNTCVpqlQprforiPZnPRi_YsjFq5KRLjwOgwWKMcVPhN754840HGZKGgZqbuDeRN376DMqfyueDxy1T_1hCTrklEOmuqaMlllUSR4ST_9K-sjLVcpMNYsFB/s1600-h/Picture+3.png">