Wednesday, April 20, 2011

Best Bash Shell Tutorial - Image Magick Tutorial



I want to demonstrate that I have learned the skills necessary to complete this tutorial. The comments weren't included in my orginal script, but are useful in demonstrating my uncerstanding of this script. I wasn't able to post the pngs that I created due to a server problem, but I convert them to jpegs, which I will post here.
Here is my bash code:

$ history
    1  cd tmp/Tutorial1
    # changed the directory from ~ to tmp/Tutorial1 which is located in C/cgywin/home/Jennifer/tmp/Tutorial1

    2  ls #a list of what is in the current directory

    3  mspaint resize_piano.png #Open paint and display the current image.


    4  convert -fill blue -colorize 50% resize_piano.png blue_piano.png
     # convert current image to be filled 50% saturated blue and Save as a new png.
   
    5  mspaint blue_piano.png #Open paint and display the current image.


    6  convert -fill red -colorize 50% resize_piano.png red_piano.png
     # convert current image to be filled 50% saturated red and Save as a new png.

    7  mspaint red_piano.png #Open paint and display the current image.


    8  convert -fill green -colorize 50% resize_piano.png green_piano.png
     # convert current image to be filled 50% saturated green and Save as a new png.

    9  mspaint green_piano.png #Open paint and display the current image.



   10  convert -fill green -colorize 20% resize_piano.png less_green_piano.png
   # convert current image to be filled 20% saturated green and Save as a new png.

   11  mspaint less_green_piano.png #Open paint and display the current image.


   12  convert -fill green -colorize 80% resize_piano.png more_green_piano.png
    # convert current image to be filled 80% saturated green and Save as a new png.

   13  mspaint more_green_piano.png #Open paint and display the current image.


   14  //higher the percentage for colorization, the more saturated it becomes.
    # An attempt at commenting in a similar manner to Mel and Javascript.

   15  # the higher the percentage of colorization, the more saturated it becomes.
   # The correct way to comment in bash.

   16  convert -fill 'rgb(0,255,0)' -colorize 50% resize_piano.png rgb_green.png
    # convert current image to be filled 50% green by calling the specific rgb value of 255-Save as a new png.

   17  mspaint rgb_green.png #Open paint and display the current image.



   18  convert -fill 'rgb(25,0,25)' -colorize 50% resize_piano.png rgb_lightpurple.png
    # convert current image to be filled 50% purple by calling the specific rgb value of 255/Save as new png.

   19  mspaint rgb_lightpurple.png #Open paint and display the current image.


   20  convert -fill 'rgb(125,0,125)' -colorize 50% resize_piano.png rgb_darkpurple.png
    # convert current image to be filled 50% purple by calling the specific rgb value of 255/Save as new png.

   21  mspaint rgb-darkpurple.png # Wrong dash in the filename. Would not open file.

   22  mspaint rgb_darkpurple.png #Open paint and display the current image.


   23  convert -fill purple -colorize 90% resize_piano.png rgb_purple.png
    # convert current image to be filled 90% saturated purple- Save as a new png.

   24  mspaint rgb_purple.png #Open paint and display the current image.



   25  history # command that displays all the history above.

Saturday, April 9, 2011

Keyframing in Maya-Week 11

This tutorial was helpful because I never fully understood the correct way to use keyframe animation in Maya.
http://v.youku.com/v_show/id_XMTc4NDk1ODA4.html

There is a simple process.

1. Move the scrubber on the Time Slider Bar to the beginning or to the desired starting area.
         --- Next to the Timeline of frames on the Time Slider, the "Current Time Text Box"
                is available to enter the number of the frame one wants to locate.

2. Modify the attributes of the object being animated in the Channel Box / Layer Editor.
         --- Highlight the attribute by clicking on it.
         --- The middle mouse button can be dragged in the viewport to change the number.
         --- Numbers can be changed with mouse and keyboard.

3. Place Keyframes on Time Slider.
         ---A keyframe can be specified by dragging the time slider there.     
         --- Highlight the previously changed attributes in the Channel Box / Layer Editor window. 
         --- Right Click and click "Key Selected".
                               --- The attribute box with the number in it turns red.
                               --- A vertical red line appears on the time slider next to the specified keyframe.
                                   
Now I feel more confident about animating an object in Maya.

Pirates of the Carribbean 3- Anatomy of a Scene:The Maelstrom-Week 11

The Pirates of the Caribbean 3 Maelstrom scene utilizes sophisticated special effects which are conveyed on the 2-Disc Special Edition special features called Anatomy of a Scene: The Maelstrom.

The visual effects were done with Industrial Light and Magic at the Disney Studios. One thing I found interesting was that Gore Verbinski, the director, was as knowledgeable about visual effects as all the VFX people at ILM. The IFDM program is moving in the right direction it seems to train the us to work with multiple levels of the film industry.

Several elements in the Maelstrom scene are crafted in a smart and knowledgeable way. The visual effects people examined the motion of water and its behavior within the scene's environment. They wanted the graphics to look as "realistic" as possible. The filming with the actual actors took place inside a warehouse on the ships with rain-like water pouring down on them. The animators had to consider the way a maelstrom actually functions with fast water further in and slower water toward the edges. 


















http://www.virtuartgallery.com/disneys-pirates-of-the-caribbean

For battle and fight scenes, ambient visual effects are developed such as animated or computer graphics characters, rain, atmosphere, splintering wood, and explosions. Some aspects of the set design or characters changed in post production. When Captain Jack and Davy Jones are fighting on the yard arm (the left and right arms connected to the mast, which holds the sails-see visual below), there is a stunt man fighting with Johnny Depp. But those people are animated in the beginning of the shot until the rigging of the ship passes the camera and then the visual effects workers switched the footage to the Johnny Depp.























http://blindkat.hegewisch.net/pirates/merc.html

Having the knowledge of multiple subjects within the film industry will be beneficial to us in the long run and where our careers are concerned.

Wednesday, April 6, 2011

Photoshop Scripting-Week 10

Hiding or Showing a Layer in Photoshop is the purpose of the following script tutorial.
http://morris-photographics.com/photoshop/tutorials/scripting2.html

In Photoshop scripting, items are named "objects", but when grouped with many other objects, they are named "collections". Being together in collection means that the objects are in an array. Aspects of the objects that can be transformed constitute its properties. The actual transformation are called methods. Specific steps that are triggered by certain transformations are named events.

I used the same photoshop document that I started to use to write the Photoshop Javascript homework from last week.

This is the script from the tutorial with my comments explaining the code.

var docRef = activeDocument; //storing the property of the active document inside the variable docRef.
var layerRef = docRef.activeLayer;// stores the property of the active layer from within the active document  variable
//in the variable layerRef.
layerRef.visible = !layerRef.visible;// switch the active layer on and off. If the layer is visible,
//then layerRef will turn it off and vice versa.




















This is the background image(from google) for the scripting test. I outlined the 2006 corvette with a bright green line of color.

After clicking on the layer I drew the green outline on and running the script, the green outline appears and disappears.




















Similarly, selecting the background layer and running the script produces the following result:



















The background is white when the image is saved from Photoshop.

Next, the author of the tutorial provides a safety net for not previously opening a photoshop document before running the script. There is an array built into Photoshop that contains documents that the user creates. This array, in turn, supplies us with a length property to work with the items in the array.

I customized the following to show the error I wanted to the user to see.
-----------------------------------------------------------------------------------------------------
if (documents.length == 0) //if there aren't any available documents in the array to draw from

    alert ("Please open a finished Photoshop document and then run the script. Thank you!")
    //Dialogue box appears and displays this text.
 }
else // runs the following code if the code above is false.
{
    var docRef = activeDocument; //storing the property of the active document inside the variable docRef.
    var layerRef = docRef.activeLayer;
    // stores the property of the active layer from within the active document variable in the variable layerRef.
    layerRef.visible = !layerRef.visible;
    // switch the active layer on and off. If the layer is visible, then layerRef will turn it off and vice versa.
}
-----------------------------------------------------------------------------------------------------------

It produced this result which was so exciting!














The way Photoshop works, according to the tutorial, is that if a user's document includes a background layer but no additional layers, the solution for successfully running the code above is to write another conditional statement. Apparently, the artLayer object within Photoshop provides user with a changeable property call isBackground.
------------------------------------------------------------------------------------------------------
if (documents.length == 0) //if there aren't any available documents in the array to draw from

    alert ("Please open a finished Photoshop document and then run the script. Thank you!");
    //Dialogue box appears and displays this text.
 }
else // runs the following code if the code above is false.
{
    var docRef = activeDocument; //storing the property of the active document inside the variable docRef.
    var layerRef = docRef.activeLayer;
    // stores the property of the active layer from within the active document variable in the variable layerRef.
    if (documents.layers.length == 1 && layerRef.isBackgroundLayer == true)
    //accessing the number of layers in a document and checking if it equal 1
    //and if there is a background layer.
    {  
        alert ("Please open a document that contains a multiple layers.
        Documents will background layers will not open.");
        //A dialog pops up for the user instructing them how to proceed.
     }
    else
    {  
        layerRef.visible = !layerRef.visible;
        // switch the active layer on and off. If the layer is visible, then layerRef will turn it off and vice versa.
     }
}
-----------------------------------------------------------------------------------------------------------

The dialog that was produced before was produced again because the script didn't register my script. However, when I opened an old photoshop document with a locked background layer the last code change did not run.

 if (documents.layers.length == 1 && layerRef.isBackgroundLayer == true)
The above line contained the error that there is "no such element".

But the code was a useful exercise nonetheless and I have learned about scripting the inner structure of Photoshop.

Geometric HSV Color Space-Week 10

This image was created from Illustrator since my Photoshop CS5 can't produce a new document. It is the diagram from class on 3/29/11. It represents the HSV color space.

In a geometric sense, the hue of this cone extends in a circle as shown at the top of this figure. The circle shape is consistent as the cone narrows to a point. The reason that hue can be constructed in a circle in the RGB or HSV color space is due to the fact that the color loops from red to red. For example, on the color wheel, color is defined in the following way: red, violet, blue, green, yellow, orange, and back to red again.

Saturation is the transition from one shade to another of a specific color. The saturation starts out at full color in all colors around the circle demonstrating hue. As the hues start to move inward, the shades are incremented and become lighter and lighter until they are white, illustrated by the black dot in the middle of the circle. This means they are desaturated.
This website helped me to review desaturation.
http://en.wikipedia.org/wiki/Colorfulness

The value, illustrated by the dashed line extending down from the black point, represents the spectrum of color from white to gray to black and every shade in between just those three colors. As the hue extends toward the bottom point of the cone, the hues of the circle transition from gray in the middle to black in the middle. The cone reduces in shape to a point from a circle above because as any color approaches black, the transitions of color are reduced as well, which was discussed in class. Taking the opposite viewpoint, there are more transitions of color at the top in the circle of hue due to white and its natural tendency to slightly lighten any color toward pastel colors and then white. This exercise did assist me in perceiving color space geometrically.


In addition, the above diagram can be thought of in powers of ten. For example, the lowest and darker point of color represents the integer 10. As the powers of ten are magnified, the color space becomes lighter and larger until it displays its fullest and brightest color. This exercise did assist me in perceiving color space geometrically.