Sunday, May 8, 2011

IFDM 210 -Final Project-

For my final project I made a script that opens and runs my altered pygame, saves every 5th image, and then adds an effect, and compiles them into a movie.

Not only did I use ffmpeg and imagemagick to alter still frames, but I also worked to create a script that first called my pygame in bash an ran it quickly (which I had been trying to get to work since we began working with terminal). Before, to run it I had to enter the python module and go through multiple commands just to open the game window, which was very tedious while I was altering and improving on it. Now, my code not only opens the game in a split second, but runs it as well.

With the addition of the code I added to the original pygame code, run.sh now also takes every 5 frames from the game, and saves them out in the pyspaceinvaders folder (inside the Game folder) as .png images.

From here, am able to use imagemagick and ffmpeg to alter them further, and compile them into a movie.

I call them with imagemagick, to cycle through the still frames and apply a swirl effect with a for loop. After this is completed, I coded ffmpeg to take those images, and compile them into a movie, and after doing so, delete the excess still frames remaining in the folder.

Overall, I used 3 different programs. Through the terminal, I used Python, (which has a different syntax than bash and requires more specified spacing), and before this project, I had been unsuccessful in making it run through a bash script. I also used imagemagick to alter the saved still frames, and then ffmpeg to compile them into the movie.

This project was very difficult for me, but in the end I figured it out, and I'm glad I did, because now I have a new outlook on programming, and will be using it more in the future.


LINK TO .ZIP FOLDER:

http://dl.dropbox.com/u/18940217/Bmoody210_Final.zip


EXAMPLE RESULT:

Saturday, May 7, 2011

ffmpeg test example movie

Project History Links

http://dl.dropbox.com/u/18940217/FinalProject_TerminalHistory.txt


http://dl.dropbox.com/u/18940217/TerminalFinalHistory_2.txt


These are the links to the history files for both my final project, and the test. I tend to leave my terminal running as long as possible so I can continue my work, so that is why there are only wo, but they are quite long.

Wednesday, May 4, 2011

Trying to figure out how to save each frame of a played video game as an image

I have been researching and working on this for a while now, for my final project.

I originally was going to do something using imagemagick and combining pictures, but I really like compiling image frames together to make a movie like we've been doing with ffmpeg.
I found something that my seem to work...


NEVERMIND_ Half way through this I tried something new, and it's moved me a little farther than it did before,

a window pops up now, but then it disappears,

I started using i instead of self.framenum, because it kept throwing an error on that, the window then began to pop up but threw an error saying that i was referenced before it was defined, so i went through and fixed this, and now it is saying this for my variable name file, but no longer for i- so I am making progress...

FFmpeg Test/homework

This is my ffmpeg code from the test/homework


It takes the still frames out of a movie, adds the frame numbers and an effect to each image (I have edge written in here, but it can be any imagemagick effect,I used sketch and charcoal too, but this one takes the least amount of time)


After it applies the effect to each image it then compiles them back into a movie called edge.mov and then deletes all the image files, so none are left behind.


Then you can play the video and see the effects it has, and the frame numbers.


I had alot of trouble with this assignment at first, but once I had time to sit down and work through it, I began to figure it out, and I'm really glad we got to do it as a homework assignment as well, because now that I've gotten it, I feel so much better on this subject.




rm edge.mov


ffmpeg -i jumps.mov -s hd720 -f image2 %07d-fresh.png

for((i=1; i<50; i++))

do

fresh=`printf "%07d-fresh.png" $i`





STRING="Frame Number $i"

echo $STRING



mogrify $fresh -draw "text 25,25 '$STRING'" $fresh

convert $fresh -edge 2 $fresh.bmp


#convert $fresh -colorspace gray -sketch 0x20+120 $fresh

#convert $fresh -colorspace gray \

#\( +clone -blur 0x2 \) +swap -compose divide -composite \

#-linear-stretch 5%x0% $fresh

done


ffmpeg -f image2 -i %07d-fresh.png.bmp -r 25 -b 10000k -s 1200x720 edge.mov


rm *.png

rm *.png.bmp

Thursday, April 21, 2011

INK

I recently watched the independent Sci-fi movie titled, "INK"


It was really cool, it was full of effects and interesting CGI, and it had a good story as well.
At first it was a little confusing with all the artistic effects they were employing, but after I got used to the rhythm of the film, I fell in love with it.
It also was filmed in Denver, CO which is where I'm from, and I actually met the director a few years ago, so It was cool to watch for that reason as well.

These are the kind of uses and computer effects I am interested in when it comes to film. How they used their effects worked very well. They had drawers that had been just smashed over someone's head fixing themselves in mid-air, and color filters that I have never seen before. It was a cool movie, and I highly recommended it.

Scripting

http://www.youtube.com/watch?v=0f4JsvZVNag

This is the scripting tutorial I have been trying to complete and get to work over the last week. I can get to the point where I have names my program and put what it will say inside, but I can't get it to show upon my desktop. I have been searching for some others- I already have learned how to run a pygame on my computer and play it through terminal

The scripting I have done for that (for pyspaceinvaders) is as follows:

import os
os.chdir('/pyspaceinvaders')
import pyspaceinvaders

(this is after you have successfully downloaded pygame and pyspaceinvaders to your computer)
It's actually really simple compared to what I thought this would be like before.

I am continuing to look for other interesting scripts- I'm trying to find one that will show me how to write a game!

Tuesday, April 12, 2011

Terminal bash Commands tutorial

For my first terminal bash commands tutorial, I watched both:

http://www.youtube.com/watch?v=AngF6K1YajU

and

http://www.youtube.com/watch?v=YlpE9a9pu6A


I tried multiple times to watch the ASCII art Star wars on my computer, but each time it said the connection timed out... I will keep trying, however I got all of the other commands to work!


Last login: Thu Apr 7 14:02:54 on ttys000
w00-129-24-75-20:~ Brynn$ say welcome to brunn's macintosh
>
>
> say welcome to brunn's macintosh


2011-04-12 13:35:26.795 say[13366:10b] Error loading /Library/QuickTime/Motion.component/Contents/MacOS/Motion: dlopen(/Library/QuickTime/Motion.component/Contents/MacOS/Motion, 262): Library not loaded: /Library/Application Support/ProApps/SharedA/Frameworks/ProCore.framework/Versions/A/ProCore
Referenced from: /Library/QuickTime/Motion.component/Contents/MacOS/Motion
Reason: image not found
2011-04-12 13:35:26.797 say[13366:10b] Error loading /Library/QuickTime/Motion.component/Contents/MacOS/Motion: dlopen(/Library/QuickTime/Motion.component/Contents/MacOS/Motion, 262): Library not loaded: /Library/Application Support/ProApps/SharedA/Frameworks/ProCore.framework/Versions/A/ProCore
Referenced from: /Library/QuickTime/Motion.component/Contents/MacOS/Motion
Reason: image not found

w00-129-24-75-20:~ Brynn$
w00-129-24-75-20:~ Brynn$
w00-129-24-75-20:~ Brynn$ say poop
2011-04-12 13:41:21.529 say[13371:10b] Error loading /Library/QuickTime/Motion.component/Contents/MacOS/Motion: dlopen(/Library/QuickTime/Motion.component/Contents/MacOS/Motion, 262): Library not loaded: /Library/Application Support/ProApps/SharedA/Frameworks/ProCore.framework/Versions/A/ProCore
Referenced from: /Library/QuickTime/Motion.component/Contents/MacOS/Motion
Reason: image not found
2011-04-12 13:41:21.531 say[13371:10b] Error loading /Library/QuickTime/Motion.component/Contents/MacOS/Motion: dlopen(/Library/QuickTime/Motion.component/Contents/MacOS/Motion, 262): Library not loaded: /Library/Application Support/ProApps/SharedA/Frameworks/ProCore.framework/Versions/A/ProCore
Referenced from: /Library/QuickTime/Motion.component/Contents/MacOS/Motion
Reason: image not found
w00-129-24-75-20:~ Brynn$ say macs are better than P C's
>
>
> say macs are better than P C's

2011-04-12 13:41:43.755 say[13373:10b] Error loading /Library/QuickTime/Motion.component/Contents/MacOS/Motion: dlopen(/Library/QuickTime/Motion.component/Contents/MacOS/Motion, 262): Library not loaded: /Library/Application Support/ProApps/SharedA/Frameworks/ProCore.framework/Versions/A/ProCore
Referenced from: /Library/QuickTime/Motion.component/Contents/MacOS/Motion
Reason: image not found
2011-04-12 13:41:43.757 say[13373:10b] Error loading /Library/QuickTime/Motion.component/Contents/MacOS/Motion: dlopen(/Library/QuickTime/Motion.component/Contents/MacOS/Motion, 262): Library not loaded: /Library/Application Support/ProApps/SharedA/Frameworks/ProCore.framework/Versions/A/ProCore
Referenced from: /Library/QuickTime/Motion.component/Contents/MacOS/Motion
Reason: image not found
w00-129-24-75-20:~ Brynn$
w00-129-24-75-20:~ Brynn$ telnet towel.blinkenlights.nl
Trying 94.142.241.111...
telnet: connect to address 94.142.241.111: Operation timed out
telnet: Unable to connect to remote host
w00-129-24-75-20:~ Brynn$ telnet towel.blinkenlights.nl
Trying 94.142.241.111...















telnet: connect to address 94.142.241.111: Operation timed out
telnet: Unable to connect to remote host
w00-129-24-75-20:~ Brynn$
w00-129-24-75-20:~ Brynn$
w00-129-24-75-20:~ Brynn$
w00-129-24-75-20:~ Brynn$
w00-129-24-75-20:~ Brynn$
w00-129-24-75-20:~ Brynn$
w00-129-24-75-20:~ Brynn$
w00-129-24-75-20:~ Brynn$
w00-129-24-75-20:~ Brynn$
w00-129-24-75-20:~ Brynn$
w00-129-24-75-20:~ Brynn$
w00-129-24-75-20:~ Brynn$
w00-129-24-75-20:~ Brynn$
w00-129-24-75-20:~ Brynn$
w00-129-24-75-20:~ Brynn$
w00-129-24-75-20:~ Brynn$

Thursday, March 31, 2011

Colorblindness

Protanopia- is the type of colorblindness I chose to try and replicate. It affects 1 out of 100 males.
-this is my result-


The picture to the right of the regular color wheel is what my code produces- the circle on the top of it, is the original color wheel which I turned into the color wheel below and to the left of it.

My code starts out once you already have opened a picture-

var idChnM = charIDToTypeID( "ChnM" ); //goes into channel mixer
var desc59 = new ActionDescriptor();
var idpresetKind = stringIDToTypeID( "presetKind" );
var idpresetKindType = stringIDToTypeID( "presetKindType" );
var idpresetKindCustom = stringIDToTypeID( "presetKindCustom" );
desc59.putEnumerated( idpresetKind, idpresetKindType, idpresetKindCustom );
var idRd = charIDToTypeID( "Rd " ); // Under the Red channel-
var desc60 = new ActionDescriptor();
var idRd = charIDToTypeID( "Rd " );
var idPrc = charIDToTypeID( "#Prc" );
desc60.putUnitDouble( idRd, idPrc, -171.000000 ); //pulls the scroll bar lower for the red.
var idGrn = charIDToTypeID( "Grn " );
var idPrc = charIDToTypeID( "#Prc" );
desc60.putUnitDouble( idGrn, idPrc, 94.000000 );
var idBl = charIDToTypeID( "Bl " );
var idPrc = charIDToTypeID( "#Prc" );
desc60.putUnitDouble( idBl, idPrc, 14.000000 );
var idChMx = charIDToTypeID( "ChMx" );
desc59.putObject( idRd, idChMx, desc60 );
var idGrn = charIDToTypeID( "Grn " ); // Now in the Green channel
var desc61 = new ActionDescriptor();
var idRd = charIDToTypeID( "Rd " );
var idPrc = charIDToTypeID( "#Prc" );
desc61.putUnitDouble( idRd, idPrc, 6.000000 );
var idGrn = charIDToTypeID( "Grn " );
var idPrc = charIDToTypeID( "#Prc" );
desc61.putUnitDouble( idGrn, idPrc, 135.000000 );
var idBl = charIDToTypeID( "Bl " );
var idPrc = charIDToTypeID( "#Prc" );
desc61.putUnitDouble( idBl, idPrc, 19.000000 );
var idChMx = charIDToTypeID( "ChMx" );
desc59.putObject( idGrn, idChMx, desc61 );
var idBl = charIDToTypeID( "Bl " ); //Inside the Blue channel
var desc62 = new ActionDescriptor();
var idRd = charIDToTypeID( "Rd " );
var idPrc = charIDToTypeID( "#Prc" );
desc62.putUnitDouble( idRd, idPrc, 12.000000 );
var idGrn = charIDToTypeID( "Grn " );
var idPrc = charIDToTypeID( "#Prc" );
desc62.putUnitDouble( idGrn, idPrc, 17.000000 );
var idBl = charIDToTypeID( "Bl " );
var idPrc = charIDToTypeID( "#Prc" );
desc62.putUnitDouble( idBl, idPrc, 133.000000 );
var idChMx = charIDToTypeID( "ChMx" );
desc59.putObject( idBl, idChMx, desc62 );
executeAction( idChnM, desc59, DialogModes.NO ); // Execute action- channel mixing applied


Image and information source: http://colorvisiontesting.com/color2.htm

Wednesday, March 30, 2011

FEWDIO Horror on youTube

There is this page on YouTube that has a series of horror film shorts created by
Fewdio Entertainment. Their website is still being created, but should be up soon.

Surprisingly they have really good film quality, and the CGI and editing is amazing for being web shorts. If you are a fan of horror movies I definitely recommend watching them- some are funny and some are very disturbing, but overall they all are very good, and are very interesting.

Here are some still images from two of the films:

Thursday, March 24, 2011

Photoshop Scripting Tutorials

So far I've actually had alot of issues finding scripting tutorials for photoshop. Adobe InDesign has a ton of scripting tutorials, however, after searching through the Adobe website, youTube, Google, and other resources I was only able to find a few. Either way I did my best, and followed one tutorial that was written, and then followed a youTube video tutorial.

What actually helped me the most in understanding the code, waqs the video tutorial, and then going into photoshop, doing a few simple tasks, and then going through the script listener file ity created. For example this picture, was made by this code:














// =======================================================
var idMk = charIDToTypeID( "Mk " );
var desc26 = new ActionDescriptor();
var idNw = charIDToTypeID( "Nw " );
var desc27 = new ActionDescriptor();
var idpreset = stringIDToTypeID( "preset" );
desc27.putString( idpreset, "Default Photoshop Size" );
var idDcmn = charIDToTypeID( "Dcmn" );
desc26.putObject( idNw, idDcmn, desc27 );
executeAction( idMk, desc26, DialogModes.NO );

// =======================================================
var idFl = charIDToTypeID( "Fl " );
var desc28 = new ActionDescriptor();
var idFrom = charIDToTypeID( "From" );
var desc29 = new ActionDescriptor();
var idHrzn = charIDToTypeID( "Hrzn" );
var idRlt = charIDToTypeID( "#Rlt" );
desc29.putUnitDouble( idHrzn, idRlt, 120.000000 );
var idVrtc = charIDToTypeID( "Vrtc" );
var idRlt = charIDToTypeID( "#Rlt" );
desc29.putUnitDouble( idVrtc, idRlt, 96.000000 );
var idPnt = charIDToTypeID( "Pnt " );
desc28.putObject( idFrom, idPnt, desc29 );
var idTlrn = charIDToTypeID( "Tlrn" );
desc28.putInteger( idTlrn, 32 );
var idAntA = charIDToTypeID( "AntA" );
desc28.putBoolean( idAntA, true );
var idUsng = charIDToTypeID( "Usng" );
var idFlCn = charIDToTypeID( "FlCn" );
var idFrgC = charIDToTypeID( "FrgC" );
desc28.putEnumerated( idUsng, idFlCn, idFrgC );
executeAction( idFl, desc28, DialogModes.NO );

// =======================================================
var idsave = charIDToTypeID( "save" );
var desc30 = new ActionDescriptor();
var idAs = charIDToTypeID( "As " );
var desc31 = new ActionDescriptor();
var idEQlt = charIDToTypeID( "EQlt" );
desc31.putInteger( idEQlt, 8 );
var idMttC = charIDToTypeID( "MttC" );
var idMttC = charIDToTypeID( "MttC" );
var idNone = charIDToTypeID( "None" );
desc31.putEnumerated( idMttC, idMttC, idNone );
var idJPEG = charIDToTypeID( "JPEG" );
desc30.putObject( idAs, idJPEG, desc31 );
var idIn = charIDToTypeID( "In " );
desc30.putPath( idIn, new File( "C:\\Users\\Owner\\Desktop\\Untitled-2.jpg" ) );
executeAction( idsave, desc30, DialogModes.NO );

// =======================================================
var idCls = charIDToTypeID( "Cls " );
executeAction( idCls, undefined, DialogModes.NO );


To be able to go through the code and pick out where the commands lie really helped me understand this. Unfortunately it's not very exciting, but I'm going to try some effects soon too.

The written tutorial, was to create a code that switched between layers.

My final product (after following the tutorial) was this:

if (documents.length == 0) {
alert("there are no deocuments open,");
}

else {
var docRef = activeDocument;
var layerRef = docRef.activeLayer;
if (docRef.layers.length == 1 && layerRef.isBackgroundLayer == true) {
alert("the background layer can not be hidden when it's the only layer in a document.");
}
else {
layerRef.visible = !layerRef.visible;
}
}


Sadly, I couldn't get it to work, I saved it as a .js file, and brought it into photoshop, but couldn't figure exactly how to test it out. What I'm trying next is I'm going to create a photo with multiple layers and then run it.



written tutorial link: http://morris-photographics.com/photoshop/tutorials/scripting2.html

video link: http://www.youtube.com/watch?v=hs0JydYtKng

Friday, March 11, 2011

IFDM 210 COLOR WHEEL ASSIGNMENT: Re-posted Color Cube code

This is my re-posted color cube code, the first time around through adding all of my photos part of it got deleted, and I couldn't seem to get it into the original post.

Here is the complete code that did not make it through in my original assignment post.

select -all;
doDelete;
int $x;
int $y;
int $z;
string $name;
string $tmp;
for($y=0; $y<8;>
{
for($x=0; $x<8;>
{
for($z=0; $z<8;>
{
$name = `shadingNode -asShader phong`;
$tmp = $name + ".color";

setAttr $tmp -type double3 ($x/7.0) ($y/7.0) ($z/7.0);
$objname = `polySphere -ch on -o on -r .03`;
xform -translation ($x/8.0) ($y/8.0) ($z/8.0);
hyperShade -assign $name;
}
}
};

Wednesday, March 9, 2011

Movie Review: "In the Mouth of Madness" Directed by John Carpenter

"In the Mouth of Madness" Directed by John Carpenter
















I watched the 1994 film, "In the Mouth of Madness" last night,
it was pretty good.... however if tweaked a bit it could have been awesome. Overall it wasn't a waste of time, but the plot could of had a couple revamps.



HOWEVER-


Visually, it was really interesting, and they did a lot with color that you don't see in feature films very often.

Also they experimented with digital video effects that weren't being used very much at the time and still in their basic stages.

Otherwise they did alot of prosthetics which made me increasingly happy, because although CGI can take you very far, sometimes there just isn't a replacement for what can be made by hand and truly exist in front of the camera.
For example the special effects eye detail for the authors crazed agent was amazing, and looked as if his eyes had actually morphed. This is what I love about cinema, and although CGI is great, and improving filmmaking vastly, I hope prosthetics stay around, because this looks great.

Chromatography (Color in pigments v.s. color in light)


I remember learning through chromatography experiments, that the colors spread out like they do in the photo, because of the size of their particles.

When the water travels through the paper and ink, it carries the particles with it, and where they stop on the paper, is where the particles became too big to pass through the fibers any longer.

Being this way, you can say that this form of color, is similar to light, in the fact that what it passes through, and how far it can pass through it, is comparable to the idea of glass being transparent.

Some of the colors (visible light) can pass through the paper (glass) due to the size of their particles, however, not all of it can travel through and when the particles are too large, they eventually stop (the reason the color stops, and why it is hard to get a tan through a window)

Just as the color particles are too big to pass through the paper particles, so is the UV light, that cannot pass through glass.

So you can say that the particle size of different colors and how they act in a chromatography experiment, are relatable to light particles (both visual and UV spectrum) and how they interact with glass.

Technically, if the atom is the smallest part of all things, the basic building block, then it is probable that color (in liquids) and color (in light) are caused by the same things. Maybe they are not the same composition, but their particle size and how it interacts with other objects seem to share a common behavior.

I may be completely off, but I'm interested in if color really is in our minds, then the color in liquid and pigments, must somehow be similar to color in light.

I'm going to check my facts and keep researching this for sure.

image from: http://bekean.com/CAPE/Science%208%20Unit%20A/chromatography.htm

Monday, March 7, 2011

Color in light vs. color in liquid- Different or the same?



I was thinking about color recently and I realized that not only is the artistic color wheel different, but many artistic aspects dealing with color and light are almost the opposite of the RGB spectrum.

For example, in the RGB color spectrum, when all three colors hold the value of 0 then they produce black, and when they all hold a high value of 255, they produce white. However in things such as a marker, black ink is made when all the colors are combined.


This confused me then because I can't exactly wrap my head around wether this fact makes them different, or the same.

This reminded me of the experiment with a papertowel or a coffee filter, and you draw a black line on it then place the edge of the paper in water, the water absorbs, and after passing through the black carries the other colors with it, passing through the entire spectrum.


So at first I assumed these two things to be opposite, because when I think of combining colors, I think of a higher number, however now I realize that although the numerical values for black are at a value of zero, it is still a combination.

I couldn't seem to find a chromatography example with a pure black marker like I have experimented with in the past, but I am going to be doing this experiment in the next couple days to try and figure out my confusion.

Maybe they are not supposed to be related to each other even, perhaps the mixture in a black marker is simply a mixture, and shouldn't be compared with numerical RGB values....

It does make sense that they are different, due to the fact that the marker is not made up of light, but of pigments and water, however does that mean the colors of light and of what we see in markers have no relation to each other?

So is a blue color in liquid a completely different object and build compared to a blue color in light? Do they just Happen to look the same, or is there some sort of relationship between them.
Because if color is all in our minds then the color we see in light should be the same color we see in liquid (like markers etc).

Either way I'm going to try to figure it out, and maybe by researching this I'll be able to better understand the idea of the difference between the color wheels, and why they are that way.
It's definitely something to think on.

I'll post again on this subject once I've done some more research and been able to do my experiment.

image from: http://www.ljcreate.com/products/product.asp?id=601&program=159&curr=1

The importance of light in Paranormal Investigation

I was watching Ghost Adventures again this weekend, and again, I realized how much someone in the paranormal investigation field has to know about light.

It was actually really interesting. By looking at different evidence received they were able to analyze where and what light was coming from the different frequencies, and with their newer, more high tech cameras, see frequencies of light that before were invisible to the human eye.

I watch the show for entertainment, but I must say that after discussing light so much in class, the technology they use has become very intriguing to me, One day hopefully I'll be able to experiment with it, if not for paranormal purposes, for cinematic instead.

Thursday, March 3, 2011

IFDM 210 COLOR WHEEL ASSIGNMENT


In being entirely honest, I must say that parts of this project were very hard for me.


I am a very visual person, and com puter programming has not come easially to me. The color cube, the first part of the project, actually made a decent amount of sense to me. However, once we entered into the realms of the circles, and the different color sequences it took me much longer to visualize first how to assign colors by angles, but then how to assign them by angles, in a different way.

I tried my best on this project and I will be continuing to work on it, and trying to make it better. If anything needs a better description I will add that as soon as possible. Thank you.


NOTE: For some reason, on my color wheel, and some of the other projects, when you try to run them, an error comes up, saying it cannot find lambert. The way I found to fix this, is to make a sphere in the drop down menu, right click, choose "Assign New Material", and then choose lambert. After doing this, run the script again and it will work perfectly... I am still trying to debug this weird aspect.

NOVEL USE OF COLOR
I actually made this odd shape somewhat by accident, but I chose it to be my novel use of color because I ended up studying it, and it helped me understand alot, and it helped me to my non-linear transitions.














select -all;
doDelete;

int $x;

int $y;

int $z;

string $name;

string $tmp;

for($z=0; $z<5;>

{

for($x=0; $x<5;>

{

for($y=0; $y<6;>

{

$name = `shadingNode -asShader lambert`;

$tmp = $name + ".color";

//$objname = `polyPlane -w 0.5 -h 1 -sx 10 -sy 10 -ax 0 1 0 -cuv 2 -ch 1`;

$objname = `polySphere -r 2 -sx 15 -sy 10 -ax 0 1 0 -cuv 1 -ch 1`;

setAttr $tmp -type double3 ($x/5.0) ($y/4.5) ($z/5.0);

xform -translation ($x/2.0) ($y/1.0) ($z/2.0);

hyperShade -assign $name;

}

}

};


NON-LINEAR COLOR TRANSFORMATIONS

The Red to Green, and the Purple to Green are my two submissions, however, on occasion, but not all the time, the code that makes them, if run after another, won't make this result. I found running the simple blue one seemed to "clear out" the system, and then the otherr two ran with the proper colors.












PURPLE TO GREEN


select -all;
doDelete;
int $x;
int $y;
int $z;
string $name;
string $tmp;
//for($z=0; $z<1;>
//{
///for($x=0; $x<1;>
{
for($y=0; $y<6;>
{
$name = `shadingNode -asShader lambert`;
$tmp = $name + ".color";
//$objname = `polyPlane -w 0.5 -h 1 -sx 10 -sy 10 -ax 0 1 0 -cuv 2 -ch 1`;
$objname = `polySphere -r 2 -sx 15 -sy 10 -ax 0 1 0 -cuv 1 -ch 1`;
setAttr $tmp -type double3 ($x/1.8) ($y/3.0) ($z/1.5);
xform -translation ($x/2.0) ($y/1.0) ($z/2.0);
hyperShade -assign $name;
}
};
//};


RED TO GREEN
select -all;
doDelete;
int $x;
int $y;
int $z;
string $name;
string $tmp;
for($z=0; $z<1;>
{
//for($x=0; $x<1;>
//{
for($y=0; $y<8;>
{
$name = `shadingNode -asShader lambert`;
$tmp = $name + ".color";
//$objname = `polyPlane -w 0.5 -h 1 -sx 10 -sy 10 -ax 0 1 0 -cuv 2 -ch 1`;
$objname = `polySphere -r 2 -sx 15 -sy 10 -ax 0 1 0 -cuv 1 -ch 1`;
setAttr $tmp -type double3 ($x/0.9) ($y/2.9) ($z/2.1);
xform -translation ($x/2.0) ($y/1.0) ($z/2.0);
hyperShade -assign $name;
}
//}
};

SIMPLE BLUE

select -all;
doDelete;
int $x;
int $y;
int $z;
string $name;
string $tmp;
//for($z=0; $z<1;>
//{
for($x=0; $x<1;>
{
for($y=0; $y<6;>
{
$name = `shadingNode -asShader lambert`;
$tmp = $name + ".color";
//$objname = `polyPlane -w 0.5 -h 1 -sx 10 -sy 10 -ax 0 1 0 -cuv 2 -ch 1`;
$objname = `polySphere -r 2 -sx 15 -sy 10 -ax 0 1 0 -cuv 1 -ch 1`;
setAttr $tmp -type double3 ($x/3.0) ($y/3.0) ($z/1.0);
xform -translation ($x/2.0) ($y/1.0) ($z/2.0);
hyperShade -assign $name;
}
};
//};
















For Blue to Yellow through Grey:
select -all;
doDelete;
int $x;
int $y;
int $z;
string $name;
string $tmp;
//Deleted the Y for loop
for($x=0; $x<8;>
{
for($z=0; $z<8;>
{
$name = `shadingNode -asShader lambert`;
$tmp = $name + ".color";
//Get rid of the ($y/6.0) and make it
//($x/11) change the other x and the z to 9.0
setAttr $tmp -type double3 ($x/9.0) ($x/11.0) ($z/9.0);
$objname = `polySphere -ch on -o on -r .03`;
xform -translation ($y/8.0) ($z/8.0) ($x/8.0);
hyperShade -assign $name;
}
};

For Purple to Green through Grey:
select -all;
doDelete;
int $x;
int $y;
int $z;
string $name;
string $tmp;
//Deleted the Y for loop
for($x=0; $x<8;>
{
for($z=0; $z<8;>
{
$name = `shadingNode -asShader lambert`;
$tmp = $name + ".color";
//Get rid of the ($y/6.0) and make it
//($x/11) change the other x and the z to 9.0
setAttr $tmp -type double3 ($x/11.0) ($z/6.9) ($x/11.0);
$objname = `polySphere -ch on -o on -r .03`;
xform -translation ($y/8.0) ($z/8.0) ($x/8.0);
hyperShade -assign $name;
}
};

For Red to Green through Grey:
select -all;
doDelete;
int $x;
int $y;
int $z;
string $name;
string $tmp;
//Deleted the Y for loop
for($x=0; $x<8;>
{
for($z=0; $z<8;>
{
$name = `shadingNode -asShader lambert`;
$tmp = $name + ".color";
//Get rid of the ($y/6.0) and make it
//($x/11) change the other x and the z to 9.0
setAttr $tmp -type double3 ($x/11.0) ($x/6.5) ($z/11.0);
$objname = `polySphere -ch on -o on -r .03`;
xform -translation ($y/8.0) ($z/8.0) ($x/8.0);
hyperShade -assign $name;
}
};



COLOR CUBE

















This is my color cube.

I changed the texture to phong rather
than lambert for aesthetic reasons,
but otherwise, it should be very similar to the main color wheel exercise. My MEL script is pasted below:

select -all;
doDelete;
int $x;
int $y;
int $z;
string $name;
string $tmp;
for($y=0; $y<8; x="0;" z="0;" name =" `shadingNode" tmp =" $name">

setAttr $tmp -type double3 ($x/7.0) ($y/7.0) ($z/7.0);
$objname = `polySphere -ch on -o on -r .03`;
xform -translation ($x/8.0) ($y/8.0) ($z/8.0);
hyperShade -assign $name;
}
}
};



COLOR WHEEL

For the next part of the project we were supposed to make a color wheel. once I figured out the rotate
and pivot functions I was very lucky, I simply followed the color cube code to
do coloring.


select -all;
doDelete;
//string $name;
//string $tmp;
// rota = rotation angle
string $objName[];
string $objPivot;

for ($rad=1;$rad<11;$rad++) rad =" radius">
{
int $topRotate = $rad*8;
for ($rota=0;$rota<$topRotate;$rota++)
{
$objName = `polyCube -w 1.5 -h 0.5 -d 0.5 -sx 1 -sy 1 -sz 1 -ax 0 1 0 -cuv 4 -ch 1`;
//scale -r 1 0.011 1;
$objPivot = $objName[0] + ".scalePivot";
$objRotate = $objName[0] + ".rotatePivot";

move ($rad+($rad*$rad*.04)) 0 0;
move 0 0 0 $objPivot $objRotate ;
rotate -ws 0 ($rota*(360.0/$topRotate)) 0 ;

vector $sat = hsv_to_rgb(<<(($rota*(360.0/$topRotate))/360.0), ($rad/8.0), 1>>); //sat hue = rotation angle/360) altered values = altered colors?
print $sat;
//$c.x = 1
//$c.y = 2
//$c.z = 3 // for regular vector

$name = `shadingNode -asShader lambert`; // color cube code ...
$tmp = $name+".color";
$tmp2 = $name+".outColor";
$tmp3 = $name+"SG";
$tmp4 = $name+"SG.surfaceShader";
sets -renderable true -noSurfaceShader true -empty -name $tmp3;
connectAttr -f $tmp2 $tmp4;
assignCreatedShader "lambert" "" $name $objName[0];
//hyperShade -assign $name;
sets -e -forceElement $tmp3;
setAttr $tmp -type double3 ($sat.x) ($sat.y) ($sat.z);//alter to create artistic color space maybe???
}
};




ARTISTIC COLOR WHEEL

The Artistic color wheel code was very hard for me, for some reason I had a lot of trouble visualizing it, and it took me multiple tries. This is my first attempt, which I chose to turn in, because even though it is much simpler than the artistic color wheel code we talked about in class, of all of the codes I tried, this one is visually closest to the artistic color wheel.


select -all;
doDelete;

//string $name;
//string $tmp;
//rota = rotation angle
string $objName[];
string $objPivot;

for ($rad=1;$rad<11;$rad++) rad =" radius">
{
int $topRotate = $rad*8;
for ($rota=0;$rota<$topRotate;$rota++)
{
$objName = `polyCube -w 1.5 -h 0.5 -d 0.5 -sx 1 -sy 1 -sz 1 -ax 0 1 0 -cuv 4 -ch 1`;
//scale -r 1 0.011 1;
$objPivot = $objName[0] + ".scalePivot";
$objRotate = $objName[0] + ".rotatePivot";

move ($rad+($rad*$rad*.04)) 0 0;
move 0 0 0 $objPivot $objRotate ;
rotate -ws 0 ($rota*(360.0/$topRotate)) 0 ;

vector $sat = hsv_to_rgb(<<(($rota*(348.0/$topRotate))/310.0), ($rad/1.0), 1>>); //sat hue = rotation angle/360) altered values = altered colors?
print $sat;
//$c.x = 1
//$c.y = 2
//$c.z = 3 // for regular vector

$name = `shadingNode -asShader lambert`; // color cube code ...
$tmp = $name+".color";
$tmp2 = $name+".outColor";
$tmp3 = $name+"SG";
$tmp4 = $name+"SG.surfaceShader";
sets -renderable true -noSurfaceShader true -empty -name $tmp3;
connectAttr -f $tmp2 $tmp4;
assignCreatedShader "lambert" "" $name $objName[0];
//hyperShade -assign $name;
sets -e -forceElement $tmp3;
setAttr $tmp -type double3 ($sat.x/0.4) ($sat.y/0.8) ($sat.z/1.5);//alter to create artistic color space maybe???
}
};

Monday, February 28, 2011

Orchids: a natural complimentary color transition?

For our color-wheel assignment, I keep wondering if an example in nature of two complimentary colors than transition into each other with no grey could be something as simple as an orchid.

Looking through multiple pictures of orchids and their color transitions from purple to green, I never once saw grey within them..but almost a deep reddish brown, and in some a yellow tinge.

You wouldn't think these two colors could fade into each other, but looking at them in nature, although they look as if they have a clean cut separation, if you look closely you can see the small area where they intersect, and blend into one another.

In the picture on the left, there is still green in the center petals, although much less that the outer ones, you can still see it, and it hold much more of a yellow tinge.

And in the one on the right, you can see the colors meld into a warm, reddish brown color before becoming more distinct and separating into purple and green. Once again there is no grey. I believe this is an accurate example of a natural color transition with no grey, and I think I will be using it for my project.

Ghost Adventures feature new video camera with ability to see UV light

I was watching Ghost Adventures, the hilarious ghost hunting show on travel Channel that hads been referred to as "The Adventures of Shaggy and Scooby Douche". Anyway it's hysterical, but they're always trying out new equipment, and recently one camera they used caught my eye, and I've been meaning to blog about it...

I'm having trouble finding out what the camera is called exactly, but I remember from the episode that it had just been developed, and they had an interview with the inventor, and supposedly the camera is able to see, and display for human eyes, the otherwise "invisible" parts of the light spectrum. In this context, it allows for paranormal investigators to catch more evidence of the paranormal, that may have previously been invisible.

A Full -Spectrum DVR allows you to record in a natural setting without IR light contamination.

This is one of the cameras they use, it looks similar to this, but they will probably be using the newer one in upcoming episodes, so i will update this as soon as as I can find out what exactly the camera is called.

Wednesday, February 23, 2011

Alice- The Syfy miniseries



I was watching this miniseries earlier, and it made me remember not only how much I liked it, but how awesome the lighting and modeling is in the series. At some points the modeling is a bit cheesy
(when they're riding the flamingos) otherwise the landscapes (such as the white knight headquarters) are beautiful.

Also just the modern ta
ke on the story is really cool.

As the movie progresses, the sets become more and more elaborate with intense lighting, ranging from entirely fluorescant and synthetic,

to what appears to be completely natural light.

Unfortunately, I was unable to find any of the images of the modeled cities themselves. If I do I will add an extra blog to showcase them, but I highly recommend the miniseries.
Both in lighting and sets it is very artistic.

Set-wise, it almost reminds me of Matthew Barney's "The Cremaster Cycle" which is a (somewhat) well known, high budget art film.


What makes glass transparent?



Another really interesting and mind-bending question we discussed, is Why is glass transparent?

I know that glass is sand, and when mixed with extreme heat, such as lightening, glass can be produced (and through this way of making glass you receive really cool shapes)...

However what makes it transparent?

Things such as paper reflect light, and absorb it, so does glass simply...? I don't even know....

Image: http://madebymeg.net/blog/sea-glass-made-from-lightning/

What I found was really cool, it turns out that glass is transparent partially because it does not absorb visible light rays. However, I discovered that if light is high energy like deep-ultraviolet, then it CAN be absorbed by glass, making the glass seem opaque, and not transparent to high energy rays.

So the visual light spectrum cannot penetrate the glass, and therefore it appears "transparent" to human eyes.
"Glass is almost perfectly opaque to deep ultraviolet, which is why it's hard to get a tan through a window," emails physicist Louis A. Bloomfield of the University of Virginia. "By deep ultraviolet, I mean UVB and UVC."
"Pure glass cannot absorb visible light. Light merely slows (as glass molecules decide what energy contained in visible light, if any, matches an energy level of an atom in the glass molecules). In fact, the speed of light through glass is 66% of its speed through a vacuum."


"Visible light from the Sun is made of light waves with many colors (which we see displayed in a rainbow, for example). Each color has a particular frequency and that frequency has an energy level proportional to that frequency, says Bloomfield.
What has to match is an electron's and a color's energy levels. If any of the energy levels of the light matches any of the energy levels of the electron, the electron absorbs that energy and the glass heats up.
But It turns out that none of glass electron energy levels match any of the energy levels in the colors of visible light. So light passes through glass. Thus, sun-illuminated pure glass doesn't get hot while the opaque frame around it does."
http://www.happynews.com/news/1262010/glass-transparency.htm


This makes sense, because although windows on a car get warm-ish (most likely not being pure glass) they remain much cooler than all the other areas of the car.... I'm starting to understand the idea. So because the energy levels of the atoms in the class, do not match up with the energy levels each color has, it cannot absorb it... but the higher energy colors, that are invisible to the human eye do match.

So technically like color, the transparency of glass is all in our mind, because if we were able to see the UV spectrum it would be opaque like other solids..... Which is a little trippy, because one day if there is a mutation in human genetics and someone is able to see UV spectrum light, then all glass will be opaque, making life as we know it extremely difficult...