Guide to Making Skill Icons for GW Texmods

Chthon

Grotto Attendant

Join Date: Apr 2007

This is a guide to creating skill icons using the images from the sealed play skillcards that have a (much) better resolution than the in-game icons.

Mostly this thread is intended as a resource for the project in this thread. However, you can adapt it to making your own custom/silly icons, or even for professional-quality photograph sharpening.

I’m going to try to describe each step in two ways. First, I’m going to explain what to do in English. Then, I’m going to give specific instructions for how to perform that step in GIMP 2.4. (If someone wants to add the corresponding instructions for Photoshop, Paint.net, etc., I’m sure someone will appreciate it.)


Image Cutting

Copy the image from the skill card and paste it into a new image. Unfortunately, there's some nasty JPEG artifacts with the borders in the latest card set. The usable area free of these defects is 247x248. (We lose 2 rows and 3 columns to JPEG crap. Nothing we can really do about it.) The X positions for the upper left hand corners of cards are 66, 915, & 1766, and the Y positions are 148, 1248, & 2347.

[edit: It turns out that some of the skill cards are offset by 1 pixel down and 1 pixel right. Also, sometimes the JPEG crap doesn't infect one of the lower rows, so you can get 247x249. I'm afraid the only thing to do is to zoom way in and pay rigorous attention to your selection boundaries.]

GIMP Commands: Rectangular selection tool is in the main toolbar panel; cursor position and selection size are displayed in the info bar at the bottom of the image window; Ctrl+C is copy; Ctrl+V is paste; and Ctrl+H anchors a paste. (You can use Image → Autocrop Image if you accidentally made your new image too big and need to crop it.)


Resize

Resize down the image to the following size (ignoring the part about the border) that best matches the size icons display on your screen. If your display is in between sizes, it’s better to use the next bigger size than the next smaller one, unless it’s very, very close to the smaller one.

224x244 (256x256 with border)
112x112 (128x128 with border)
56x56 (64x64 with border)

(If we want to make a collaborative effort at making a high-res skill icon mod, we should probably do all 3 sizes and release 3 separate mods.)

GIMP Commands: Image → Scale Image, set the Height and Width. (Interpolation method does not matter when scaling down.)


Sharpen

Sharpen Substep 1: Does it need sharpening?

If the edges already look crisp enough, sharpening is just going to destroy detail without enhancing the image any. Take a good look at the image and decide if it really needs it. (For most icons, 224x224 does not need any sharpening, 112x112 can sometimes use a little bit, and 56x56 needs a bunch.) If it doesn’t need sharpening, skip the sharpening step. (Duh.)

Sharpen Substep 2: Decompose to LAB

Break the image down into L, A, & B components, by layers. This will help you avoid sharpening noise and avoid “color creep.” Open the layers dialog of your new decomposed image and make sure the the “L” layer is selected; that is the component you’re going to sharpen.

GIMP Commands: Colors → Components → Decompose, select “LAB” from the dropdown and make sure “decompose to layers” is checked.

Sharpen Substep 2.5: Create an Edge Mask

This substep is only for cases where the icon is particularly noisy, like Barbed Signet or Plague Signet for example. If the icon does not have a lot of noise that you want to avoid sharpening, then skip this substep. For most icons, you will skip this substep.

[edit: Just to be clear, doing an edge mask is never wrong. Your results will always be better with an edge mask than without it. But the effect on not-noisy icons is usually so small it's not worth the time and effort.]

Just to make some sense out of it, the purpose of this substep is to create a funny-shaped selection that contains just the “important” edges and a little bit of space around them. This way the noise won’t get sharpened because the noise isn’t selected.

Open a fresh copy of the image, properly resized. (GIMP Command: Select the image you decomposed from, then Image → Duplicate.) Run an edge-detection filter. (GIMP Command: Filters → Edge-Detect → Edge. Which algorithm works best depends on the image.) Convert the image to greyscale. (GIMP Command: Image → Mode → Grayscale.) Adjust the black point and the white point so that the image is as close as possible to “important” edges being white lines on a black background, with very little grey in between. (Gimp Command: Colors → Levels, move the black arrow and the white arrow under the “input levels” graph inward until you get the desired white-on-black effect.) Apply a light Guassian blur. Since these icons are small, don’t use a large radius; maybe 2 or 3 for 56x56 icons, 3-5 for 112x112 icons, and 4-7 for 224x224 icons. (Gimp Command: Filters → Blur → Guassian Blur.) Repeat the black and white point adjustments so that the image is again close to white-on-black with very little grey. Copy the image. (Gimp Command: Ctrl+C)

[edit: Prior to the Guassian blur, you may want to remove some things you don't want to sharpen by hand. Simply select them and fill with black. Prime candidates are bumpy/gravelly surface textures and the hazy/misty/glowy backgrounds on a lot of skills.]

Now, bring up your LAB-decomposed image. Create a new channel and paste the black-and-white image into it. (GIMP Commands: Dialogs → Channels, then, at the bottom of the Channels box, hit the “create a new channel” button. Ctrl+V to paste, the Ctrl+H to anchor the paste.) Covert the channel into a selection. (GIMP Command: At the bottom of the Channels box, hit the “replace the selection with this channel” button.) You should now have a bizarrely-shaped selection. Now, go back and make sure that the “L” layer is the active layer.

Sharpen Substep 3: Run an Unsharp Mask

Run an unsharp mask. Since the icons are small, a small radius is in order; maybe 2 or 3 for 56x56 icons, 3-5 for 112x112 icons, and 4-7 for 224x224 icons. The amount depends on how much the image needs sharpened. You probably shouldn’t use a threshold. (GIMP Command: Filters → Enhance → Unsharp Mask.)

Sharpen Substep 4: Recompose from LAB

Recompose the image from LAB. (GIMP Command: Color → Components → Compose, make sure “LAB” is selected in the dropdown.)

Sharpen Substep 5: Undo and Redo until You Get it Right

Sharpening is a trial-and-error process. Usually your first try will not look as good as it could. Undo back to before the unsharp mask, adjust the settings on the unsharp mask, and try again until you get a result you’re happy with.


Add the Border

Select black as the background color, then expand the canvas size to the “with border” size isted above, centering the current image. This should create a black border around the icon. (I have no idea what purpose this border serves, but it needs to be there for the icon to be scaled and positioned properly.)

GIMP Commands: Image → Canvas Size, enter the Width and Height, hit the “center” button, select “all layers” in the “resize layers” dropdown.


Convert Black to Alpha

Make each pixel that contains black transparent to the same degree that it contains black. (Yes, this will look very odd in your image editing program. Don't worry -- GW will restore the missing black at runtime. You need to do this so that subtle lighting effects on the icons will work properly ingame.)

GIMP Command: Color → Color to Alpha, click the color selection button and choose black (000000).


Save as DXT5 .DDS

Save the image as a DXT5 .DDS file.

GIMP Command: File → Save As, pick the name and location to save to, select DXT5 from the dropdown, make sure “generate mipmaps” is not checked.


All done!!

deadman_uk

deadman_uk

Krytan Explorer

Join Date: Feb 2007

United Kingdom

KOD

Mo/E

Eeek lol. Maybe put some pictures for the section 2 part? I use Photoshop, not GIMP so some of these things will be completely different. Pictures will support the text you've typed.

Chthon

Grotto Attendant

Join Date: Apr 2007

Quote:
Originally Posted by deadman_uk
Eeek lol. Maybe put some pictures for the section 2 part? I use Photoshop, not GIMP so some of these things will be completely different. Pictures will support the text you've typed.
Perhaps an example is in order then. I'm going to do Plague Signet with pictures in this post. I picked Plague Signet because it needs the advanced edge mask technique for sharpening.

1. Image Cutting:

-->

2. Resize:

In this case I resize to 112x112, because, out of 64x64, 112x112, and 224x224, that is the best fit for my display.

-->

3.1. Sharpen, Does it Need Sharpening?

Yes, I think it needs a little.

3.2 Sharpen, Decompose to LAB:

-->

3.2.5 Sharpen, Create an Edge Mask:

Important note: Most icons do NOT need this step.

See how the icon has a bumpy, gravelly texture? If we run a sharpen on the whole image, it's going to pick up the contrasts in that texture and sharpen them, even though they aren't really edges. And that will look like poo. So we're going to make an edge mask to avoid that. Just to repeat, most icons don't need an edge mask.

Run edge detection filter on duplicate of the image, then convert to greyscale:

Normally I use the Sobel algorithm,...

--> --> -->

...but that caught waaay too much noise. So I ended up using the difference of guassians algorithm (and inverting the colors) instead:

--> -->

Adjust the levels so that the black point and white point move in and you get a white-on-black image:

-->

**Still** too much noise, so I blacked some out manually and repeated the level adjustment (normally this isn't needed, but Plague Signet turns out to be a HUGE BEEEOTCH):

-->

Apply a light Guassian blur to thicken the lines, then repeat the level adjustment:

--> -->

Now create a new channel in the decomposed image, past the edge mask into it, then convert the channel to a selection on the "L" layer:

+ -->

3.3. Apply an Unsharp Mask:

Note: If you skipped making an edge mask, you will be applying your unsharp mask to the whole "L" layer. If you made an edge mask, you will be applying the unsharp mask only to the selection created from the edge mask on the "L" layer.

-->

3.4. Recompose from LAB:

-->

3.5. Undo and Try Again until It Looks Good.

4. Add the Black Border:

Since this is 112x112, I'm going to add a 8 pixel border to get to 128x128:

-->

5. Convert Black to Alpha:

-->

6. Save as DXT5 .DDS

Download: PlagueSignet128x128.dds

7. Done

--------------------------------------------------------------

Comparisons:
Original from Skill Card

A. --> <-- B.
C. --> <-- D.
A. Resized to 112x112, no sharpening
B. 112x112 sharpened with LAB decompose/recompose and edge mask (final result)
C. 112x112 sharpened without LAB decompose/recompose and edge mask (notice the prominent noise, especially in the blue parts, and the fact that the color has shifted brighter than it should be in places, especially in the green parts)
D. In-game icon resized to 112x112 (using cubic interpolation because I think that's what GW uses at runtime)

deadman_uk

deadman_uk

Krytan Explorer

Join Date: Feb 2007

United Kingdom

KOD

Mo/E

Even with the pictures, the steps about creating an edge mask is unclear to me as I don't use GIMP, I use Photoshop. Anyway, thanks for the great tutorial (even if it was for GIMP), I am able to understand most of the steps.

Shawn The Divine

Shawn The Divine

Frost Gate Guardian

Join Date: May 2006

Nova Scotia

My Other Healer Is Lvl Eighty

Mo/W

Awesome tutorial. I've been trying out GIMP recently, since to be perfectly honest I'd got a non-legit copy of CS3 off friend, and it's recently started freaking out on me from where I installed Elements 6 to compare it to CS3.

One thing that's annoying me about GIMP (aside from how unfinished it feels on WinXP compared to Linux) is that I'm having a hell of a time trying to solve basic problems.. Like, look at these two pictures:


I have no idea how to remove that alpha channel.. transparency.. thing.. so I can actually see the damned image I'm working on. Any ideas?

Chthon

Grotto Attendant

Join Date: Apr 2007

Added some things to the OP. Minor details and clarifications.

Quote:
Originally Posted by deadman_uk
Even with the pictures, the steps about creating an edge mask is unclear to me as I don't use GIMP, I use Photoshop. Anyway, thanks for the great tutorial (even if it was for GIMP), I am able to understand most of the steps.
So long as you understand that the purpose of an edge mask is to create a selection on the "L" layer that includes just the "important" edges, plus a little bit of space around them, then you understand the important part. How you get there is not particularly relevant. I'm sure there's some way to get to that result in photoshop, and there's other ways to get there in GIMP. Play around with the menus and the help files and I'm sure you can figure out how to do it.

Put as generally as I can, the steps are:
1. Run edge detection.
2. In any order:
2a. Eliminate "unimportant" edges.
2b. Get the image into a white-on-black state.
2c. Thicken the edges.
3. Convert the image to a selection that's applied to the "L" layer of your decomposed image.

Quote:
Originally Posted by Shawn The Divine
I have no idea how to remove that alpha channel.. transparency.. thing.. so I can actually see the damned image I'm working on. Any ideas?
For skill icons, put a black layer behind them, then merge down. Take black to alpha when you're done to get it back into proper format.

For most other things, follow the directions in this thread.

deadman_uk

deadman_uk

Krytan Explorer

Join Date: Feb 2007

United Kingdom

KOD

Mo/E

That's another thing I don't know how to do in Photoshop.... get the image into a white on black state. I have played around with the level settings but to no joy. I will play around further later.

JoeKnowMo

JoeKnowMo

Jungle Guide

Join Date: Oct 2005

Wessst Siiide, USA

Mo/

The renamed hi-res icons and the .log file are available for download here.

Now get to it, you photochoppers.

RavenGT

RavenGT

Academy Page

Join Date: Jun 2005

I'm not going to lie, you just made such a simple concept into a very, very complicated procedure. I don't use GIMP, but at least in Photoshop it's very easy (and very quick) to sharpen certain specific areas.

Chthon

Grotto Attendant

Join Date: Apr 2007

Quote:
Originally Posted by RavenGT
I'm not going to lie, you just made such a simple concept into a very, very complicated procedure. I don't use GIMP, but at least in Photoshop it's very easy (and very quick) to sharpen certain specific areas.
1. I'm rather dubious that there's an automated procedure that does it nearly so cleanly or precisely.

2. If there is, then GREAT! But instead of ragging on me, you should be posting a guide for it!