Friday, March 4, 2011

Assignment 3 (finished)

(Parts 1 and 2 are in the previous post)

3 and 4. Here's the code for the linear and non-linear transitions from complimentary colors. In the image the linear transition strips are the bottom three and the non-linear are the top three.

//linear transitions:
//I switched around the RGB values in setAttr in order to get the different colored strips
float $x = 1;
for ($i = 1; $i < 21; $i++) {
$ball = `shadingNode -asShader lambert`;
$color = $ball + ".color";
$objname = `polySphere -ch on -o on -r .5`;
setAttr $color -type double3 ($i/20.0) ($x) ($x);

xform -translation $i 0 0;

hyperShade -assign $ball;

$x = $x - .05;
}


//non-linear transition:
float $x = 1.0;
float $y = 21.0;
float $w = 5.0;

for ($i = 1; $i < 22; $i++) {
$ball = `shadingNode -asShader lambert`;
$color = $ball + ".color";
$objname = `polySphere -ch on -o on -r .5`;
setAttr $color -type double3 ($x) (5.0/$w) ($i/$y);

xform -translation $i 0 0;

hyperShade -assign $ball;

$x = $x - (1/$y);
$w = $w + (1);
};


5. Here's the image I made. I don't think it's quite what was wanted for this assignment, but I don't know how to make an easy-to-reproduce image that looks decent.

Steps to reproduce above image:

1. Open Photoshop and create a new file (command N).

2. Set dimensions to 640x480. Press Enter.

3. Create a new layer (command shift N).

4. Press P (pen tool) and create an "s" type shape. When finished, right-click and choose "Fill Path". Press Enter.

5. Repeat steps 3 and 4.

6. Next open the gradient tool (press G) and then the gradient editor. Change the start and end colors to whatever you want. Add three more colors in between. Have these colors make up the hues that would be in-between the start and end colors if they were in a color cube.

7. Create a new layer. With the gradient tool still selected, click and drag the mouse from the top of the image to the bottom and then let go. This will create a nice gradient with the colors you chose.

8. Move the gradient layer just above one of the layers with the "s" shape from step 4. Right click the gradient layer and select "Create Clipping Mask". This makes it so the gradient will be in the shape of the shape you made with the pen tool.

9. Repeat steps 6-9 for the other "s" shape.

10. Create another layer and fill it with white using the paint bucket tool (press G).

11. Go to Filter -> Sketch -> Chalk & Charcoal. Make sure both chalk and charcoal are is set to 6 and stroke pressure is 1. Press Enter.

12. Make sure the new layer is at the very top and then set the blending mode of that layer to Screen.

That concludes the directions.

No comments:

Post a Comment