Gimp - mastering filters
From LXF Wiki
(originally published in LinuxFormat No.64)
Gimp has done well to offer a range of filters... but does anyone know what they're for? Michael J Hammel demystifies Noisify, Cubism and Wind with a quick 3D cityscape project.
|Table of contents|
Mastering Gimp filters
Gimp offers a plethora of built-in tools: brushes, patterns, selections, colour management... the list is impressive. On top of these are a wealth of filters (also known as plug-ins) for automating tasks and generating imagery. Together these features make Gimp a powerful image editing program.
With so many options, the problem for new users is learning where these tools are and what they do. And once they find their way around the program, the problem becomes when and why to use which features for any given project.
This month's tutorial on creating an imaginary 3D cityscape of high-rise buildings uses three of Gimp's filters Noisify, Cubism and Wind. We'll explain how they work and why we chose them for this project.
Screenshots for this article are taken from Gimp 2.0 but the process is applicable to Gimp1.2 as well as the recently released Gimp 2.2.
Before the tutorial begins, let's take a look at the three filters that we'll be using.
The Noisify filter
An often overlooked filter, Noisify simply adds coloured pixels at evenly-distributed locations around the canvas at random.
Evenly distributed means that the noise should not have clumps of pixels scattered around the canvas. However, random means that if you ran the Noisify filter twice using the same settings the rendered effect would appear different.
As an example of what noise looks like, turn on your TV set to a broadcast (not cable) channel that has no signal. See the dots flying all over? That's noise. Noisify (located in the Gimp menu at Filters > Noise > Noisify) adds something like this to a canvas. You dictate the amount of noise; from a few soft specks that look like snowflakes at a distance to densely-packed dots that resemble your TV screen in the middle of a storm.
Adding noise is a common way to begin an effect for many images. It can provide texture for a solid colour, thereby producing walls, cement, gravel and a variety of other surfaces. Noise can also break up streaks of colour in gradients and add age to a photograph. You could even use noise generated with the same settings across multiple frames of an animation to simulate `snow' in a TV signal.
Noisify requires no image content on the layer to which it is applied. You can apply noise to a completely empty layer (that is, fully transparent) or you can apply it over a layer that is fully opaque. When the noise itself will provide the final effect such as snow or rain falling it's often best to place the noise on its own layer. If the noise is to be used as the first part of a multi-step process to create an effect as with our cityscape tutorial the noise is often placed on an existing layer that already has image content. If the layer is not empty then the noise will replace image content in that layer.
Each colour channel in a layer can have different levels of noise configured. The channels can be set to unique values or set so that they all have the same value. If the Independent toggle is unset the resulting noise will be desaturated (ie white, grey or black). If that toggle is set, though, the noise will have a variety of coloured pixels.
The Cityscape tutorial will use noise to add a limited amount of grey to a black layer in order to give the Cubism filter (more of which follows) some image variation from which to create random, semi-transparent squares. Without the noise, the solid black colour would not provide Cubism with enough pixel information to produce the shapes we need for this project.
The Cubism filter
The Cubism filter (Filters > Artistic > Cubism) generates a collection of semi-transparent squares similar to bits of translucent paper. Imagine cutting a bunch of rectangles out of rice or tissue paper, putting the rectangles in a box then flipping the box over to let the pieces float to the ground. The mess on the floor is what Cubism is designed to reproduce.
While Noisify renders image content without regard for existing content, Cubism relies on the original image content to produce its effect. If the image content for a layer is a solid colour the results of running Cubism on that layer would be the same solid colour (ie no different). Adding noise to the solid colour provides enough variation to the image content for Cubism to produce visible changes. In fact, that is exactly how Cubism will be used in the Cityscape tutorial.
Cubism provides only two options the size of the squares and tile saturation. The true size of the squares is set by a combination of larger sizes and higher saturation levels. Higher saturation levels also reduce the number of squares generated. Think of saturation as being like a zoom setting higher saturation means getting your head closer to the floor to view the bits of rice paper, making the squares appear larger.
The choice of Cubism is key to the Cityscape tutorial. The shapes it produces will become the roofs of buildings as well as the surfaces from which we will extend the sides of the buildings using the Wind filter. Without the effect produced by Cubism, the Cityscape would be considerably harder to create.
The Wind filter
New users to Gimp tend to see a filter and assume a single purpose. The Wind filter, for example, is expected to produce images that look like blowing sand or snow. It is, after all, called Wind. It implies adding motion to an image.
The truth is that most filters can be used in ways not implied by their names. The Wind filter (Filters > Distorts > Wind) works by extending black and white lines out away from what it perceives to be an edge in an image. These lines are effectively the same as a motion blur, though with variations provided by the Wind filter's options. The main drawback to using Wind for motion blur is that it only works horizontally (in two dimensions, the wind can only blow from the left or the right)Motion Blur filter, on other hand,the wind can the other hand, can be set to any angle.
But the Cityscape tutorial doesn't need a motion effect. The Wind filter provides walls to go with the roofs created by Cubism. This tutorial will use Wind to extend walls from the edges of the squares generated by Cubism. We will literally blow the walls out from the roofs.
The Wind filter has three main settings: Style, Direction and Edge Affected. Style gives two options: Blast, which gives an explosion-like effect; and (confusingly) Wind, which gives a softer look. Direction defines where the wind blows from. Edge Affected is a bit of a misnomer. Leading will produce a white wind while Trailing will produce a black wind. Strength and Threshold options are also available with the Wind Filter.
The filter's Strength is, essentially, the length of the path of blowing wind. A low Strength setting gives a gentle zephyr, while a higher value means bracing gusts, and a more dramatic effect in the image.
Most filters or tools in Gimp that offer a threshold option (such as Wind, Select by Colour or Fuzzy Select) enable you to specify how an edge is defined. High threshold values mean that adjacent pixels can be further apart in value (eg colour, brightness) before they would be considered an edge. Lower values mean that only pixels that are near in value are likely to be be considered an edge. A low threshold value on a scenic photograph might produce large numbers of edges. A high threshold value would reduce that number.
This works for us because Wind only works horizontally, and Cubism produces defined edges. So no matter what the angle of the roof, the walls can be extended all in the same direction. All that's needed after Wind creates the walls is to rotate the layer 90 degrees to make the buildings stand upright.
This project could be used to produce a poster or flyer by simply adding some text. Be sure to add the text where there is enough contrast to easily read the words placing them over the solid black background would be best.
For larger versions of this project, such as those intended for print, repeated scaling, blurring, and application of the Unsharp Mask may be needed to achieve the desired effect.
The settings for Unsharp Mask will be affected by the results of the Cubism filter, which will be different for everyone who tries this tutorial. This is due to the random nature of the original noise and the variation produced by the Cubism filter. LXF