Gimp part 3

From LXF Wiki

Revision as of 17:28, 27 Sep 2008; view current revision
←Older revision | Newer revision→

IMAGE MANIPULATION


The Gimp: Photographic techniques


The Gimp's tools are perfect for working with photographs, and going from average photos to studio-quality images requires only a few simple techniques, as Michael J Hammel reveals...

CREDITS
All photos are taken from the public domain collection at www.pdphoto.org

We aren't all professional photographers or graphic artists. However, while we may not have the $5,000 cameras that the professionals use, we do have the same software tools that are available to those people, and there are many common techniques for using this software. Learning to create good selections is a big part of working with photographs, as are layer masks and blend modes. And how could any graphic artist worthy of the name get away without at least one good blur a day?


In this tutorial, we're going to look more closely at three techniques that graphics experts use a great deal: depth of field, simulated motion and reflections. All of these are a lot easier than they might first appear, so don't fret ­ just practise and play. It's how all graphic artists get started. Take a look at any of your personal photos. If most of your shots were taken with a typical disposable camera, you'll notice that there's a wide depth of field. That means that, assuming your subject is more than a few yards away, pretty much the entire photo is in focus. Changing the apparent depth of field can alter the subject of the photo. If you're subject is off-centre and not completely obvious, a depth of field change can pull the subject out, exposing the true meaning behind the shot.

1/ The original 1,024x768 image is clear and crisp, but the focus of the photo is the room as a whole. The goal is to emphasise just the table and chairs, so create an oval selection around the table (it doesn't have to fit it exactly). The selection is feathered by a large amount ­50 pixels in this case, although it could have been more. Invert the selection and run Gaussian Blur, set to about 5 or 10 pixels. To add more emphasis, add a new layer (with the selection still intact) and fill with a Radial gradient, white to black, centred in the selection. Reduce the opacity of this layer and set the Blend mode to Multiply (for The Gimp 1.2) or Grain Merge (if you have version 2.0).
1/ The original 1,024x768 image is clear and crisp, but the focus of the photo is the room as a whole. The goal is to emphasise just the table and chairs, so create an oval selection around the table (it doesn't have to fit it exactly). The selection is feathered by a large amount ­50 pixels in this case, although it could have been more. Invert the selection and run Gaussian Blur, set to about 5 or 10 pixels. To add more emphasis, add a new layer (with the selection still intact) and fill with a Radial gradient, white to black, centred in the selection. Reduce the opacity of this layer and set the Blend mode to Multiply (for The Gimp 1.2) or Grain Merge (if you have version 2.0).

In reality, a depth of field trick is no more than a selective blur. You've seen this trick numerous times in advertisements for cars, with the car in focus but the background blurred out of recognition. In the first example, I'll use a variation on depth of field effect to pull one area of an image into the spotlight. The second example pulls a building to the forefront of a photo, with true depth of field changes.

2/ The first example wasn't a true depth of field effect because it's easy to see that the other objects are at the same distance from the viewer as the table. This example is more true to depth of field. The original image is mostly in focus but with an obvious foreground object, the outhouse. Use Quick Mask to create a selection around that and some of the grasses below it, then save the selection to a channel. Now feather, copy and paste the selection as a new layer.
2/ The first example wasn't a true depth of field effect because it's easy to see that the other objects are at the same distance from the viewer as the table. This example is more true to depth of field. The original image is mostly in focus but with an obvious foreground object, the outhouse. Use Quick Mask to create a selection around that and some of the grasses below it, then save the selection to a channel. Now feather, copy and paste the selection as a new layer.
3/ With the background layer active again, use the saved channel to retrieve the selection. Invert it, then use Select by Color to remove the sky from the selection, leaving just the background grasses, the house and the mountain. Hold down Ctrl and click in the image to do this. Use Quick Mask again to remove the house and mountain. Save the selection, feather, copy and paste. This puts the grasses on their own layer.
3/ With the background layer active again, use the saved channel to retrieve the selection. Invert it, then use Select by Color to remove the sky from the selection, leaving just the background grasses, the house and the mountain. Hold down Ctrl and click in the image to do this. Use Quick Mask again to remove the house and mountain. Save the selection, feather, copy and paste. This puts the grasses on their own layer.
4/ Now comes the depth of field. Blur the background by a considerable amount. In this case, we blurred it by around 20 pixels. Now blur the grasses layer by a smaller amount, say 5 to 10 pixels. Finally, adjust the Curves and Levels for the middle grasses and background layers to darken them slightly. This provides the added depth from the apparent changes in lighting that you see over distance.
4/ Now comes the depth of field. Blur the background by a considerable amount. In this case, we blurred it by around 20 pixels. Now blur the grasses layer by a smaller amount, say 5 to 10 pixels. Finally, adjust the Curves and Levels for the middle grasses and background layers to darken them slightly. This provides the added depth from the apparent changes in lighting that you see over distance.


A more professional shot can be made from an ordinary still photograph by applying a motion blur to the object of interest. In this next example, the final effect is actually the easy part ­ the trick is in pulling the object out of the background in order to apply the effect only to the subject. It's important to note that techniques like this one work well with non-linear and distant backgrounds, like mountains. If edges need to line up exactly, then cloning, as done here, doesn't work as easily to remove an object from the background.

5/ The 1,000x670-pixel original image shows a plane rolling down a runway, preparing for takeoff. The runway isn't actually visible in the photo, though a parallel runway in the foreground is. The plane is also slightly off-centre in this image. To improve the photo, the plane should ideally appear to be in low-level flight, with the wheels raised. It should also be centred. In addition, the two runway lights also need to be removed to make sure that they don't distract from the image of the plane in flight.
5/ The 1,000x670-pixel original image shows a plane rolling down a runway, preparing for takeoff. The runway isn't actually visible in the photo, though a parallel runway in the foreground is. The plane is also slightly off-centre in this image. To improve the photo, the plane should ideally appear to be in low-level flight, with the wheels raised. It should also be centred. In addition, the two runway lights also need to be removed to make sure that they don't distract from the image of the plane in flight.
6/ Grabbing the plane is the easy part. Draw a freehand selection around the plane as a starting point and then click on the Quick Mask button. Use soft-edged brushes to outline the plane more precisely, zooming in and using smaller brushes for finer detail. Remember: painting in white on the Quick Mask adds to a selection, while painting in black subtracts from it. When complete, click on the Quick Mask button again to return to the selection. Feather this by a few pixels; say 3. Now copy and paste into a new layer. Keep this layer on top of all the other layers as you work.
6/ Grabbing the plane is the easy part. Draw a freehand selection around the plane as a starting point and then click on the Quick Mask button. Use soft-edged brushes to outline the plane more precisely, zooming in and using smaller brushes for finer detail. Remember: painting in white on the Quick Mask adds to a selection, while painting in black subtracts from it. When complete, click on the Quick Mask button again to return to the selection. Feather this by a few pixels; say 3. Now copy and paste into a new layer. Keep this layer on top of all the other layers as you work.
7/ The next trick is to remove the plane from the background. The problem here is that once the plane is removed, we're left with a hole in the image. This needs to be patched with copies of other parts of the photo. This can be done with various selection shapes ­ rectangular freehand and oval ­ copied from around the image. Each selection should be feathered by 20 pixels, copied and pasted over some part of the hole. Use layer masks to blend these patches with one another.When the plane and runway lights are finally removed, merge the patches into a single layer. Remember to keep the plane layer above these patches. It helps to turn off the visibility of the plane layer while working on patching the holes in the background.
7/ The next trick is to remove the plane from the background. The problem here is that once the plane is removed, we're left with a hole in the image. This needs to be patched with copies of other parts of the photo. This can be done with various selection shapes ­ rectangular freehand and oval ­ copied from around the image. Each selection should be feathered by 20 pixels, copied and pasted over some part of the hole. Use layer masks to blend these patches with one another.
When the plane and runway lights are finally removed, merge the patches into a single layer. Remember to keep the plane layer above these patches. It helps to turn off the visibility of the plane layer while working on patching the holes in the background.
8/ Blur the background slightly, adding a depth of field effect. A slight motion blur can be used to simulate camera motion. Rotate the plane layer so that the body midline is horizontal. Duplicate this layer, keeping the original as the top layer. Motion blur the duplicate layer with a linear length of about 45 pixels (a good amount for the original image size) at an angle of 0 degrees. This will blur the plane to the left.Add a layer mask to the original (topmost) plane layer. Mask out most of the body but leave the cockpit and the edges of the tail fin, wing and propeller. The result is the motion blur layer showing through, while sharp detail remains along the important lines of the plane, giving a genuine sense of speed to the image.
8/ Blur the background slightly, adding a depth of field effect. A slight motion blur can be used to simulate camera motion. Rotate the plane layer so that the body midline is horizontal. Duplicate this layer, keeping the original as the top layer. Motion blur the duplicate layer with a linear length of about 45 pixels (a good amount for the original image size) at an angle of 0 degrees. This will blur the plane to the left.
Add a layer mask to the original (topmost) plane layer. Mask out most of the body but leave the cockpit and the edges of the tail fin, wing and propeller. The result is the motion blur layer showing through, while sharp detail remains along the important lines of the plane, giving a genuine sense of speed to the image.



9/ Once again, start with a Quick Mask selection around the rose. This image offers high contrast around the edges. With images like this, you're better off removing the darker edges, leaving the lighter colour of the object. This enables you to place the selection on just about any background. Place the rose on its own layer, with a black background behind it.
9/ Once again, start with a Quick Mask selection around the rose. This image offers high contrast around the edges. With images like this, you're better off removing the darker edges, leaving the lighter colour of the object. This enables you to place the selection on just about any background. Place the rose on its own layer, with a black background behind it.


10/ The rose is too large to add a full reflection, so scale it down to be slightly less than half the size of the canvas. Centre the layer in the upper half of the window and create a duplicate of this layer. Enlarge the duplicate layer (don't scale it!) and disable the Keep Transparency button. Now lightly blur the duplicate layer.
10/ The rose is too large to add a full reflection, so scale it down to be slightly less than half the size of the canvas. Centre the layer in the upper half of the window and create a duplicate of this layer. Enlarge the duplicate layer (don't scale it!) and disable the Keep Transparency button. Now lightly blur the duplicate layer.


11/ A visible surface is needed next. Create a new layer and fill three quarters of it (positioned from the bottom of the layer) with a gradient running from black at the top to full colour (a greenish/aqua tint) at the bottom. Now duplicate this layer. Use the Alpha to Selection option to select just the gradient and the greenish tint filled in the selection. Now add a layer mask to the duplicate layer and fill with two radial white-to-black (inside to outside) gradients, centred on the flower (first) and the reflective surface (second).Place the green tint layer with the layer mask above the rose reflection layer and the gradient (black to green) layer below the rose reflection. The black background remains at the bottom of the stack and the original rose at the top.
11/ A visible surface is needed next. Create a new layer and fill three quarters of it (positioned from the bottom of the layer) with a gradient running from black at the top to full colour (a greenish/aqua tint) at the bottom. Now duplicate this layer. Use the Alpha to Selection option to select just the gradient and the greenish tint filled in the selection. Now add a layer mask to the duplicate layer and fill with two radial white-to-black (inside to outside) gradients, centred on the flower (first) and the reflective surface (second).
Place the green tint layer with the layer mask above the rose reflection layer and the gradient (black to green) layer below the rose reflection. The black background remains at the bottom of the stack and the original rose at the top.


12/ What makes a scene like this one work is depth, which is                             simulated with shadows. We're going to add four shadows to this scene. The first is an oval, dark shadow added at the base of the rose. This helps to give the appearance that the rose is sitting on the surface. Duplicate the rose, fill it with black, then blur it and use the Perspective Transform tool to point the shadow into the distance. This is required because the rose appears to be lit from in front and above. Reduce the opacity of this layer.
12/ What makes a scene like this one work is depth, which is simulated with shadows. We're going to add four shadows to this scene. The first is an oval, dark shadow added at the base of the rose. This helps to give the appearance that the rose is sitting on the surface. Duplicate the rose, fill it with black, then blur it and use the Perspective Transform tool to point the shadow into the distance. This is required because the rose appears to be lit from in front and above. Reduce the opacity of this layer.


13/ Duplicate the rose again and fill it with black. Now blur it and scale it down vertically using the Transform Scale tool. This layer is another base shadow from lighting directly overhead and to the right. You'll need to reduce the opacity of this layer too. The last shadow is again a rose duplicate, filled with a black (top) to white (bottom) gradient blurred. Flip the layer vertically.Use Perspective Transform to pull the layer out and to the left of centre, then reduce the opacity. Now add some noise (Filters > Noise > Noisify, with all channels set to 0.04) to the bottom surface layer (the one with the gradient) and the rose reflection. This gives texture to the reflective surface.
13/ Duplicate the rose again and fill it with black. Now blur it and scale it down vertically using the Transform Scale tool. This layer is another base shadow from lighting directly overhead and to the right. You'll need to reduce the opacity of this layer too. The last shadow is again a rose duplicate, filled with a black (top) to white (bottom) gradient blurred. Flip the layer vertically.
Use Perspective Transform to pull the layer out and to the left of centre, then reduce the opacity. Now add some noise (Filters > Noise > Noisify, with all channels set to 0.04) to the bottom surface layer (the one with the gradient) and the rose reflection. This gives texture to the reflective surface.


Again, trial and error will see you through with this technique. Try to experiment on a smaller version of an image to see if the basic technique will work before trying it on larger scans. Another simple effect that anyone can do is to simulate the reflection of an object on a glassy surface. This technique is easy but requires a good subject in order to obtain the best results. In this example, we're using a yellow rose. Objects that can stand upright in the image, such as the head-on view of a mobile phone or a car seen from the side, offer the best results, especially if you want the reflection to be recognisable. Objects that provide fewer straight edges or flat sides, like this rose, are better suited to reflections that are rippled and distorted to make them less recognisable.




CREDITS All photos are taken from the public domain collection at www.pdphoto.org