Depth

GIMP adds texture and other three-dimensional effects to images through the use of secondary maps that affect the original image on a per-pixel basis.

Many images lack depth, making them seem flat, and thus lifeless or "false." For realistic 3D effects, GIMP provides a set of filters that use the pixel brightness values contained in secondary maps to modify the original image. These methods are applicable both on a small scale, in image details, and to the entire image.

The Bump Map filter offers a way to create very attractive three-dimensional effects. To do so, brightness and position data are processed with brightness data from another layer (the bump map), usually causing shifting and additional changes in brightness.

Bump Mapping

The Bump Map filter [1] (Filters | Map | Bump Map) is relatively simple, as Figure 1 shows. The filter always acts on the current image when it is called and uses a "virtual" light source that modulates a three-dimensional effect using light and shadow.

To begin, select the image to be used as the Bump map, from which the modulating brightness information is taken: The bump height will depend on the brightness of the pixels of this image. You can adjust the effects via the slidebar parameters or apply effects directly by drag-and-drop from the GIMP Levels dock.

The choice of an appropriate image for the map naturally has a huge influence on the result, as Figure 2 shows. Both variants shown here are useful, but using an "external" image level opens up a wide range of options for embossing (see the "Watermarks" box).

Figure 2: The same image with two different bump maps, but with identical settings otherwise. The image on the left used itself as the bump map; the one on the right used a purely random pattern computed from the Difference Clouds filter.

Watermarks

To protect ownership of their images, artists often use watermarks that are easy to read but not too visible, so as not to interfere too much with the image. A bump map is a good alternative to the usual text embellishments. To begin, create a text layer in the finished picture (an image plane is of course also possible) and remove the alpha channel (Remove Alpha Channel in the context menu of the Layers dock). Now you can use this layer in the Bump Map filter as your bump map.

Using the original image level as a bump map often achieves good results. The effects are usually a more subtle, but often creative, 3D effect with an interesting appeal. The Emboss filter works in this way. To achieve the best results, be sure to experiment with the Map type: Linear maps the brightness proportionally in displacements, Sinusoidal additionally modulates a sine wave, and Spherical applies a spherical function, as was used in the sample image.

In almost all cases, the levels manipulated by the filter are too dark, so you usually have to enable Compensate for darkening. Clicking the Invert bumpmap checkbox reverses the effects of dark and bright areas in the bump map and sometimes has a pronounced and pleasant effect. The Tile bumpmap option deploys the bump map so that it produces a seamless pattern.

The slidebar parameters control the details of the bump map, and even the smallest changes are worth testing. Azimuth defines the direction of the light source, and Elevation is its angle to the horizontal: Low angles produce substantial effects. Depth determines the extent to which the luminosities of the bump map are taken into account.

X offset and Y offset allow the bump map to move relative to the original level. Typically, you only need small values here. The Waterlevel acts on transparent areas of the image, which are treated as black areas (i.e., holes) by default. Adjusting the waterlevel fills these holes to a greater or lesser extent. The Ambient parameter regulates the intensity of light used. Small values boost the effect.

Although Bump Map is a powerful filter, it often offers more than you might need. In many cases, it is quite enough to manipulate images with the default settings to achieve remarkable results.

Playful

Other filters also use maps, but they often do this implicitly. One example of such a filter is Apply Lens, which is under the Filters | Distorts menu. To use it, simply select an area and apply the filter; the filter parameters let you magnify the view of your selection (Figure 3).

The lens is implemented by a concentric "displacement map." You can present this filter more impressively if you first copy the selection into its own layer and then trace the selection with a line.

The Map Object filter (Filters | Map) [2], shown in Figure 4, computes the representation of a level as it would appear on a reflective or illuminated surface. The available "objects" are a Plane, a Box, a Sphere, and a Cylinder. Applying the filter is computationally intensive; you can take a coffee break after setting the parameters.

Figure 4: The Map Object filter has only a small preview, but you can adjust many parameters precisely.

The parameters are grouped into four tabs and control all aspects of the filter. The Options tab contains the basic settings: Map to defines the object to be mapped on, Transparent background specifies whether the background is filled with a background color (not checked) or transparent (checked). Tile source image applied to map levels causes multiple copies of the source image to be joined if required.

Normally, you will want to Enable antialiasing, even though this requires significantly more computation time. The better results justify the wait. Depth controls the quality (higher values are better but cost more time). The Threshold specifies when the computation can stop.

In the Light tab, you can set the light source(s) for the manipulation. Point light, for example, typically provides results. You can finely adjust the position of the light source using the three Position coordinates (Figure 5). For a coarse initial setting, it makes more sense to use your mouse in the preview window.

Figure 5: The blue dot in the preview window symbolizes the light source. You can move it with the mouse.

The Material tab lets you define to the optical properties of the object. The effects are subtle, so it makes sense to determine the correct values on the basis of the preview. This is also true for the Orientation tab. Figure 6 is an example of what the Map Object filter can do. If you select the cylinder object, another tab appears that lets you make additional settings for the geometry.

Figure 6: Masked tulips on a spherical surface.

Conclusions

In GIMP, you can easily generate impressive 3D effects that significantly improve the visual effect of images. The use of maps in GIMP provides users a way to design many interesting effects in addition to watermarks.

Graphic artists often face the problem of turning a photograph into an image that will tile over a larger surface. This task is not as easy as it sounds, but if you’re up for the challenge, this tutorial will give you a first-hand look at some advanced tools in the GIMP toolkit.