Online Documentation Server
 ПОИСК
ods.com.ua Web
 КАТЕГОРИИ
Home
Programming
Net technology
Unixes
Security
RFC, HOWTO
Web technology
Data bases
Other docs

 


 ПОДПИСКА

 О КОПИРАЙТАХ
Вся предоставленная на этом сервере информация собрана нами из разных источников. Если Вам кажется, что публикация каких-то документов нарушает чьи-либо авторские права, сообщите нам об этом.




[Top] [Prev] [Next] [Bottom]



Brushes, Gradients, Palettes and Patterns


In this chapter will we discuss how to create and use the above.

Brushes

In the brushes dialog, accessible from the Toolbox file menu or root menu dialogs, you will see all the brushes you can use in your Gimping sessions. You may notice that there are some strange brushes, like text, little figures and so on. These brushes are not very difficult to make yourself, if you are a bit artistic. This is what we will discuss in this section, but first a bit about the Brush dialog.

If you select a brush you will se it's name and size in pixels. In the Modes drop down menu, you can select what kind of mode your brush will use, more about this in chapter X. If you can't see the whole brush, you can pan it by grabbing it with your left mouse button. In the Opacity slider can you set the opacity. A value of 100 will produce total opacity and you will paint solid, value of 0 gives you total transparancy, so you can't see what you paint. The spacing is the distance between your brush marks. If you set the spacing to zero you will get a distance of zero between the marks of your brush - i.e. a fluent line. Let's test the finger brush and set the spacing to 150. You will get lots of fingers with some space between them, but you can still see that they are fingers, if you had set the spacing to zero you wouldn't have. You will normally use low values of spacing when you paint with ordinary brushes, but when you paint with special brushes can it be useful to with a bit of spacing.

How to make a brush: A general tip on how to make a brush is to make it real big and then resize it to the size that you want your brush to be. Let's make one. Create a new grayscale image, the default values will be fine, and make the background white. Now, pick up a pencil and draw an X over the image frame. Invert the image by applying root > image > map > invert. Rescale it to say, 20x20 root > image > resize. Save the image as xxx.gbr. In the Gbr save dialog, set the default spacing to 15 and call your brush Olof. Move the xxx.gbr to your .gimp/brushes directory. Open the brush dialog and press refresh. The new brush will now appear in your Brush Selection dialog under Olof (20x20).

The thing with brush creating is that solid black (before inverting) makes your brush look hard, if you use a gray color it'll look softer. The same goes for if you create a brush with a soft brush (with lots of blur) the new brush also will get soft. So keep on experimenting with different kinds of brushes and creating them with or without blur, soft edges and so forth.

How to make a pattern.

Patterns are a nice thing that you can use to fill selections or backgrounds with. GIMP comes with many patterns and you can also find nice patterns at GIMP-peoples home pages. If you can't see the whole pattern in the preview, just grab it with your left mouse button and pan around. To use patterns to you have to select one in the Pattern Select dialog. The name of the selected pattern is typed in the upper left corner and you can browse the different patterns by clicking on them (selecting). To use your selected patterh, you have to bring up the Fill tool option dialog. Do so by double clicking on the Fill tool icon. In this dialog you have to select "Pattern Fill". Now you can fill with your selected pattern. You can also paint with patterns, using the Clone tool, but you can't use patterns with any other tools. (Here was supposed to be a picture of the pattern select dialog, but Frame maker bugged out when I tried to import it)

To make your own pattern, just open a new RGB image and paint your pattern (or take a nice pattern and change it, system patterns is in /usr/local/share/gimp/patterns). Then Resize the image to the size of the pattern you want to create. Save the image as pat file and in the save option dialog name your pattern whatever you like. Move the pat file to .gimp/patterns (mv test.pat .gimp/patterns) and in the pattern select dialog, press Refresh and your newly created pattern will be available. Go on, experiment and make different patterns. Remember if you create a large pattern that it's only the top left corner that will show up in the pattern dialog, so you may have to pan to see it.

The great thing about patterns is that you can use them as a texture when you paint in GIMP. To do so you will have to learn about Channels and Modes in chapter X.

Palettes

In the palette dialog, you can create a new palette in the Ops dropdown menu. In the same menu can you also merge and delete palettes. When you make a new palette you will start out with a black palette with no color in it. You also have to name it. A tip is to name it to something that describes what your palette is about.

When you press "New" to get a new color into your palette, the color is always visible as foreground color in the color icon in the toolboox. You can edit a color in your palette by selecting it and pressing "Edit". This will bring up the Color Selection dialog, see chapter X. You can delete a color by selecting it and pressing Delete.

As soon as you edit a System wide palette, it will end up in your personal palette dicerctory. If you delete a palette and it is a system wide, it will not be deleted, only accnowledged that you don't want to use it in this session. But if you delete a personal palette, it will be gone for ever. This behavior is good because if you have a lot of palettes, all of them will not show up because the drop down menu will use 3 screens or so, and you can only view one. (Maybe a thing to do something about). If you have a ot of palettes it also takes some time before they will be diplayed in the dropdown menu so be patient when you have pressed it.

A tip is to use palettes when you are creating images where you want a fix number of color. An example; if you are creating icons. Say that your screen depth is only 8bit (256) colors, and you don't want your icon's to take them all. If your icon manager reduces the number of colors it may look awful. So, what wou want to do is to create a palette with say, 50 basic colors to use whencreating your icons. There are of course many more fields of applications where you can use palettes.

The format of the palette is like the format of the rgb.txt file deliver in your X window system. First comes the number values of the color, say, 255 134 56 and then the name <name>. This makes it possible to edit palettes in an ordinary text editor.

Gradients

When you discuss gradients you may think about the gradient "fill" tool, which lets you "fill" a selection or image starting from one color and smoothly transites to another color. GIMP lets you do even more powerful things with a tool called Gradient editor. In this editor can you decide what your gradient will look like, and what colors will be used in it. To use it you have to select "Custom from editor" in the Blend drop down menu in the Gradient tool option dialog (just double click in the gradient tool icon).

The gradient editor is a highly flexible tool in which you can create nearly every possible gradient you could think of. Let's take a look at the user interface and explain it. The first thing you'll see when you bring up the dialog is the main view. The gradient is in the bottom and there is a selection browser for different gradients. To the right there are some buttons that lets you save and copy etc. Pressing the right mouse button in the gradient brings up a menu with editing tools for your gradient.

So what can you do with it? Hmm! Let's start by copying a gradient and play around with it to see what you can do. Select a gradient, choose copy, and remember that undo is disabled in the gradient editor. (if you edit a system wide gradient, it will end up in your personal gradient directory, just like the behavior of brushes and palettes). This brings up the naming dialog (New will bring up the same dialog), name it and off we go. The triangles at the bottom are color section markings. There are two kinds of markings; end points are black and middle points are white. A section exists between two black points. As you see, I have marked a section by clicking on the section, which turns gray. Now, if you drag the midpoint it will move the breaching point towards one of the end colors. Dragging at the end points (not the ones to the extreme left or right since you can't move them) will make the section wider or smaller. You can move the whole section by clicking in the gray field and drag. If you press an end point and press Shift and drag you will de-/compress the section. You can also extend a section by Shift - click on another section. You can use the same manipulations on an extended section as you can on a normal section.

As mentioned above, if you press your right mouse button in the gradient, it will popup a menu.

in which you can edit the colors in a selected section. You can edit both end points by selecting "Left/Right endpoint's color". This will bring up a color edit dialog (see chapter X) in which you can select a new endpoint color.

You can also load and save your end point color to/from an "alpha channel" in the Load from, or Save to menu

. You will find that you can load some nice basic colors and a transparant background. The saving menu is quite useful if you want to use your end color in another part of the gradient.

The "Split segment midpoint/uniform" will do some splitting to your selection. "Midpoint" creates a duplicate and places it beside the (shrunken)original. Both of the segments will be half the size of the original. "Uniform" lets you decide how many splits you want to make in your (gray) selection. If you have selected more than one section "Split" will not split all of the selection as a unit, instead it will treat each selected segment separately.

"Delete segment" lets you delete your entire selection, not just the segment you are pressing your right mouse button in. "Re-center segment's midpoint" will re-center your midpoint in the selected segments. "Re-distribute handles in segment" is good if you have played around with the points/handles in a segment or selection, it restores them to their original positions(undo!).

In the "Blending ..." submenu you will find

some Modes that control how the gradient in your selection behaves. Linear is straightforward (and the default). It will let your color change in a straight direction from one endpoint to another. "Curved" causes the end section's colors to change in a different "speed" over a middle section. You can think of it as a semi circle. The color change will appear to happen fast in the ends of the half circle and slower in the middle. A Sinusoidal acts the other way around. Slow in the beginning and fast in the middle. The Spherical inc will let the transition happen fast at the left and slow at the right. Spherical dec is just the opposite of inc, slow leftside and fast right side.

The coloring submenu will let you choose a color model of your selection or segment. There are Plain RGB and two kinds of HSV. You will have to look in chapter X to learn about different color models.

Flip lets you flip a segment or selection. This can be quite handy if you want to change the order of two segments. This is how. First select two segments and flip both. Deselect one of them and flip the selected one. Select the other one and flip it. Now you have changed the order of your segments. This can be done to more than two segments of course and gives you the freedom to change you gradients structure.

Replicate makes a copy of your segment or selection to X copies by the Replicate dialog. "Blend endpoint's colors" will only work if you have selected more than one segment. It will blend the end points of your selections and it will also "merge" your selections so it will "gradient" form one end point to the other one. Blend end points opacity? Give me a hint about this one please.

You can also save a gradient in POV-ray format "Save as POV-Ray" nice for POV-raying people. If you have downloaded a gradient from internet and placed it in .gimp/gradient you will have to press refresh to see it and use it. Every edited system wide gradient will end up in your personal gradient directory. So if you want your system wide gradient back, just delete or move it from your personal directory. If you delete a system wide gradient you just mean that you don't want to use it in this session. But if you delete a personal gradient it will be gone forever.

Gradients can be very versatile. You can use them in advanced fountain fills or patterns, but you can also create object-like things with them, like an eyeball, a hole or a pipe etc. You will have to experiment by yourself.



[Top] [Prev] [Next] [Bottom]

karin@frozenriver.ale.se
Copyright © 1997, Karin Kylander


With any suggestions or questions please feel free to contact us