File: ch02s04s08.html

package info (click to toggle)
gimp-help 2%2B0.7-5
  • links: PTS
  • area: main
  • in suites: sarge
  • size: 30,852 kB
  • ctags: 4
  • sloc: xml: 104,248; sh: 544; makefile: 262; perl: 42
file content (768 lines) | stat: -rw-r--r-- 34,507 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
    <title>4.8. Brushes</title>
    <link rel="stylesheet" href="gimp-help-plain.css" type="text/css" />
    <link rel="stylesheet" href="gimp-help-screen.css" type="text/css" />
    <meta name="generator" content="DocBook XSL Stylesheets V1.66.1" />
    <link rel="start" href="index.html" title="&#10;      &#10;    " />
    <link rel="up" href="ch02s04.html" title="4. Working with Images" />
    <link rel="prev" href="ch02s04s07.html" title="4.7. Paths" />
    <link rel="next" href="ch02s04s09.html" title="4.9. Gradients" />
  </head>
  <body>
    <div xmlns="" class="navheader">
      <table width="100%" summary="Navigation header">
        <tr>
          <th colspan="3" align="center" id="chaptername">4.8. Brushes</th>
        </tr>
        <tr>
          <td width="20%" align="left"><a accesskey="p" href="ch02s04s07.html">Prev</a> </td>
          <th width="60%" align="center" id="sectionname">4.8. Brushes</th>
          <td width="20%" align="right"> <a accesskey="n" href="ch02s04s09.html">Next</a></td>
        </tr>
      </table>
      <hr />
    </div>
    <div class="sect2" lang="en" xml:lang="en">
      <div class="titlepage">
        <div>
          <div>
            <h3 class="title"><a id="gimp-brushes"></a>4.8. Brushes</h3>
          </div>
        </div>
      </div>
      <a id="id3310507" class="indexterm"></a>
      <div class="informalfigure">
        <div class="mediaobject">
          <img src="../images/using/brush-examples.png" />
          <div class="caption">
            <p>
           A number of examples of brushstrokes painted using different
           brushes from the set supplied with GIMP.  All were painted
           using the Paintbrush tool.
        </p>
          </div>
        </div>
      </div>
      <p>
    A <span class="emphasis"><em>brush</em></span> is a pixmap or set of pixmaps used for
    painting.  GIMP includes a set of 10 "paint tools, which not
    only perform operations that you would think of as painting, but
    also operations such as erasing, copying, smudging, lightening or
    darkening, etc.  All of the paint tools, except the ink tool, use
    the same set of brushes.  The brush pixmaps represent the
    marks that are made by single "touches" of the brush to the image. 
    A brush stroke, usually made by moving the pointer across the image with 
    the mouse button held down, produces a series of marks spaced along the
    trajectory, in a way specified by the characteristics of the brush
    and the paint tool being used.
  </p>
      <p>
    Brushes can be selected by clicking on an icon in the <a href="ch04s10.html" title="10. Brushes dialog">Brushes dialog</a>.  GIMP's
    <span class="emphasis"><em>current brush</em></span> is shown in the
    Brush/Pattern/Gradient area of the Toolbox.  Clicking on the brush
    symbol there is one way of activating the Brushes dialog.
  </p>
      <p>
    When you install GIMP, it comes presupplied with a number of basic
    brushes, plus a few bizarre ones that serve mainly to give you
    examples of what is possible (i. e., the "green pepper" brush in
    the illustration).  You can also create new brushes, or
    download them and install them so that GIMP will recognize them.
  </p>
      <p>
    GIMP can use several different types of brushes.  All of them,
    however, are used in the same way, and for most purposes you don't
    need to be aware of the differences when you paint with them.
    Here are the available types of brushes:
  </p>
      <div class="variablelist">
        <dl>
          <dt>
            <span class="term">Ordinary brushes</span>
          </dt>
          <dd>
            <p>
          Most of the brushes supplied with GIMP fall into this
          category.  They are represented in the Brushes dialog by
          grayscale pixmaps.  When you paint using them, the current
          foreground color (as shown in the Color Area of the Toolbox)
          is substituted for black, and the pixmap shown in the brushes
          dialog represents the mark that the brush makes on the image.
        </p>
            <p>
          To create such a brush: 
          Create a small image in gray levels using zoom. Save it with the 
          .gbr extension. Click on Refresh button in the Brush Dialog to get 
          it in preview without it being necessary to restart GIMP.
        </p>
          </dd>
          <dt>
            <span class="term">Color brushes</span>
          </dt>
          <dd>
            <p>
          Brushes in this category are represented by colored images in
          the Brushes dialog. They can be a text. When you paint with them, 
          the colors are used as shown; the current foreground color does 
          not come into play.  Otherwise they work the same way as ordinary 
          brushes.
        </p>
            <p>
          To create such a brush, create a small RGBA image. For this, open 
          New Image, select RGB for image type and Transparent for fill type. 
          Draw your image and save it first to .xcf file to keep its 
          properties. Then save it to .gbr format. Click on 
          <span class="emphasis"><em>Refresh</em></span> button in Brush Dialog to get your 
          brush without it being necessary to restart Gimp.
        </p>
            <div class="tip" style="margin-left: 0.5in; margin-right: 0.5in;">
              <table border="0" summary="Tip">
                <tr>
                  <td rowspan="2" align="center" valign="top" width="25">
                    <img alt="[Tip]" src="../images/tip.png" />
                  </td>
                  <th align="left">Tip</th>
                </tr>
                <tr>
                  <td colspan="2" align="left" valign="top">
                    <p>
            You can transform a selection to a brush by using the 
            Selection/To Brush script-fu.
          </p>
                  </td>
                </tr>
              </table>
            </div>
          </dd>
          <dt>
            <span class="term">Image hoses / Image pipes</span>
          </dt>
          <dd>
            <p>
          Brushes in this category can make more than one kind of mark
          on an image.  They are indicated by small red triangles at th
          lower right corner of the brush symbol in the Brushes dialog.
          They are sometimes called "animated brushes" 
          because the marks change as you trace out a brushstroke. In
          principle, image hose brushes can be very sophisticated,
          especially if you use a tablet, changing shape as a function
          of pressure, angle, etc.  These possibilities have never
          really been exploited, however; and the ones supplied with
          GIMP are relatively simple (but still quite useful). 
        </p>
          </dd>
          <dt>
            <span class="term">Parametric brushes</span>
          </dt>
          <dd>
            <p> 
          These are brushes created using the <a href="ch04s10.html#gimp-brush-editor-dialog" title="Brush Editor">Brush Editor</a>, which
          allows you to generate a wide variety of brush shapes by
          using a simple graphical interface.  A nice feature of
          parametric brushes is that they are
          <span class="emphasis"><em>resizable</em></span>.  In GIMP 2.2, it is possible,
          using the Preferences dialog, to make key presses or mouse
          wheel rotations cause the current brush to become larger or
          smaller, if it is a parametric brush.
        </p>
          </dd>
        </dl>
      </div>
      <p>
    One category that GIMP does not have is full-fledged
    <span class="emphasis"><em>procedural</em></span> brushes:  brushes whose marks are
    calculated procedurally, instead of being taken from a fixed
    pixmap.  (Actually this is not quite correct:  the Ink tool uses a
    procedural brush, but it is the only one available in GIMP.)  A
    more extensive implementation of procedural brushes is a goal of
    future development for GIMP.
  </p>
      <p>
    In addition to the brush pixmap, each GIMP brush has one other
    important property:  the brush <span class="emphasis"><em>Spacing</em></span>. This
    represents the distance between consecutive brush-marks when a
    continuous brushstroke is painted.  Each brush has an assigned
    default value for this, which can be modified using the Brushes
    dialog. 
  </p>
      <div class="simplesect" lang="en" xml:lang="en">
        <div class="titlepage">
          <div>
            <div>
              <h4 class="title"><a id="id3310476"></a>Adding New Brushes</h4>
            </div>
          </div>
        </div>
        <p>        
      To add a new brush, after either creating it or downloading it, so 
      that it shows up in the Brushes dialog, you need to save it in a 
      format GIMP can use, in a folder included in GIMP's brush search path, 
      then to <span class="emphasis"><em>Refresh</em></span> the Brush Dialog (or re-start 
      GIMP). GIMP uses three file formats for brushes: 
    </p>
        <div class="variablelist">
          <dl>
            <dt>
              <span class="term">GBR</span>
            </dt>
            <dd>
              <p>
            The <tt class="filename">.gbr</tt> ("<span class="emphasis"><em>g</em></span>imp
            <span class="emphasis"><em>br</em></span>ush") format is used for ordinary and
            color brushes.  You can convert many other types of images,
            including many brushes used by other programs, into GIMP
            brushes by opening them in GIMP and saving them with file
            names ending in <tt class="filename">.gbr</tt>.  This brings up a
            dialog box in which you can set the default Spacing for the
            brush.  A more complete description of the GBR file format
            can be found in the file <tt class="filename">gbr.txt</tt> in the
            <tt class="filename">devel-docs</tt> directory of the GIMP source
            distribution. 
          </p>
            </dd>
            <dt>
              <span class="term">GIH</span>
            </dt>
            <dd>
              <p>         
            The <tt class="filename">.gih</tt> ("<span class="emphasis"><em>g</em></span>imp
            <span class="emphasis"><em>i</em></span>mage <span class="emphasis"><em>h</em></span>ose")
            format is used for animated brushes.  These brushes are
            constructed from images containing multiple layers:  each
            layer may contain multiple brush-shapes, arranged in a
            grid.  When you save an image as a <tt class="filename">.gih</tt>
            file, a dialog comes up that allows you to describe the
            format of the brush.  The GIH format is rather complicated:
            a complete description can be found in the
            file <tt class="filename">gih.txt</tt> in the 
            <tt class="filename">devel-docs</tt> directory of the GIMP source
            distribution. See
            <a href="ch02s04s08.html#gimp-GIH-dialog" title="The GIH dialog box">The GIH dialog box</a> 
          </p>
            </dd>
            <dt>
              <span class="term">VBR</span>
            </dt>
            <dd>
              <p>
            The <tt class="filename">.vbr</tt> format is used for parametric
            brushes, i. e., brushes created using the Brush Editor.
            There is really no other meaningful way of obtaining files
            in this format.
          </p>
            </dd>
          </dl>
        </div>
        <p>
      To make a brush available, place it in one of the folders in
      GIMP's brush search path. By default, the brush search path
      includes two folders, the system <tt class="filename">brushes</tt>
      folder, which you should not use or alter, and the
      <tt class="filename">brushes</tt> folder inside your personal GIMP
      directory.  You can add new folders to the brush search path
      using the <a href="ch04s18s16.html" title="18.16. Data Folders">Brush
      Folders</a> page of the Preferences dialog.  Any GBR, GIH, or
      VBR file included in a folder in the brush search path will show
      up in the Brushes dialog the next time you start GIMP, or as soon
      as you press the Refresh button in the Brushes dialog.
    </p>
        <div class="note" style="margin-left: 0.5in; margin-right: 0.5in;">
          <table border="0" summary="Note">
            <tr>
              <td rowspan="2" align="center" valign="top" width="25">
                <img alt="[Note]" src="../images/note.png" />
              </td>
              <th align="left">Note</th>
            </tr>
            <tr>
              <td colspan="2" align="left" valign="top">
                <p>
        When you create a new parametric brush using the Brush Editor, it
        is automatically saved in your personal
        <tt class="filename">brushes</tt> folder.
      </p>
              </td>
            </tr>
          </table>
        </div>
        <p>
      There are a number of web sites with downloadable collections of
      GIMP brushes.  Rather than supplying a list of links that will
      soon be out of date, the best advice is to do a Google search for
      "Gimp brushes".  There are also many collections of brushes for
      other programs with painting functionality.  Some can be converted
      easily into GIMP brushes, some require special conversion
      utilities, and some cannot be converted at all.  Most fancy
      procedural brush types fall into the last category.  If you need
      to know, look around on the web, and if you don't find anything,
      look for an expert to ask. 
    </p>
      </div>
      <div class="simplesect" lang="en" xml:lang="en">
        <div class="titlepage">
          <div>
            <div>
              <h4 class="title"><a id="gimp-GIH-dialog"></a>The GIH dialog box</h4>
            </div>
          </div>
        </div>
        <p>
      This dialog box has several options not easy to understand. They 
      allow you to determine the way your brush is animated. 
    </p>
        <div class="variablelist">
          <dl>
            <dt>
              <span class="term">Spacing (Percent)</span>
            </dt>
            <dd>
              <p>
            "Spacing" is the distance between consecutive brush marks when you 
            trace out a brushstroke with the pointer. You must consider 
            drawing with a brush, whatever the paint tool, like stamping. If 
            Spacing is low, stamps will be very close and stroke look 
            continuous. If spacing is high, stamps will be separated: that's 
            interesting with a color brush (like "green pepper" for instance).
            Value varies from 1 to 200 and this percentage refers to brush 
            "diameter": 100% is one diameter.
          </p>
            </dd>
            <dt>
              <span class="term">Description</span>
            </dt>
            <dd>
              <p>
            It's the brush name that will appear at the top of Brush Dialog 
            (grid mode) when the brush is selected.
          </p>
            </dd>
            <dt>
              <span class="term">Cell Size</span>
            </dt>
            <dd>
              <p>
            That's size of cells you will cut up in layers... Default 
            is one cell per layer and size is that of the layer. Then there is 
            only one brush aspect per layer
          </p>
              <p>
            We could have only one big layer and cut up in it the cells that 
            will be used for the different aspects of the animated brush.
          </p>
              <p>
            For instance, we want a 100x100 pixels brush with 8 different 
            aspects. We can take these 8 aspects from a 400x200 pixels layer, or 
            from a 300x300 pixels layer but with one cell unused.
          </p>
            </dd>
            <dt>
              <span class="term">Number of cells</span>
            </dt>
            <dd>
              <p>
            That's the number of cells (one cell per aspect) that will be cut in 
            every layer. Default is the number of layers as there is only one 
            layer per aspect. 
          </p>
            </dd>
            <dt>
              <span class="term">Display as:</span>
            </dt>
            <dd>
              <p>
            This tells how cells have been arranged in layers. If, for example, 
            you have placed height cells at the rate of two cells per layer on 
            four layers, GIMP will display: "1 rows of 2 columns on each layer".
          </p>
            </dd>
            <dt>
              <span class="term">Dimension, Ranks, Selection</span>
            </dt>
            <dd>
              <p>
            There things are getting complicated! Explanations are necessary to 
            understand how to arrange cell and layers.
          </p>
              <p>
            GIMP starts retrieving cells from each layer and stacks them into a 
            FIFO stack (First In First Out: the first in is at the top of the 
            stack and so can be first out). In our example 4 layers with 2 cells 
            in each, we'll have, from top to bottom: first cell of first layer, 
            second cell of first layer, first cell of second layer, second cell 
            of second layer..., second cell of fourth layer. With one cell per 
            layer or with several cells per layer, result is the same. You can 
            see this stack in the Layer Dialog of the resulting .gih image file.
            </p>
              <p>
            Then GIMP creates a computer array from this stack with the 
            <span class="guilabel">Dimensions</span> you have set. You can use four 
            dimensions.  
          </p>
              <p>
            In computer science an array has a "myarray(x,y,z)" form for a 3 
            dimensions array (3D). It's easy to imagine a 2D array: on a paper 
            it's an array with rows and columns
            </p>
              <div class="mediaobject">
                <img src="../images/using/array2D.png" />
              </div>
              <p>
            With a 3d array we don't talk rows and columns but 
            <span class="guilabel">Dimensions</span> and <span class="guilabel">Ranks</span>. The 
            first dimension is along x axis, the second dimension along y axis, 
            the third along z axis. Each dimension has ranks of cells. 
            </p>
              <div class="mediaobject">
                <img src="../images/using/array3D.png" />
              </div>
              <p>
          </p>
              <p>
            To fill up this array, GIMP starts retrieving cells from the top of 
            stack. The way it fills the array reminds that of an odometer: right 
            rank digits turn first and, when they reach their maximum, left rank 
            digits start running. If you have some memories of Basic programming 
            you will have, with an array(4,2,2), the following succession:
            (1,1,1),(1,1,2),(1,2,1),(1,2,2),(2,1,1),(2,1,2),(2,2,2),(3,1,1)....
            (4,2,2). We will see this later in an example.
          </p>
              <p> 
            Besides the rank number that you can give to each dimension, you can 
            also give them a <span class="guilabel">Selection</span> mode. You have 
            several modes that will be applyed when drawing:
            </p>
              <div class="itemizedlist">
                <ul type="disc">
                  <li>
                    <p>
                  <span class="emphasis"><em>Incremental</em></span>: GIMP selects a rank from the 
                  concerned dimension according to the order ranks have in that 
                  dimension
                </p>
                  </li>
                  <li>
                    <p>
                  <span class="emphasis"><em>Random</em></span>: GIMP selects a rank at random 
                  from the concerned dimension.
                </p>
                  </li>
                  <li>
                    <p>
                  <span class="emphasis"><em>Angular</em></span>: GIMP selects a rank in the 
                  concerned dimension according to the moving angle of the brush.
                </p>
                    <p>
                  The first rank is for the direction 0°, upwards. The other 
                  ranks are affected, counter clockwise, to an angle whose value 
                  is 360/number of ranks. So, with 4 ranks in the concerned 
                  dimension, the angle will move 90° counterclockwise for each 
                  direction change: second rank will be affected to 270° (-90°) 
                  (leftwards), third rank to 180° (downwards) and fourth rank to 
                  90° (rightwards).
                </p>
                  </li>
                  <li>
                    <p>
                  <span class="emphasis"><em>Speed</em></span>,
                  <span class="emphasis"><em>Pressure</em></span>,
                  <span class="emphasis"><em>x tilt</em></span> and 
                  <span class="emphasis"><em>y tilt</em></span> are options for sophisticated 
                  drawing tablets.
               </p>
                  </li>
                </ul>
              </div>
              <p>
          </p>
            </dd>
          </dl>
        </div>
        <div class="variablelist">
          <p class="title">
            <b>Examples</b>
          </p>
          <dl>
            <dt>
              <span class="term">A one dimension image pipe</span>
            </dt>
            <dd>
              <p>
            Well! What is all this useful for? We'll see that gradually with 
            examples. You can actually place in each dimension cases that will 
            give your brush a particular action.   
          </p>
              <p>
            Let us start with a 1D brush which will allow us to study selection 
            modes action. We can imagine it like this:
            </p>
              <div class="mediaobject">
                <img src="../images/using/array1D.png" />
              </div>
              <p>
            Follow these steps:
            </p>
              <div class="orderedlist">
                <ol type="1">
                  <li>
                    <p>
                  Open a new 30x30 pixels image, RGB with Transparent fill type. 
                  Using the Text tool create 4 layers "1", "2", "3", "4". Delete 
                  the "background" layer.
                </p>
                  </li>
                  <li>
                    <p>
                  Save this image first with .xcf extension to keep its 
                  properties then save it as .gih.
                </p>
                    <p>
                  The Save As Dialog is opened: select a destination for your 
                  image. OK. The GIH dialog is opened:
                  Choose Spacing 100, give a name in Description box, 30x30 for 
                  Cell Size, 1 dimension, 1 rank and choose "Incremental" in 
                  Selection box. OK.
                </p>
                    <p>
                  You may have difficulties to save directly in the GIMP Brush 
                  directory. In that case, save the .gih file manually into the 
                  /usr/share/gimp/gimp 2.0/brushes directory. Then come back 
                  into the Toolbox, clic on the brush icon to open the Brush 
                  Dialog then click on "Refresh". Your new brush appears in the 
                  Brush window. Select it. Select pencil tool for instance and 
                  click and hold with it on a new image
                  </p>
                    <div class="mediaobject">
                      <img src="../images/using/1234incr.png" />
                    </div>
                    <p>
                  You see 1, 2, 3, 4 digits following one another in order.
                </p>
                    <p> 
                  Take your .xcf image file back and save it as .gih setting 
                  Selection to "Random": digits will be displayed at random 
                  order:
                  </p>
                    <div class="mediaobject">
                      <img src="../images/using/1234rand.png" />
                    </div>
                    <p>
                </p>
                    <p> 
                  Now select "Angular" Selection:
                  </p>
                    <div class="mediaobject">
                      <img src="../images/using/1234angl.png" />
                    </div>
                    <p>
                </p>
                  </li>
                </ol>
              </div>
              <p>  
  
          </p>
            </dd>
            <dt>
              <span class="term">A 3 dimensions image hose</span>
            </dt>
            <dd>
              <p>
            We are now going to create a 3D animated brush: its orientation will 
            vary according to brush direction, it will alternate Left/Right 
            hands regularly and its color will vary at random between black and 
            blue. 
          </p>
              <p>
            The first question we have to answer to is the number of images that 
            is necessary. We reserve the first dimension (x) to the brush 
            direction (4 directions). The second dimension (y) is for Left/Right 
            alternation and the third dimension (z) for color variation. Such a 
            brush is represented in a 3D array "myarray(4,2,2)": 
            </p>
              <div class="mediaobject">
                <img src="../images/using/3Dnum.png" />
              </div>
              <p>
            There are 4 ranks in first dimension (x), 2 ranks in second 
            dimension (y) and 2 ranks in third dimension (z). We see that there 
            are 4x2x2 = 16 cells. We need 16 images.
          </p>
              <div class="orderedlist">
                <ol type="1">
                  <li>
                    <p>
                <span class="emphasis"><em>Creating images of dimension 1 (x)</em></span>: 
                Open a new 30x30 pixels image, RGB with Transparent Fill Type. 
                Using the zoom draw a left hand with fingers upwards. Save it as 
                handL0k.xcf (hand Left O° Black).
              </p>
                    <p>
                Open the Layer Dialog. Double click on the layer to open the 
                Layer Attributes Dialog and rename it to handL0k.
              </p>
                    <p>
                Duplicate the layer. Let visible only the duplicated layer, 
                select it and apply a 90° rotation (Layer/Transform/ 90° 
                rotation counter-clockwise). Rename it to handL-90k.
              </p>
                    <p>
                Repeat the same operations to create handL180k and handL90k.
              </p>
                  </li>
                  <li>
                    <p>
                <span class="emphasis"><em>Creating images of dimension 2 (y)</em></span>:
                This dimension in our example has two ranks, one for left hand 
                and the other for right hand. The left hand rank exists yet. We 
                shall build right hand images by flipping it horisontally.
              </p>
                    <p>
                Duplicate the handL0k layer. Let it visible only and select it. 
                Rename it to handR0K. Apply Layer/Transform/Flip Horizontally.
              </p>
                    <p>
                Repeat the same operation on the other left hand layers to 
                create their right hand equivalent.
              </p>
                    <p>
                Re-order layers to have a counter-clockwise rotation from top to 
                bottom, alternating Left and Right: handL0k, handR0k, handL-90k,
                handR-90k, ..., handR90k.
              </p>
                  </li>
                  <li>
                    <p>
                <span class="emphasis"><em>Creating images of dimension 3 (z)</em></span>:
                The third dimension has two ranks, one for black color and the 
                other for blue color. The first rank, black, exists yet. We well 
                see that images of dimension 3 will be a copy, in blue, of the 
                images of dimension 2. So we will have our 16 images. But a row 
                of 16 layers is not easy to manage: we will use layers with two 
                images.
              </p>
                    <p>
                Select the handL0k layer and let it visible only. Using 
                Image/Canvas Size change canvas size to 60x30 pixels.
              </p>
                    <p>
                Duplicate hand0k layer. On the copy, fill the hand with blue 
                using Bucket Fill tool.
              </p>
                    <p>
                Now, select the Move tool. Double click on it to accede to its 
                properties: check "Move the Current Layer" option. Move the blue 
                hand into the right part of the layer precisely with the help of 
                Zoom.
              </p>
                    <p>
                Make sure only handL0k and its blue copy are visible. Right click 
                on the Layer Dialog: Apply the "Merge Visible Layers" command 
                with the option "Expand as Necessary". You get a 60x30 pixels 
                layer with the black hand on the left and the blue hand on the 
                right. Rename it to "handL0".
              </p>
                    <p>
                Repeat the same operations on the other layers.
              </p>
                  </li>
                  <li>
                    <p>
                <span class="emphasis"><em>Set layers in order</em></span>: Layers must be set in 
                order so that GIMP can find the required image at some point 
                of using the brush. Our layers are yet in order but we must 
                understand more generally how to have them in order.There are 
                two ways to imagine this setting in order. The first method is 
                mathematical: GIMP divides the 16 layers first by 4; that gives 
                4 groups of 4 layers for the first dimension. Each group 
                represents a direction of the brush. Then, it divides each group 
                by 2; that gives 8 groups of 2 layers for the second dimension: 
                each group represents a L/R alternation. Then another division 
                by 2 for the third dimension to represent a color at random 
                between black and blue.
              </p>
                    <p>
                The other method is visual, by using the array representation. 
                Correlation between two methods is represented in next image:
                </p>
                    <div class="mediaobject">
                      <img src="../images/using/correlation-en.png" />
                    </div>
                    <p>
              </p>
                  </li>
                  <li>
                    <p>
                Voilà. Your brush is ready. Save it as .xcf first then as .gih 
                with the following parameters:
                Spacing:100    Description:Hands      Cell Size: 30x30
                Number of cells:16    Dimensions: 3
                </p>
                    <div class="itemizedlist">
                      <ul type="disc">
                        <li>
                          <p> 
                    Dimension 1: 4 ranks  Selection: Angular
                    </p>
                        </li>
                        <li>
                          <p>
                    Dimension 2: 2 ranks  Selection: Incremental
                    </p>
                        </li>
                        <li>
                          <p>
                    Dimension 3: 2 ranks  Sélection: Random
                    </p>
                        </li>
                      </ul>
                    </div>
                    <p>
              </p>
                    <p>
                Place your .gih file into GIMP brush directory and refresh the 
                brush box. You can now use your brush. Unfortunately GIMP 2.0 is 
                bug-ridden and you may have some difficulties with brush 
                orientation.
              </p>
                    <p>
                Here is the result by stroking an elliptical selection with the 
                brush: 
                </p>
                    <div class="mediaobject">
                      <img src="../images/using/hands_stroke.png" />
                    </div>
                    <p>
              </p>
                  </li>
                </ol>
              </div>
            </dd>
          </dl>
        </div>
      </div>
    </div>
    <div class="navfooter">
      <hr />
      <table width="100%" summary="Navigation footer">
        <tr>
          <td width="40%" align="left"><a accesskey="p" href="ch02s04s07.html">Prev</a> </td>
          <td width="20%" align="center">
            <a accesskey="u" href="ch02s04.html">Up</a>
          </td>
          <td width="40%" align="right"> <a accesskey="n" href="ch02s04s09.html">Next</a></td>
        </tr>
        <tr>
          <td width="40%" align="left" valign="top">4.7. Paths </td>
          <td width="20%" align="center">
            <a accesskey="h" href="index.html">Home</a>
          </td>
          <td width="40%" align="right" valign="top"> 4.9. Gradients</td>
        </tr>
      </table>
    </div>
  </body>
</html>