[LinuxFocus-icon]
LinuxFocus article number 314
http://linuxfocus.org

[Photo of the Author]
by Eric Lamarque
<eric_lamarque/at/yahoo.fr>

About the author:

User of Linux since 1999!



Translated to English by:
Guido Socher <guidoatlinuxfocus.org>

GIMP: Make your own brushes

[Illustration]

Abstract:

In this article I will present the various brushes that GIMP offers and show how to create brushes.
First we will look in detail at the brushes dialog, "Brush selection", and the different brushes it contains. After that I will show you how to create your own brushes.
The version of Gimp used for this article is 1.2.3.

_________________ _________________ _________________

 

1. The available brushes

First, if you have not done it yet, open the dialog "Brush selection" (from Menu/File/Dialogs/Brushes). The following window should appear:
GIMP Brushes Dialog
  1. Size of the brush: here 13x13
  2. Name of the brush: Circle Fuzzy (13)
  3. Current brush
  4. This small ' + ' indicates that the brush is larger than shown; press and hold the left mouse button on these brushes to see them in their real size.
  5. This small red triangle indicates a, so called, pipe brush: this brush contains several images and not only the one shown; click with the left mouse button on these brushes to see all the images.
  6. Value of spacing. It is the size of the brush in percentage (here 25%) which GIMP uses before the next copy of the image is used. (No panic: you will see how that works).

Now let us see the various types of brushes. For all the exercises in this part, open a new image RGB with a white background.

Reset the colors of foreground (FG) and background (BG) to black/white. Select the brush "Circle Fuzzy (13)" and draw a line with the paintbrush tool. Change the color of foreground to blue and draw a second line.

Impressing!!
It's a simple brush. The brush in this case is a grayscale image used by Gimp as an inverted alpha channel. The white corresponds to the transparent color and the levels of gray are used as value for the foreground color. The file associated to the brush has the extension ".gbr".
simple test brush

test pipe RGB Set again the colors of foreground and background to black/white. Select the brush "Vine" from the "Brush Selection" dialog. Change the foreground color to blue and draw something.

You note: you wanted vine in blue but it remained green. "Vine" is a RGB pipe or animated brush: it is not possible to change the color in this type of brush. On the other hand, the image evolved/moved while you draw. The associated file type for this brush has the extension ".gih".

Reset the colors of foreground (FG) and background (BG) to black/white. Select the brush "PencilSketch" and draw. Change the color of foreground into blue and draw a second line.

Ah finally! This starts to resemble something!
"PencilSketch" is a pipe "alpha". In addition to drawing with the color of foreground, the brush changes during the drawing. The file type associated with this brush has also the extension".gih".
test pipe alpha

test spacing Change "Spacing": Reset the colors of foreground (FG) and background (BG) to black/white. Select the brush "Circle(13)", set spacing to 20% and draw a line.
Set spacing to 100% and draw a second line.
Set spacing to 200% and draw a third line.
This experiment shows the influence of spacing on the brushes. For decorative brushes ("Guitar "or" Pepper"), one will generally choose a spacing of 100%.
 

2. Creation of a simple brush

Reset the colors of foreground (FG) and background (BG) to black/white. Open a new image (File->New) with image type gray and fill type background.
Trick: Do not hesitate to create an image larger than the size of the desired brush: it is easier to work on a big image and then reduce than to make the brush in real size.
For the example, the image with a size of 256x256 and will be reduced to 64x64.

And now, using some imagination, you just have to create the brush of your dreams.

For the example, I drew a boat.
Trick: If you want to obtain a brush with soft contours, use the filters "Blur" from the right click menu.
new image
the brush Your master piece is ready. Here an outline of my example already reduced to 64x64.

If you think of modifying/reusing the elements of your image later on, it is the moment to save now as .xcf or never come back : the creation of the brush is an operation with a single direction. Once the file ".gbr" is generated, one loses the original elements of the work in progress (path, channels...).

Now to finally create the brush do this:
And ready is the magnificent and decorative brush. But it does not appear in the dialog "Brush Selection". Press the refresh button and it becomes available.

You can now use your brush.
very nice :)
a new brush
 

3. Creation of a RGB pipe

A pipe - or animated brush - is a brush which contains several images. The image of the brush varies at the same time as one draws: it is the experiment we did with the brush "Vine" in the first part.

In GIMP, the creation of a brush of this type is an image with several layers.

NOTE: Only the brush "pipe" can have colors (RGB). If you want a fixed brush color (like "Pepper"), you will have to create a pipe with only one layer.

This is what you do: create a new image RGB with "fill type" transparent.
Hint: Do not hesitate to create an image larger than the size of the desired brush: it is easier to work on a big image and then to reduce than to make the brush in the final size.
new image

Remove the layer which is by default there. It is called "Background".
And here we are, using our imagination, we just have to create the brush of our dreams.. For that, create a layer with a "transparent fill type" for each image of the future brush.
For the example, I used my image of the boat with 3 different colors.
Important: All the copies must contain a alpha channel. The simplest way to do this is to create the copies with a transparent background ("Fill Type=transparent").

layers Your master piece is ready. Here a screenshot of the layers from the example: a boat with 3 colors.

If you think of wanting to modify/re-using the elements of your image later on, then save it now as .xcf : the creation of the brush is an operation with single direction. Once the file "gih" is generated, one loses the original elements of the work in progress (layer, path, channels...).


Now to finally create the brush do this:
It is done: now you have a new animated brush. But it does not appear in the dialog "selection of brushes" until you press the refresh button.

You can now use your brush.
color :)
a new animated brush
 

4. Creation of an "Alpha" pipe

A "alpha" pipe is an animated brush which contains several images of the type grayscale. The brush "PencilSketch" is of this type.

In GIMP, we need to create an image with multiple layers and image type "Grayscale".

Reset the colors of foreground (FG) and background (BG) to black/white. Create a new image of type "Grayscale" and set fill type to "Background".
new image

Remove the layer which is by default there. It is called "Background".
And here we are, using our imagination. I drew for example a simplified face. IMPORTANT: No layer must have any transparent pixels. The easiest way to achieve this is to create all layers with the fill type "background".

layers The master piece is ready: four different expressions of a face.

If you think of modifying/reusing the elements of your image later on, it is the moment to save now as .xcf or never come back : the creation of the brush is an operation with a single direction. Once the file ".gih" is generated, one loses the original elements of the work in progress (path, channels...).


Now to finally create the brush do this:
It is done: now you have a new animated brush. But it does not appear in the dialog "selection of brushes" until you press the refresh button.

You can now use your brush.
:P :)
a new animated brush
 

5. Importing of brushes from Paint Shop Pro

There are a lot of brushes available for Paint Shop Pro (extension "tub" or "psp") and it may be that you find one which correspond to your needs.
  1. Check first of all that the conditions/license to use the brush are compatible with your project.
  2. Simply open it in GIMP: if this fails, then the format is unknown because the file was created with a too recent version of Paint Shop Pro. No chance.
  3. When brush is open in GIMP; save it with the extension "gih". The majority of the parameters are already correct just set the name of the brush and the spacing.
  4. Move the brush image to the directory ~/.gimp-1.2/brushes/. Press the refresh button in the dialog "selection of brushes".
Let's try and example from graphicssoft.about.com, the site of Sue Chastain.
This site has the advantage of providing good information for each brush: note it down for later use.

Brush "Translucent Colored Orb Tubes" (file sc-colororb.tub):
convert .tub files Open the file in GIMP. Even if the extension ".tub" is not mentioned explicitly in the type of files, the format Paint Shop Pro ("PSP") is supported.
You should now have an image containing eight bubbles colored on a transparent background.

Save the image under the name "sc-colororb.gih".
color bubbles

dialog GIH I marked in red circles on the left side the fields you need to modify:
  1. Spacing: 150 pixels. With the bubbles having a size of of 146x150, we can assume that it will be 100% (a full bubble).
  2. The name of the brush: SC (the initials of the author - rather widespread convention) and some meaningful name.
Notice that GIMP automatically filled the number of cells (8) and the way of finding them in the image ("2 Rows of 4 Columns ": 2 lines out of 4 columns).
The number of rows and the selection are also converted (8 rows - angular selection).

Save the file with these settings and copy sc-colororb.gih to ~/.gimp-1.2/brushes/.
In the dialog "Selection of brushes", use the button "refresh" and your new brush is accessible.

You can now use your brush.
OoOoO
a new animated brush
 

6. Conclusion

Now, you know almost everything about brushes. But for what can that be useful? Here some examples: One can also create brushes to change photographs, to add texture to parts of an image and probably plenty of other uses.

Now, with your brushes!  

References/Links

Note: The tutorials ones on mmmaybe.gimp.org will change URL at the time of the redesign of the www.gimp.org site: mmmaybe.gimp.org will become www.gimp.org.

Webpages maintained by the LinuxFocus Editor team
© Eric Lamarque
"some rights reserved" see linuxfocus.org/license/
http://www.LinuxFocus.org
Translation information:
fr --> -- : Eric Lamarque <eric_lamarque/at/yahoo.fr>
fr --> en: Guido Socher <guidoatlinuxfocus.org>

2005-01-14, generated by lfparser_pdf version 2.51