8. Het GIH dialoogvenster

When your new animated brush is created, it is displayed within the image window and you would like save it into a gih format. You select FileSave as… menu, name your work with the gih extension in the new window relevant field and as soon as you pressed the Save button, the following window is displayed:

Afbeelding 7.18. Het dialoogvenster om een variabel penseel te beschrijven

Het dialoogvenster om een variabel penseel te beschrijven

Dit dialoogvenster verschijnt als u een afbeelding exporteert als Penseelpijp (variabel penseel)


Dit venster heeft diverse opties die niet erg vanzelfsprekend zijn. U kunt er mee vastleggen hoe het penseel zich moet gedragen.

Spatiëring (percentage)

Spatiëring is de afstand tussen twee opeenvolgende afdrukken van het penseel als u ermee werkt. U kunt het werken met penselen in GIMP zien als stempelen met het penseel-patroon. Met een kleine spatiëring komen de stempelafdrukken dicht bij elkaar en gaan ze op een echte lijn lijken. Met een grote spatiëring worden de stempelafdrukken meer afzonderlijk zichtbaar: dat is passend bij een gekleurd penseel (zoals b.v. de paprika green pepper of de druif). De mogelijke waarde varieert van 1 tot 200 en dat getal is het percentage van de doorsnede van het penseel: 100% is precies de hele doorsnede.

Description

Het is de naam van het penseel die het Penselen dialoogvenster zal worden getoond als u het penseel selecteert.

Celgrootte

That is 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.

De verschillende stempelafdrukken die het penseel kan maken noemen we cellen. Een penseel met 6 cellen kan worden getoond als 6 lagen die elk zo groot zijn als een cel.

For instance, we want a 100×100 pixels brush with 8 different aspects. We can take these 8 aspects from a 400×200 pixels layer, or from a 300×300 pixels layer but with one cell unused.

Aantal cellen

Dat is het aantal cellen waar het penseel uit komt te bestaan. Standaard is dat het aantal lagen van de afbeelding.

Tonen als

Dit geeft aan hoe de cellen zullen worden verdeeld over de lagen. Als u b.v. op elke laag van 4 lagen twee cellen naast elkaar hebt staan zal GIMP tonen: 1 rijen van 2 kolommen op elke laag.

Dimensie, Rangen, Selectie

Hier wordt het ingewikkeld. Dit gaat over de verschillende manieren om cellen en lagen te combineren.

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.

Vervolgens zal GIMP die rij cellen verdelen over een rooster met het aantal Dimensies of richtingen dat u instelt.

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

With a 3d array we don't talk rows and columns but Dimensions and Ranks. The first dimension is along x axis, the second dimension along y axis, the third along z axis. Each dimension has ranks of cells.

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.

Besides the rank number that you can give to each dimension, you can also give them a Selection mode. You have several modes that will be applied when drawing:

Incrementeel (Incrementeel)

GIMP selecteert de cellen in deze richting in de volgorde zoals ze zijn opgeslagen.

Random (Willekeurig)

GIMP selecteert de cellen in deze richting willekeurig.

Angular (per richting)

GIMP selecteert de cellen in deze richting afhankelijk van de richting waarin het penseel beweegt.

The first rank is for the direction 0°, upwards. The other ranks are affected, clockwise, to an angle whose value is 360/number of ranks. So, with 4 ranks in the concerned dimension, the angle will move 90° clockwise for each direction change: second rank will be affected to 90° (rightwards), third rank to 180° (downwards) and fourth rank to 270° (-90°) (leftwards).

Velocity, Pressure, x tilt, y tilt

Deze opties zijn voor het werken met een modern tekentablet.

Voorbeelden

Een afbeeldingenpijp van een dimensie

Waar kan dat dan voor dienen? We zullen nog wat voorbeelden laten zien. U kunt echt in iedere dimensie stempels gebruiken die uw penseel een bepaald soort reactie geven.

We beginnen met een 1-dimensionaal penseel, dat ons de kans geeft om de verschillende selectie-manieren te laten zien. U kunt het zich zo voorstellen:

Zo maakt u het:

  1. Select FileNew… from the main menu.

    Set Width and Height for example to 30 pixels.

    In the Advanced Options, set the Color space to RGB color and set Fill with to Transparency.

    Using the Text tool create 4 layers 1, 2, 3, 4. Delete the background layer.

  2. Select FileSave… from the main menu to first save your image as an .xcf file to keep its properties.

    Select FileExport As… from the main menu to export the image as an animated brush with the .gih extension.

    Export the image with a .gbr extension in the brushes directory in your personal GIMP folder. The location of this folder depends on your OS:

    • Linux: /home/gebruiker_naam/.config/GIMP/2.10/

    • macOS: /Users/gebruiker_naam/Library/Application Support/GIMP/2.10/

    • Windows: C:\ Gebruikers\gebruiker_naam\AppData\Roaming\GIMP\2.10\

  3. In the Export Image as Brush Pipe dialog, provide a Description, set the Spacing (percent) to 100, set the Cell size to 30×30, set Dimension to 1, and set Ranks to 4, and the Selection dropdown to incremental. Then click the Export button.

  4. In the Brush Dialog, click on the button Refresh brushes .

    Your brush appears among the other brushes. You can use it immediately, without restarting GIMP.

    Select your brush. Select pencil tool for instance and click and hold with it on a new image:

    U ziet de cijfers 1, 2, 3, 4 elkaar opvolgen.

  5. Take your .xcf image file back and save it as .gih setting the Selection dropdown to random:

    Cijfers worden getekend in een willekeurige volgorde.

  6. Now set the Selection dropdown to angular:

Een Waaierpenseel met 3 dimensies

We geven nu een voorbeeld van een 3 dimensionaal variërend penseel: zijn oriëntatie zal variëren met de richting van schilderen, het zal linker en rechterhanden regelmatig afwisselen en de kleur zal willekeurig wisselen tussen zwart en blauw.

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):

There are 4 ranks in first dimension (x), 2 ranks in second dimension (y) and 2 ranks in third dimension (z). Thus there are 4×2×2 = 16 cells. We need 16 images.

  1. Afbeeldingen creëren voor dimensie 1

    Open a new 30×30 pixels image, RGB with Transparent Fill Type. Using the zoom draw a left hand with fingers upwards.[2] Save it as handL0k.xcf (hand Left 0° Black).

    Open the Layer Dialog. Double click on the layer to open the Layer Attributes Dialog and rename it to handL0k.

    Duplicate the layer. Let visible only the duplicated layer, select it and apply LayerTransformRotate 90° clockwise. Rename it to handL90k.

    Herhaal deze bewerkingen om nog twee lagen te maken: handL180z en handL-90z (of handL270z).

  2. Afbeeldingen creëren voor dimensie 2

    Deze dimensie heeft in ons voorbeeld twee rangen, een voor de linkerhand en een voor de rechter. De linkerhand hebben we inmiddels. We voegen nu de rechterhanden toe door horizontaal spiegelen.

    Duplicate the handL0k layer. Let it visible only and select it. Rename it to handR0K. Apply LayerTransformFlip Horizontally.

    Herhaal deze zelfde operatie voor de andere linkerhanden om de zwarte rechterhanden te maken.

    Re-order layers to have a clockwise rotation from top to bottom, alternating Left and Right: handL0k, handR0k, handL90k, handR90k, …, handR-90k.

  3. Afbeeldingen creëren voor dimensie 3

    Afbeeldingen creëren voor dimensie 3 : De derde dimensie heeft twee rangen, een voor zwart en een voor blauw. De eerste rang is gemaakt, de tweede moet een kopie worden in blauw. Dat levert 16 afbeeldingen op, dat wordt wel veel, dus we maken eerst lagen met twee cellen (handen).

    Select the handL0k layer and let it visible only. Use ImageCanvas Size… to change the canvas size to 60×30 pixels.

    Dupliceer laag handL0z. Maak de kopie blauw door blauw als achtergrondkleur te kiezen en het gereedschap Emmer te gebruiken met de optie AG kleur vullen.

    Selecteer nu gereedschap Verplaatsen. Check in de Gereedschap Opties (dubbelklik zonodig op het gereedschap) dat de optie Verplaatsen is ingesteld op Laag. Verplaats de laag 30 pixels naar rechts, gebruik makend van een hoog Zoom nivo.

    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 60×30 pixels layer with the black hand on the left and the blue hand on the right. Rename it to handsL0.

    Herhaal deze zelfde operatie voor de andere lagen.

  4. Zet de lagen in de goede volgorde

    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.

    De andere manier is visueel. Het verband tussen deze methoden staat in de volgende afbeelding:

    Hoe gebruikt GIMP deze structuur?: GIMP begint met de eerste dimensie, die is ingesteld op angular, dus op de richting van tekenen, b.v. 90°. In deze rang van 90°, geel in de tekening, kiest GIMP voor de tweede dimensie, de afwisseling van L/R, incremental dus opeenvolgend, elke volgende stempel het volgende plaatje. Dan kiest hij in de derde dimensie een kleur, en dat op basis van willekeur. Uiteindelijk moeten onze cellen en lagen dus in de volgende volgorde staan:

  5. Voilà. Your brush is ready. Save it as .xcf first, then export as .gih with the following parameters:

    • Spatiëring: 100

    • Beschrijving: Handen

    • Cell Size: 30×30

    • Aantal cellen: 16

    • Dimensies: 3

      • Dimensie 1: 4 rangen, selectie: Angular

      • Dimensie 2: 2 rangen, selectie: Incremental

      • Dimensie 3: 2 rangen, selectie: Random

    Place your .gih file into the GIMP brush directory and refresh the brush box (see steps above). You can now use your brush.

    Afbeelding 7.19. Hier is het resultaat van het belijnen van een elliptische selectie met het penseel:

    Hier is het resultaat van het belijnen van een elliptische selectie met het penseel:

    Het penseel wisselt telkens linker en rechterhanden af, toont willekeurig een blauwe of een zwarte en de richting komt overeen met de richting van het tekenen op dat punt.




[2] Ok, we are cheating here: our hand is borrowed from https://commons.wikimedia.org/wiki/File:Stop_hand.png.