Creating 3D effects with maps in GIMP
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).
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.
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.
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.
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.
Infos
- Bump Map: http://docs.gimp.org/en/plug-in-bump-map.html
- Map Object: http://docs.gimp.org/en/plug-in-map-object.html
Buy this article as PDF
(incl. VAT)
Buy Linux Magazine
Subscribe to our Linux Newsletters
Find Linux and Open Source Jobs
Subscribe to our ADMIN Newsletters
Support Our Work
Linux Magazine content is made possible with support from readers like you. Please consider contributing when you’ve found an article to be beneficial.
News
-
Fedora 40 Beta Released Soon
With the official release of Fedora 40 coming in April, it's almost time to download the beta and see what's new.
-
New Pentesting Distribution to Compete with Kali Linux
SnoopGod is now available for your testing needs
-
Juno Computers Launches Another Linux Laptop
If you're looking for a powerhouse laptop that runs Ubuntu, the Juno Computers Neptune 17 v6 should be on your radar.
-
ZorinOS 17.1 Released, Includes Improved Windows App Support
If you need or desire to run Windows applications on Linux, there's one distribution intent on making that easier for you and its new release further improves that feature.
-
Linux Market Share Surpasses 4% for the First Time
Look out Windows and macOS, Linux is on the rise and has even topped ChromeOS to become the fourth most widely used OS around the globe.
-
KDE’s Plasma 6 Officially Available
KDE’s Plasma 6.0 "Megarelease" has happened, and it's brimming with new features, polish, and performance.
-
Latest Version of Tails Unleashed
Tails 6.0 is based on Debian 12 and includes GNOME 43.
-
KDE Announces New Slimbook V with Plenty of Power and KDE’s Plasma 6
If you're a fan of KDE Plasma, you'll be thrilled to hear they've announced a new Slimbook with an AMD CPU and the latest version of KDE Plasma desktop.
-
Monthly Sponsorship Includes Early Access to elementary OS 8
If you want to get a glimpse of what's in the pipeline for elementary OS 8, just set up a monthly sponsorship to help fund its continued existence.
-
DebConf24 to be Held in South Korea
Busan will be the location of the latest DebConf running July 28 through August 4