Author Topic: [Tutorial] How to make Item Icons in Gimp  (Read 15766 times)

How to make Item Icons in Gimp
by AGlass0fMilk

I know there is already an Item Icon tutorial out there, but many beginning modders still don't know how to make these little things. This tutorial is about how to make Item Icons specifically for Gimp as many image editing programs have different controls. This is going to be slapped together quickly but it will roughly follow the steps that you should follow in order to make an item icon using Gimp. This tutorial was requested by Atom (at least that's his name on RTB), so here we go.

For those of you who do not have Gimp, you may download it from their website here.

Also, before we begin, this tutorial uses a template that all item icons should have. Please download it now before starting:

Right-click image and click "Save Image As..."

Section 1: Getting an image of your item

In addition to the template above, before you can start making an item icon, you must have a picture of your icon-less weapon or item. To make the editing process easier, the item should have a solid background (preferably a solid white background). But you may be asking: "AGlass0fMilk, how do I get a picture of my item with a completely white background!" Well, you're in luck because my tutorial specifically shows you how.

Open up Blockland and start a mission on the default map Construct. Make sure your add-on is enabled or this is completely pointless. For this tutorial, I will be using Atom's unreleased Bioshock Tommy Gun.

Once your mission is loaded, open the brick selection window. Scroll down to the bottom of the "Bricks" tab and select the largest print brick, the "1X4X4 Print". Now make a wall, approximately 4 bricks by 3 bricks, doesn't really matter. Make sure the wall is white. Using print bricks provides a seamless wall, check out the picture comparison below:


Without print bricks


With print bricks


Now you may be asking me: "The wall appears off-white! Why doesn't it blend with the map?!"
There's an easy fix to this, but first, for the sake of visibility, put your weapon on the wall, using the weapon position and weapon direction options to orient it properly:



You may just want to make the bricks invisible, but you may also paint the wall with the special effect paint, Glow. This will make the wall match the background and blend in.

Compare:


Now that that is done, screenshot the weapon on the wall (press Cntrl-P). You may take a straight-on picture, or angle it how you like. It should end up like this:


Section 2: Preparing the Image

Now that you have the an image of your item that you want to use, you can start to edit it to make it into an icon.

First thing you have to do is obviously, open Gimp. For those of you who do not have Gimp, you may download it from the link above, and then install it (if you can't do that competently by yourself, you shouldn't be here). Once you open Gimp (which for some reason takes a while, especially for the first time),  open your unedited image. But you'll notice, if you were to copy and paste your gun as-is into the template, it would be too big, as well as have a white background, thus not allowing the nice transparent circle to show through. In order to fix this, first we need to select only the item. On the toolbox, select the magic wand. This tool allows you to select specific parts of an image (for those of you not keen to Gimp, visit the diagram at the bottom of this post). Now, using this tool, click the white background. Now it may seem that you have your item selected, but press cntrl-X (cut) and you will notice that it is trying to cut the white space. To select the entire item, right click the image, scroll to Select, and then click Invert (see picture below). This will invert the selection from the white space around the item, to the item inside the white space.



Now, press Cntrl-X to cut the item from the white space.

In the upper-left-hand corner, click File and then click "New" to create a new image. When a prompt appears to select the size of the new image, estimate how big your item is and then create the new image.

Before you go about pasting your item into the new image, we need to make the background transparent. To do this, right click the blank image and scroll to Layer, then scroll to Transparency, and click "Add Alpha Channel."



Now don't paste just yet! You will notice that the white background is still there even after adding the alpha channel. In order to fix this, select the eraser tool (see diagram at bottom post, although it is the tool that looks like a big eraser) and erase the white background, a checkered pattern should appear, this represents transparency:




Now that we have a transparent background, you may paste the item into the image, press Cntrl-V (paste) and it should appear. If the lines/box around the item won't go away, right click it and scroll to layer and select "Anchor Layer"



If your image comes out anything like mine, with a white outline/white holes in it, you may be asking: "How do I fix this?" Well, here's the only real work involved with creating item icons. Technology can't always do things perfectly for us. So you must delete the white that remains by hand. You may use either the eraser or the magic wand, but I use the magic wand because it erases multiple white parts at a time. To be more accurate, you must zoom in using the Zoom Tool (see diagram at bottom of post, it's the tool that looks like a magnifying glass).

*Hint* There is a glitch with Gimp that I sometimes get where it zooms in to something ridiculous like X26000. In which case, hold down cntrl and click, this will zoom out

Anyway, zoom in and start erasing the white space, it should come out like this (or whatever your item is, minus the whitespace):




Then, at this step, I would save so you don't have to do this again in case Gimp or your computer crash. Save it as like "Insertnamehere - Transparent"

Now you are almost done editing the image to make it into an icon.

Section 3: The final step, finishing the icon
Now, download the item icon template at the beginning of this post and open it in Gimp. Take your transparent background item image and use the magic wand again to select the item (select transparent and then invert the selection again, as we did in Section 2). Press cntrl-c (copy) to copy the item and then select the template's window and press cntrl-v (paste) to paste the item into the template's image. Now it's time for you to say: "But wait! The item is too big and it barely even shows up! WHAT AM I GOING TO DO THIS IS NEVER GOING TO WORK AHHHHHHH!!!!!" But before you pull the trigger on your 9mm, notice that Gimp has a couple of tools to help you out in this situation. Select the Scale tool (see diagram at bottom of post) and click on the item. A window will open allowing you to scale the item. But before you go messing around with those numbers, we don't want an extremely distorted and out-of-proportion icon, so make sure that the broken chain link is connected:



Now, scale your item to a reasonable size, not too small, and not too large. We want the item to fit inside the box, not necessarily inside the transparent circle, it may overlap that, but any part that is outside of the image's bounds will be cut off.

Now we could just leave it straight accross and boring like it should be right now:


Or we could rotate it to add a cool perspective. So I think we'll do that. To rotate an image, you must use the Rotate Tool (see diagram at bottom of post). Select that tool and then click on your item. Rotate it to a reasonable angle (I did about 30-35 degrees) and then right click the item, scroll to layer, and click anchor layer.

Now it's done! We have a cool icon that not only adds that much more to your weapon or item, but it was easy to make and fits in with the default add-ons just as if Badspot had made it!

This is not nearly as boring as the above icon:


*Note* It may seem that the icon is very dark in Gimp, this is because of the dark checkered background. If you open it after you save it, it will appear lighter

Here is the final product:


Now, click file in the upper-left-hand corner and then MAKE SURE to click "Save As..." otherwise, you'll save over your item icon template, which you may want to use in the future! Also, MAKE SURE to save your icon in png file format, this is what file type Blockland uses for item icons.

Now you can package it with your add-on. I will not go through the steps on how to add the icon to your add-on (or show an in-game shot of the demo icon because I don't want to edit the file...) because if you're a scripter, you should already know how to do so. I will add this section if I get enough requests for it.

Post any additional questions or point out mistakes I made in this thread, or you may contact me by PM, email, or phone.

My email is AGlass0fMilk@live.com (it's a zero, not an O)
And my phone number is ███-███-████
« Last Edit: October 02, 2010, 02:37:30 PM by AGlass0fMilk »

Diagram made in 30 seconds
« Last Edit: October 02, 2010, 02:38:46 PM by AGlass0fMilk »

My email is AGlass0fMilk@live.com (it's a zero, not an O)
So:
AGlasszerofMilk@live.com?

So:
AGlasszerofMilk@live.com?
You know what I mean, what are you, a computer?

I have to spell it out so it's not like: It's a 0 not a 0

Edit: You were quick to stuffpost this weren't you
« Last Edit: October 02, 2010, 02:38:14 PM by AGlass0fMilk »

I used the greenscreen map.

I used the greenscreen map.
Whatever works for you, Construct is default, and works just fine. Doesn't matter if the background is green lol, it's getting cut out anyway.

Whatever works for you, Construct is default, and works just fine. Doesn't matter if the background is green lol, it's getting cut out anyway.
Well, white generally blends in with the colors of the weapon. It gets annoying.

Well, white generally blends in with the colors of the weapon. It gets annoying.
Off topic:
Looked at your website, lol'd at Rocket Lawnchair.

Off topic:
Looked at your website, lol'd at Rocket Lawnchair.
Cool, thanks. Do you want me to add your site to the references?

Sure, I guess, more publicity for me!

You can make an icon for the website if you want, I have no icon other than my banner and it sucks. In fact, my whole website's color scheme sucks

You can make an icon for the website if you want, I have no icon other than my banner and it sucks. In fact, my whole website's color scheme sucks
I just used your banner. Kyzor made the Pirotech logo for me. Also, did you download the weapons?

I just used your banner. Kyzor made the Pirotech logo for me. Also, did you download the weapons?
No :o It was under 3D Renders, I thought they were just concepts.

I don't want to continue this in this thread so we can PM or if you have an MSN account, I'll add you

No :o It was under 3D Renders, I thought they were just concepts.

I don't want to continue this in this thread so we can PM or if you have an MSN account, I'll add you
Ok, sorry.

All this because of Spartan101

All this because of Spartan101
And the other people who cant do this