by Reynante Martinez Martinez . February 7th, 2011
For this first tutorial, we have decided to introduce you to one of the most common and basic tasks in design – creating buttons, shiny buttons! We will be using GIMP, the free and open source raster graphics application to create this said effect.
To those who are unfamiliar with GIMP, I highly suggest that you first make yourself comfortable with the software. You can download the user manual and view some tutorials here. This way, you will be familiar with the terms and tools that I’ll be showing you along. Nevertheless, I will do my best to explain the procedure as simple as possible and as quick as I could.
With that said, let us get on with creating shiny buttons, similar to the one you see below:
With GIMP now open on your machine, the first thing we have to do is to create a blank canvas on which we will be designing our button later on.
Proceed to the Image Window and click File > New or press CTRL N on your keyboard to invoke the New Image command.
After which, a pop-up window will appear enabling to input details for your new canvas.
Let’s take a closer look at the settings we have. Under Template, you have the option to choose between a number of presets; this wall save you a lot of time especially if you’re not very familiar with the exact resolution and image size settings to use.
Once you’re satisfied with the settings, press the OK button to create the canvas, which will most likely look like the image below.
You will instantly notice that the Layers Window already has a new entry, being the original canvas we created. Also, our main Image Window is now named “Untitled-11.0 (RGB, 1 layer) 640×400”, which clearly tells us that this is an unsaved image, with an image mode of RGB, consisting of 1 layer, and with a dimension of 640×400. As we go along in this tutorial, some of these variables will change accordingly. In relation to that, it might be a good idea to save this file and give it a decent name that is easy to remember and symbolic of what we will be making.
To save the image, simply go to File > Save or by pressing CTRL S.
A pop-up window will appear asking you for the filename, destination, and the file format of your image. As I said earlier, it is really a good idea to name your project according to the context it has. For example purposes, we’ll name this file “shiny_button.xcf”. Immediately, you’ll notice I have suffixed the filename with an “.xcf”. What this does is it explicitly tells GIMP to save the image as an XCF file, which is GIMP’s native file format. You can, however choose to use other formats like the common JPG or PNG, simply suffix “.jpg” or “.png” at the end of your file name. Alternatively, you can also use the File Type Selection at the bottom of the window to choose from a variety of file formats.
However, I highly suggest that for now, we use the XCF file format since it is GIMP’s native format, which basically means it will retain all the data we have saved including layers, selections, paths, channels, etc. Unlike if we used, for example, a JPG file format which will clearly flatten your image. The next time you open your file in GIMP, those layers you have worked on are gone and cannot be recovered. Right now, the safest route that we can take is to save our file as an XCF file format, comparable to Adobe Photoshop’s PSD format. Then later in this tutorial, we will be exporting the file to a general file format that can be viewed anywhere else.
After we have saved our image with a relevant name, we proceed to naming our layers, in this case we only have one layer so far. To rename the layers, simply double click on the layer name, type a text, and press Enter to confirm the renaming. Renaming layers enables us to keep track of the contents and the purposes of each layer. Imagine having a very large project, with something like 100 Layers; if you didn’t take the time to rename all those layers, it will be very hard to distinguish one layer from the other, probably wasting your time guessing which does which. By renaming them accordingly, you save yourself the frustration and will be keeping track of changes better, focusing more on the artistic creation.
For this tutorial, we’ll be naming this layer as “bg”, or if you want you can just leave the default “Background” name. But for the next addition of layers, it is critical to name them accordingly.
STEP 3: CREATING A NEW LAYER
By this time, you might already be starting to get frustrated with all these preparations we’re doing. But whether we like it or not, they will help us greatly along the way. And it’s a good practice too to do this often, if not always, in projects that you create.
To create a layer, click the icon under your Layers Window with a plus sign. A pop-up window will appear asking you for the details of this layer.
Let’s name this layer as “shape” denoting that this will be the layer where our basic shape will be on. Leave the Layer Fill Type option to Transparency, this way everything we create that does not encompass the whole image size will have a transparency value, enabling the color of “bg” layer to still be visible. Press OK to confirm the settings.
Next thing we have to do is to decide how our shiny button will look like or what shape it will be. Once we have done so, the remaining steps will just be a matter of color addition and layer blending.
To create the basic shape, I decided to use the Rectangle Select Tool and enabled the Rounded Corners option under the Toolbox Window and have set it to the maximum value of 100. This will enable us to create roundish elongated button shapes that are otherwise more difficult to achieve simply by using an Ellipse Select Tool. By default, when selecting tools, you will notice your cursor change to the context you have chosen, and in this case, a rectangular selection tool.
Make sure you have layer “shape” active; we’ll be creating our basic button shape here shortly.
With your cursor on the canvas, left click and drag your mouse until you create a shape similar to the image below then release the left mouse button to confirm selection.
After you release the left mouse button, you will notice a motion around our shape; this is called the “marching ants” which clearly indicates that we have an active selection on our layer. To deselect this, simply use any of the selection tools and left click outside of the selection area, this technique is also commonly referred to as anchoring. However, if you want to further edit the scale of your button, you have to select the same selection tool we used to create it (Rectangular Select Tool), then left click on the active selection. You’ll notice the control points are back again, enabling you to make modifications on the shape as needed.
Now that we have a basic shape to work on, it’s time to add some colors! There are various ways of coloring elements in GIMP (or any other graphics application), we can use brushes, paint fills, pencils, gradients, textures, etc. But for this part, we will be using the Blend Tool to add colors to the shape.
NOTE: Keep the selection active. Avoid clicking outside the selection, causing the selection to disappear.
Select the Blend Tool from the Toolbox Window or press L on your keyboard.
The Blend Tool, one of my personal favorites, uses two colors as input and blends these colors accordingly creating smooth transitions, depending on user preference.
Before we use this tool, let’s first set the foreground color and background color that will be used as transition colors for the Blend Tool. Choose the colors to your liking. Simply click the color swatches on the Toolbox Window and select a color from the selector. To quickly switch between foreground and background colors, you can press X, also called color swapping. I have decided to choose a more orangeish tint of colors—one darker than the other.
Now that we have chosen both colors for the blend tool, it’s time to apply these color transitions to our current selection, our active shape. You also have the option to modify how these colors will behave, selecting from a list of presets and blending options.
With the Blend Tool (L) still active, move your cursor to the Image Window, on the active shape selection then left click and drag such that we create an appearance of darker top and lighter bottom (which will be apparent from your color choices previously).
After we have filled the shape with the necessary color blends, we can now deselect the selection by selecting any of the selection tools and clicking outside of the selection region; alternatively, you can simply press CTRL SHIFT A to deselect.
Following the same procedure in creating the basic shape, we can create the shine that we’ll be adding on top of our previous creation.
Create a new layer and name it “shine”, again with a Transparency Layer Fill Type.
Using again the Rectangular Select Tool, with the same options enabled before, we draw a small elongated shape on the top part of our basic shape (as seen below).
Next, select the Blend Tool and choose a foreground color near to white (or you can use pure white) – this color will serve as your specular highlight. For the Gradient type, select the Foreground to Transparent option; you’ll see why in a second. Just leave the default Shape to Linear.
Move your cursor over to your active selection and drag your blend tool from the top part of the selection to its bottom, creating something like the image below.
We can now safely deselect the active selection and proceed with the next part.
The main purpose of this step is to add a bit of depth to our button, which already looks decent on its own. We will be creating a soft shadow effect, that would somehow emulate a part of the button which is unevenly lit from the center, which was caused by the light source’s energy falloff.
Click the “shape” layer and add a new layer. The reason we selected the “shape” layer first before adding a new layer is because by default, when adding layers, it instantly positions itself on top of the currently selected layer; in this case, the “shape” layer.
Label the newly-created layer as “shadow”.
Now that we have the original shape selected again, we will be deriving the shadow selection area from this shape. Right click on the active selection, go to Select and choose “Shrink”.
On the pop-up window that appears, you can input values (in varying units) how much contracting/shrinking you want. On this part, you can play on the values. I will use 25 pixels in this case.
Which will create something like:
With the selection still active, right click on it, choose Select, then click Invert. This will invert the selection, so instead of the center part being selected, we now have everything selected except the center part.
Select the “shadow” layer then go back to the Image Window (with the selection still active), right click on the selection, choose Select > Feather. On the pop-up window, you can play around with the values. The more feathering you have, the more blurry your selection edges will be. You’ll see the effect shortly.
Once you have successfully feathered out the selection, pick the Bucket Fill Tool from the Toolbox Window, select a foreground color of black, then under the Bucket Fill Tool Options, enable Fill whole selection.
Now go back to the Image Window, with the selection still active and left click on the selection to fill it entirely with black. You’ll notice the effects of the selection feathering on the edges of the selection near the center, creating a blurring effect.
We can now deselect the active selection since we’re already done filling it with our desired color effect. The next thing we have to do is to constrain this shadow effect only to the shape and not affecting the rest of the image. To do this, select the shape layer, right click on it and select Alpha to Selection to select the entire “shape” figure.
To get rid of the excess part, there are many ways of doing it, two of which would be to use a mask and the other one is simply by removing the selection. For simplicity purposes, we’ll use the latter technique. With the selection still active, select the shadow layer. On the Image Window, right click the selection and go to Select > Invert. After the selection has been inverted, press Delete on your keyboard or you can use the cut command (CTRL X), to remove the selection and place it to buffer; but pressing the delete button should do the trick.
Now we can safely deselect the current selection. Currently, the blacks in our button is just too much and it doesn’t blend well with the general color of our button. To address that issue, we’ll use the ever powerful and fun-to-use layer blending modes. Select the shadow layer and under Mode, select Overlay. You can select other types of Blending Modes and see what it does to your image.
STEP 8: FINALIZATION AND TWEAKING
Alas! We have reached the final step of the creation process. This part will mainly deal with the minor tweaks and effects, it might be very subtle you can ignore it or you can proceed and see the difference for yourselves.
Go to the Layer Window and select the shadow layer. Under this same window, press the Duplicate Layer button to make a duplicate of the layer currently selected, thus duplicating the effects this layer has too (like the layer blending mode, for instance). Do this also to the shine layer, creating an even brighter specular highlight.
To add a little spice to our button, let’s add some text! To add text in GIMP, simply head over to the Toolbox Window and select the Text Tool or you can press T on your keyboard. Then click on the Image Window and start typing your text.
With further tweaking and playing around, you can get something like the image below:
STEP 9: EXPORTING THE FILE TO A GENERAL FILE FORMAT
To export this project to a more human-readable and web-compatible format, simply go to File > Save As. Then manually type the file extension or you can choose from the list on the bottom part of the window. You can choose to save as JPG (.jpg), PNG (.png), GIF (.gif), and many more. Then simply follow the pop-up window instructions that appear as you save.
In this tutorial, we have learned how to create shiny buttons (aka glass buttons) with few simple tricks that involves selection and colorizing techniques.
We hope you have enjoyed this tutorial. Until next time!
I'm a self-taught CG Artist, 3D Generalist, and Photographer. I have great passion for motion graphics, traditional animation, photography, and technology. I derive my inspiration from other people's greatness and the existing and dynamic art around me.