Join Date: Feb 2010
Location: United Kingdom Gender: Male
CREATING A SMOOTH BORDER
- 2.1 Now, your font is properly spaced. We can now get to work creating the border. Click in the foreground colour pallete, and set the colour to magenta (R 255 G 0 B 255, or ff00ff in HTML).
- 2.2 Next, create a new layer exactly as we did before in 1.3.
- 2.3 You should now have an image that is completely magenta. If you don't, then use the green arrows to move the magenta layer to the top of the layer stack. Moving on, right click your new magenta layer in the layer stack and select “Add Layer Mask”.
A mask affects the opacity of a layer. The whiter an area on a mask, the more opaque it is. For example, if you had two layers: one white, underneath, and one blue. A mask on the blue layer, made of a white background and black squiggles, would look as if clouds were appearing on the blue, but really, you are making “invisible” some areas of the blue layer, allowing the white layer underneath to be seen through it.
- 2.4 A dialogue will present itself. Initalise the mask layer to “White (full opacity)”.
- 2.5 Once our mask is ready, we need to paint an outline of the text on the mask, in order to create the black border. For now, hide the magenta layer by clicking the eye next to it in the layers stack, so you can see your white text again. Right click your text layer, and select “Text to Path”.
- 2.6 Now, making sure your text layer is selected, duplicate it using the 'overlapping squares' icon at the bottom of the layer stack.
- 2.7 Hide the duplicate for now, by clicking the eye next to it in the layer stack. This will be a backup in case you decide to you need edit and space better the text later on.
- 2.8 Right click your original, visible text layer and select “Discard Text Information”: you won't be able to edit the text any longer of this layer. This is why we made a duplicate.
- 2.9 If you copied my standard text earlier, then you have these three As with diacritics in your picture. Zoom in (CTRL + scroll wheel) on those three As with the diacritics.
These are really important for foreign language translations, foreign names and also many English phrases too! ("déjà vu"!) We want to carefully erase the letters so that only the diacritics are left, because tomb4 (in an uncharacteristic stroke of efficiency) superimposes these diacritics over the top of regular vowels when the text calls for the use of diacritical letters.
If you were to leave the letters behind, then the black border of these diacritics would be messed up by the white pixels from the letters that are too close to the diacritic.
Using the Rectangle Select tool, (the first tool in the tool box) click and drag over the three As, avoiding the diacritics.
- 2.10 Now, to delete them, making sure the text layer is still selected, simply press Delete on the keyboard. Deselect everything by clicking outside your image.
- 2.11 Next, go to the paths stack. It's the stack with squiggles and dots.
A path is an outline of a selection, shape, line, etc, that GIMP is "remembering" for you to use later.
- 2.12 You should see a path already there. This is one we made when we selected “Text to Path”. Hover to the left of your path in the stack to see two buttons appear as the cursor passes over them. Click the one on the left to make the path visible, and see it outlined in red in your image.
- 2.13 Zoom in (CTRL + scroll wheel) to make sure your path is definitely aligned properly with your text. At this level of detail sometimes the path will wander a pixel or two. If it is aligned, you can skip to 2.15.
If not, select the Move tool in the tool box, and in the tool options, select the “path” filter so that we can only move paths and not layers or selections.
- 2.14 The cursor should now consists of the usual pointer, a circle with a line through it, and an icon of a path. What it's saying is, “there is no path to select”. Hover over one of the red lines of your path and it should turn into a cursor pointer, a pointing finger, and a move icon. Click the path. Now you can use the arrow keys on the directional pad to move the path a pixel at a time (usually, your path is never far off where it should be).
- 2.15 Now maneuvre the window and zoom in again on where the three As were earlier, before we erased them. You will see that the path still is “remembering” where they were and is outlining them. We want to remove this part of the path.
- 2.16 Hide the path from view again, so you can see more clearly what you are doing. Click the eye next to your path to do this.
- 2.17 Next, right click your path in the stack and click the first option, “Path Tool”.
This will make the path handles become visible.
- 2.18 Over in the Tool Options, make sure the Edit Mode is “Edit” as opposed to “Design”.
- 2.19 Now, while holding Shift, click each handle to delete them.
- 2.20 Once you are done, go back to the Rectangle Select tool (first tool in the tool box) in order to remove the handles from view again. Back in the path stack, click the 'pink graph' icon to send the newly edited path to the current selection.
Now you should see “marching ants” along the shape of your text.
- 2.21 Next, in the tool box, select the Bucket Fill tool.
Make sure that black is the foreground colour.
- 2.22 Go back to the layers stack, and unhide your magenta layer and make sure your white mask is selected (by single clicking it). You can tell your mask is selected because the dotted line around your image is green and black, as opposed to the usual yellow and black. Now, fill inside the selection. Your white text should now be peeking through the magenta layer.
Deselect everything to get rid of the marching ants (choose one of the Selection tools in the tool box, and click outside your image).
- 2.23 While ensuring the mask is still the active layer, go back to the paths stack. Make sure the foreground colour is black. Right click your path, and select “Stroke Path...”.
- 2.25 A new dialogue will appear. We want to make sure that we are using “Stroke line”. Check “Solid colour”, and make sure that “Antialiasing” is definitely unticked. (See Fig.34)
Antialiasing here will mean that in game you will end up with the ugly pink pixels on the borders of your text. However: the text will mostly still look antialiased in game. We're using white antialiased text against a black, solid border.
The line width will require some experimenting on your part. Probably it will be between 2 and 4, depending on the size of your characters, in order to create a solid black border. I will be using 2 pixel width.
What we've done here, is painted along the mask. The fill ensured the inner pixels of the text can be seen through the mask, which can sometimes be missed when stroking along the path. Stroking along the path made certain we get that nice black bottom layer peeking through from behind the text, appearing like a border.
- 2.26 Now you have your (nearly) completed texture map.
Unfortunately the font I am using is under a commercial licence, so I have watermarked the picture.
- 2.27 If you look at my map, you can see that some of the border is not totally perfect. The number 3, 7; lowercase X, J; uppercase Q, the brackets and the equals sign need some small adjustments.
Select the Pencil tool from the tool box, and set the size to 1px.
- 2.28 Then, zooming in (CTRL + scroll wheel), and with the layer mask selected, and making sure that white is the foreground colour, you can click on stray black pixels in order to set them re-visible again in the magenta layer. Likewise, you can use black to make some of the magenta pixels invisible.
Here's an animation to show the borders before and after I went over my map with the a fine tooth comb using the pencil tool:
- 2.29 Now, save this file using File > Save As... (GIMP's native format is .xcf), in case you need to come back to it later to adjust some spacing.
Then we need to export it to a .tga file for later, for FontEdit. Before we export, we need to remove all the guides, otherwise this information makes the format impossible for FontEdit to read.
To do so, select the Move tool in the tool box, then simply click and drag them off the canvas. They will disappear.
Now, go to File > Export... and type whichever name you like, and then the extension .tga (GIMP is pig-headed in the sense that filetypes are simply easier to manually write, than select from the complicated drop down menu ).
Upon export, a dialogue will pop up. Make sure that RLE compression is unticked, and we have selected the origin as Bottom left from the drop down menu.
Lastly, we can export it as a .bmp, as purely a reference for use with Leikkuri. When you export, another final dialogue appears. You need to check "Do not save colour space information" and make sure that you have checked 24-bit, in order to make it compatible with Leikkuri.
In the old tutorial, Gekkokid suggested a more natural colour for use within Leikkuri, because the garish magenta can annoy your eyes after a while. In which case, before you export the .bmp, you can fill the magenta layer (make sure you have not selected the mask: you can tell if the dotted yellow and black line surrounding the image goes black and green) with a colour of your choice. I will be using ivy green.
Last edited by Niveus; 19-03-17 at 05:26.