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???
}
};