Dana Vrajitoru
I310/D513 Multimedia Arts and Technology

Lab 4

Date: Tuesday, September 13.   Due date: Tuesday, September 20, 2016.

In this lab we will be learning about digital painting tools and will use them to color the line-art image below.

Ex. 1

Download the following image (cup.gif):

Open the Gimp.

If this is the first time you've used the Gimp, an installation dialog will open. You can just click OK until it closes. Usually there's a "tip of the day" dialog that also opens when you start up the program. If it shows up, you can read it and then close it. By default there will be one toolbox (left) and one or more dialog windows opened (right). You can leave these open for now, but if you close them, you can find them again from the Windows - Dockable Dialogs menu. You will need the Layers and Brushes dialogs in this lab.

Gimp GUI

In Gimp, the menu from where you can find a lot of the operations to perform can be found at the top of the screen for Mac versions and on top of each image window for Windows versions. Locate this menu for now and come back to it as needed to complete the lab. You can also access its content by right-clicking in the image. Beside the menu, the Gimp usually has two toolbars that give access to tools, options, list of layers, and other things.

Open the saved image from inside Gimp.

This is an image of type GIF, which is indexed. In particular, this one was created with a grayscale look-up table of colors. We will change that next to have more editing options.

Image Mode

From the top menu, select Image, followed by Mode, and then RGB.

No changes should be visible to the image, but this will allow you to work with any colors. I had saved this image originally in a grayscale format, so it will show as Indexed.

Save this image under a new name, and choose the format xcf (native Gimp format) for now. Save your work from time to time.

Image Layers

Images in the Gimp and Adobe Photoshop and other similar programs can be composed of several layers with independent content. The order of the layers is important for the final look of the created image. The Layer dialog in the Gimp can be found in the right-side toolbar and the button for it looks like a small stack of papers.

Locate the Layers dialog or open it if it is not already there (see the Dialogs menu in the image window).

This should show that the image has only one layer, the background.

Add a new layer by clicking on the New Layer button at the bottom left corner of the dialog. Select the Layer Fill Type to be Transparency. Leave the size unchanged and you can name it "cup". Click on the background layer to make it active, then go back to the image.

Once you have several layers, you can click on them in the Layers dialog to make them active. The active layer is highlighted in this list and all operations you perform on the image apply to it. You can also drag the layers up or down to change their order, choose which ones are visible, and so on.

Identify the "magic wand" selection tool (Fuzzy Select Tool).

This tool selects contiguous regions of the image by color. It is normally found in the Toolbox on the top row. When you click on this tool, the mouse pointer turns into a wand.

Click on the magic wand, then click in the image outside the cup (the background). Then holding the shift down (to add to the current selection), click in the portion of the background situated inside the cup handle.

Everything but the cup should now be selected. What we want, in fact, is to select the cup itself and to move it to the new layer (cup) for easier manipulation.

From the top menu, go to the Select menu and choose Invert. Now the entire cup should be selected. Cut this selection from the image using Ctrl-x.

We've cut the cup from the background layer and it is now in the clipboard. Now we want to switch to the new layer and paste it there.

In the Layers dialog, click on the new transparent layer to make it the active one. Paste the region containing the cup from the clipboard using Ctrl-v, then click anywhere outside this region to unselect it or use Ctrl-h to anchor it in place.

The cup should appear again, but this time the layers dialog should show it in the new layer you created.

Painting Tools

The left-side Toolbox contains a pair of boxes that are foreground and background color indicators, below the tools table. By default, the foreground is black and background is white.

Click on the foreground color(black). Select a color that you want to use to paint the cup, and a hue of medium lightness.

In the same Toolbox, there is a Fill painting tool that looks like a paint bucket.

Click on the Fill bucket and then click anywhere on the cup handle, in the white region (not the border).

This should paint the handle in the color you selected before.

Set the foreground color in a lighter shade and repeat the operation to color the saucer.

You can use the zoom tool if you need to for the small piece of the saucer behind the handle. To zoom out, you can use the zoom button at the bottom of the image window.

Set the foreground color to some even lighter shade. Zoom in on the top of the cup handle. Switch to the Fuzzy Select tool (magic wand) and select the entire region of the handle without the border.

This will make sure that whatever you do next is restricted to this area.

The Toolbox contains an Airbrush tool that looks like a brush with a ribbon trailing form it. It can be used to paint with variable pressure.

Click on the Airbrush tool to select it.

Below the Toolbox, in the same dialog, you should now see a brush selection dialog. If it's not there, you can look for it in the Windows menu - Dialogs. When you click on one of the brushes, newer versions of the program let you set its size. Something like 5 is probably appropriate for the next step.

From the Brushes dialog, select a smaller and soft-edged brush. Use it to add a few highlights to the handle. Unselect the region when you're done with any selection tool.

You can add some highlights to the saucer too with a larger brush if you want.

Table

We will now draw a table in a new layer placed below the cup. The border will be made of two straight lines and we will fill the surface using a pattern.

Add a new layer with a Layer Fill Type selected as white, and call it "table".

The new layer will appear on top of the cup, hiding it.

Move this new layer down in the layer dialog by one place by dragging it down or by using the down green arrow below the layers list. Make sure this is the selected layer in the Layers dialog.

The layer should now be between the background and the cup.

Set the foreground color as black. Locate and select the pencil-shaped tool in the Toolbox (paint with hard edges). Choose an ellipsis brush of size between 3 and 5. Then double-click on the pencil button.

In the dialog on the right, this should display some options for the tool. Normally, double-clicking on a tool should bring a dialog of settings for this tool, if they are available.

Set the Size attribute to 3. Click somewhere near the bottom of the left border of the window, as close to the border as you can (it can be on the border). Then hold the shift down (and notice a line segment following the mouse around), and then click again somewhere around the vertical middle of the window and to the left of the cup (this will be the edge of a table that the cup lays on).

This should draw a line segment in the image.

Still holding the shift down, draw another straight line to the right border of the image.

You can also keep the Ctrl key down for the second line to make sure it is perfectly straight.

Zoom in on the corners to make sure that the lines close the region completely to the borders of the image, then zoom out.

We will use the wand tool to select the surface of the table. If the two lines don't go to the border of the image, we won't be able to isolate the surface of the table from the rest of the background with this tool.

Using the wand tool, select and then cut the region above the table in this layer.

If the wand doesn't seem to work, hold the shift down while doing the selection. Since the background is white, this should not make any difference yet, but the Layers dialog should show that region as being transparent (a gray checkered region).

In the Layers dialog click on the eye next to the cup layer.

This should hide the layer from the image. You shouldn't see the cup anymore in the image, but it is still there. We'll bring it back later.

Unselect everything (Select menu - None), and then select the region below the lines you drew using the wand (this is the surface of the table).

The surface of the table should be selected now. We want to paint it using a pattern, so we'll configure the Fill bucket to use a pattern instead of the foreground color.

Double-click on the Fill bucket. In the settings dialog on the right, select Pattern Fill. Below it, select a pattern that you like, then click on the table surface to paint it.

If you are not happy with the result and you'd like to try a different pattern, you need to undo the operation with Ctrl-z (Cmd-z on Mac) and then redo it. This is because the region is not uniformly colored after you fill it with a pattern.

From the Select menu choose None. Hide the table layer and make the background layer active. Repeat the procedure to paint the background uniformly with a single pattern.

You will have to click on the image several times to fill everything, but the pattern should look continuous. If it doesn't, you can use the pencil tool with a large brush instead, but make sure to use a single stroke to paint everything (as in, don't take your finger of the mouse until you're done).

Make both the table and the layer cup visible, then make the cup layer the active one.

The remaining of the lab will concern this top layer.

Gradients

We will now paint the side of the cup with a gradient creating a lighter shade on the side on the handle.

Set the foreground color to be the light shade you used before on the saucer and the background color the shade of the handle, or similar shades with higher contrast. Using the wand tool, select the exterior surface of the cup (it should still be white).

In the Toolbox, there is a gradient tool called the Blend Tool, next to the Fill bucket.

Double-click on the Blend tool.

This should open the gradient options dialog in the tool options space on the right.

Choose the Shape of the gradient to be Bilinear.

The starting point of the gradient will mark the foreground (lighter) colors, and the end point will mark the background color. We'll make the color transition go at a slanted angle.

Click and hold somewhere towards the right side of the surface (but not on the border), then drag the mouse at a slightly inclined angle towards the other side of the cup and then release.

This should fill the exterior surface with a gradient simulating the lighting effects on the cup. You can repeat the operation, experimenting with the angle and the distance between the start and end points until it looks fine to you.

For the inside of the cup we'll use a vertical gradient coloring the bottom part in a darker color.

Using the wand tool again select the remaining surface inside the cup. Reverse the background and foreground colors by clicking on the small curved double arrow between them in the main window. Set the background color to a darker shade than the foreground color (which is now the darker of the two). Set the gradient shape to be simply Linear. Draw the gradient on a straight vertical line in the region going from the upper border down.

The darker color should be at the bottom. If that's not the case, you can redo the operation changing the direction of the gradient (from bottom to top).

Shadow

We will now create a shadow for the cup by duplicating the saucer in a darker color and moving it below the cup and slightly to one side. We will also use transparency on it.

Create a new transparent layer called "shadow".

You can leave it above the cup layer for now.

Make the cup layer active again in the Layers dialog. Click on the rectangular selection tool from the Toolbox window. Use it to select part of the saucer. Start bellow it and well to the left, then move up to the right until you're above the middle of the saucer, almost at its intersection with the outside border of the handle.

Note that once a region is selected with this tool, you can adjust the borders. The selection should span the length of the saucer horizontally, cover its bottom border, and stop somewhere between the middle and the top.

Copy this region with Ctrl-c, and do not deselect the region. Make the new transparent layer active and paste the copied region into this layer, then move it slightly to the left and down, but so that its upper edge is still inside the original saucer.

You can correct the shadow later if you have to. The ideal would be for the top left corner of the copied saucer to cross the border of the original.

Without un-selecting the region, set the foreground color as a dark shade of gray. Paint this region uniformly all over using the Pencil tool and a large brush (it should only paint on the saucer itself). If a portion of the handle of the cup was also copied by mistake, erase it using the eraser tool. Once you are done, unselect the region (or do Ctrl-h).

We're going to make the borders of the shadow look a bit blurry now.

Locate and select the Blur / Sharpen tool, shaped like a drop of water, and a large brush. Use this tool to fuzzify the borders of the shadow. In the Layers dialog, move this layer bellow the cup. Notice the Opacity slider in this layer, above the list of layers. Decrease the opacity of this layer until the shadow looks right to you. Save the file.

Export

Gimp "saves" files only in its native format .xcf, which is not compatible with most viewers and results in rather large file sizes. On the positive side, it is a lossless format, meaning that it preserves the quality of the image. To save this file in one of the more usual formats, we need to export it. Thus, it is recommended to keep an image in this format while you are still working on it, and export it when you're done.

From the File menu choose Export. Change the extension of the file to be .jpg (you can keep the same name), and then click ok.

A dialog might appear warning you that jpeg images can't handle transparency. It will offer an option to export the image, which will also flatten it. This operation merges all the layers into one, which is what we need to do anyway because JPEG images can't have multiple layers.

Click on Export and then Save in the next dialog.

This is the end of the lab and the JPEG file is the one you need to turn in. There will be more to do for the homework.

Final Result

The only file you need to upload from this lab as part of the homework is the jpeg one. You will work on another image on your own for the homework.