Sunday, February 27, 2011

Cheap Infrared Cameras and Night Vision

While looking up information about black light, I found a video on how you can modify a camcorder to pick up and record infra-red light. The video title is a misnomer, because it's not x-ray vision that the video is talking about. The camera picks up infra-red light that is outside the visible light spectrum on the other side of x-ray light. X-rays have a much higher frequency and shorter wavelength than infra-red.
This made me wonder about things like night vision cameras. Night vision operates in infrared aswell. Night vision cameras pick up thermal-IR, which is emmited by objects depending on their heat.
This is a really great article about night vision:

Most cameras use a process called Image-Encancement night vision to make images, but the artilce also talked about thermal imaging. This thermal imaging produces interesting images which record different shades of grey depending on the heat given off.


These are image-enhancing night vision images:






Black Light

One of the interesting questions I've had about the physics of light is about black light. It always interests me going to Hinkle Family Fun Center and Nickel city where you go down the hallway, and white clothing glows in the dark. My dad told me about black light posters he used to have back in the 1970's too. So I looked up online how a black light works and here's what I found:

So, a black light is one that produces light that is outside the narrow range of visible light. A black light produces Ultra-voilet light that the human eye can't see. The reason white shirts glow in the dark is because modern detergents contain phosphors that emit visible light when it reacts to radiation from UV light from black lights. Black lights usually come in two forms: a tube black light and an incandescent light bulb. They both work the same way: the black glass absorbs all light waves besides the UV-A and some blue or voilet visible light because of the special phosphor coating on them.

http://science.howstuffworks.com/innovation/everyday-innovations/black-light.htm

First RGB color wheel




After class on Thursday I was able to successfully make the first color wheel. I got the wheel working first, and then was able to use the hsv_to_rgb vector code to work. At first I was having trouble making the wheel because the balls were not rotating in the correct way. They were rotating around their center and not around the origin to make a wheel. I found that the rotate command lets you change the pivot of where the polyspheres rotate from. I couldn't get it to work if I changed the pivot to 0 0 0 or the origin in Maya, so i changed it to .01 which worked.
I'm working on the alternative color wheel now. I've decided on trying the artistic color wheel, which looks like this:




So, instead of yellow being across from blue, green being across from magenta and red being across from cyan, red and green are across, blue and orange are across, and yellow and purple are across from each other.

Monday, February 21, 2011

Tangled Hair

Tangled Hair Video

I'm really interested in animation, and over the break I saw Disney's 50th animation "Tangled." It is an amazing movie, not only because of the story and characters, but the animation is amazing for it. One interesting thing I've looked into is the hair for Rapunzel. Hair is incredibly hard to do with Computer animation, and the video up there is an amazing look into how they simulated the hair. It is amazing what they were able to do to combine the hair artistically with the programming that had to go behind the hair.



If you watch the video, it is such an incredible undertaking. Hair is so complicated, and it has so many parts that interact with each other takes some serious computing power. The way they solved that problem by in part only simulating parts of the hair that you could see in the shot, really inspired me. It is definelty the most realistic hair in a CG character.

Code from 2-17-11

We now know that if you do file -o "yourFileName.mel" you can generate the color cube. To open generate the color cube an easier way, I created a procedure in mel and named it "generateCube"





After you enter this, you can generate a color cube simply by calling the procedure. I also added an argument to the procedure called $ballNumb. That way, the person calling the procedure can pick the dimensions of the cube at the same time as calling the procedure. Now I can generate a color cube with one line of code.

Wednesday, February 16, 2011

Code from 2-15-11




This is the code that enables us to create the first version of the color cube. We have three for loops that create the cube of the spheres. First we create the shading node and store that in $name. Then we store $name and give it the attributes of color. Then we set the attribute of $name2 depending on where the position is. Then we create the sphere, move it, and then assign the color to the object. Here is what the cube looks like now:

Monday, February 7, 2011

Code from 2-3-11

//This is where I create the initial variables
int $x;
int $y;
int $z;
string $name;
string $name2;

//This is the for loop to create the polyspheres color cube without color.
for ($z = 0; $z<8; ++$z)
{
for ($y = 0; $y<8; ++$y)
{
for ($x = 0; $x <8; ++$x)
{
polySphere -ch on -o on -r .03;
xform -translation ($x/7.0) ($y/7.0) ($z/7.0);
}
}
};

//This is trying to give them color, but it doesn't work yet
for ($z = 0; $z<8; ++$z)
{
for ($y = 0; $y<8; ++$y)
{
for ($x = 0; $x <8; ++$x)
{
polySphere -ch on -o on -r .03;
$name = `shadingNode -asShader lambert`;
$name2 = $name + ".color";
//connectAttr -f lambert2.outColor lambert2SG.surfaceShader;
//sets -e -forceElement lambert2SG;
xform -translation ($x/7.0) ($y/7.0) ($z/7.0);
setAttr $name2 -type double3 1 0 0 ;
}
}
};