As previously discussed, navigation and interface design for the Web is an important aspect of page design. You want users to be able to easily navigate through your pages. The visual appeal of your page is based on the individual elements that are displayed and on the way they are displayed.
The graphical elements on your page are basically one of three types. The first, inline images, are simply static nonlinked graphics that appear for clarification, explanation, instruction, or enhancement. The second, navigation buttons or icons, are graphic images that let you go from one place to another with a click of the mouse. Finally, image maps, which are covered in the next chapter, are graphic images that are divided into regions or hotspots that perform some responsive action when clicked.
Because buttons are such a natural metaphor for navigation, and because buttons show up all over Web pages, an entire chapter is devoted to this topic.
So what makes a button look like a button? How do you get the feeling that when you click on the graphic that it's going to take you somewhere? As you will see, it is really in the small nuances of the graphic. Small beveled edges, consistency in lighting, and other details are what clue you in. Again, much of this intuition is based on our experiences, but unique creations can also be used if they are well designed.
This chapter takes a look at how light and its counterparts of shade and shadow affect the design of a button. These characteristics are really what define interactivity. You're going to design a few buttons by learning how to correctly set the surface attributes according to light, shade, and shadow. Honestly, you can make every type of button imaginable from square to round to irregular once you understand lighting and how the small nuances of value create that "button look." It'll be everything you wanted to know about buttons-maybe more than you want to know-but I believe this knowledge will help you no matter what type of button you want to create.
Artists are generally called artists because of their ability to re-create what they see or imagine. How is it that we can all be in the same environment and see the same things, but yet when it comes to creating a graphical representation of what we see, we all come up with different results? We all see the same things, but we perceive differently. Individual skill in re-creating what is perceived also differs from person to person. But being really good at creating graphics starts with this matter of perception.
Have you ever taken the time to look at a house or building on a bright and sunny day? How often do you really look to see how the light illuminates the house? Do you notice the shadows and how they fall on the house, the landscape, and the surrounding area?
If you compare an average image and an exceptional image, what separates them? More than likely the lighting has something to do with it. Textures, color, and geom-etry all contribute to overall effectiveness, but lighting will inevitably separate the excellent from the average.
When dealing with buttons, the shadows and light areas are not as complex as those on a house, but they are equally important to the perception of the graphic. The light surfaces (those receiving direct light) should be lighter than those in shade (surfaces opposite the light source). In addition, there should be a difference in the value between shade surfaces and shadow areas (areas where light is blocked by another object). The location of all these areas is determined by the source and direction of light as shown in Figure 13.1.
Figure 13.1 : Light, shade and shadow surfaces.
Note |
One of the things that will help you as you start designing buttons or other graphical items is to create a small sketch as a guide. Use the sketch and label it as you define the light source and the light, shade, and shadow surfaces. |
The first step in defining each of the surfaces is to determine the direction and elevation of a light source. A light source has both a direction and an elevation. This is used to determine each surface type and to cast the shadows. When you begin designing your buttons, start by deciding on the direction of your light source (see Figure 13.2).
Figure 13.2 : Determining a light source direction and elevation.
Once you've assigned a light source, determine those surfaces that are directly receiving light. If you are using a sketch, label the light surfaces with a letter L to help you (see Figure 13.3). These are the surfaces that are directly hit by the light and will be the lightest in value.
Figure 13.3 : Determining light surfaces.
Next, determine which surfaces on the object will be opposite the light source (see Figure 13.4). Label these surfaces as S or shade surfaces. These surfaces will be around a value of 50 percent on a 100-point scale. These surfaces are receiving what is known as ambient light. Ambient light is the amount of light available without the light source.
Figure 13.4 : Determining shade surfaces.
Once you have determined the light and shade surfaces, find the intersection of these surfaces (see Figure 13.5). The intersection of these surfaces clues you in to which surface edges will be casting shadows.
Figure 13.5 : Determining lines that are casting shadows.
Now that you know which edges are casting shadows, you can use the direction and elevation of the light source to project the shadows of the object. Trace the connecting points on the shadow line to the plane the object is sitting on. Project away from the object using the direction vector (light ray) from your light source. Project down from the shadow line point to the direction line using the elevation vector. Connect the dots to create the limits of the shadow (see Figure 13.6).
Figure 13.6 : Casting the shadows of buttons.
Realize that this procedure for determining light, shade, and shadow surfaces can be used anytime you are creating graphics and can be used to make sure the lighting is correct (see Figure 13.7). For most of your buttons, you can simply create them without casting the shadow because you might already know what they should look like. The technical term "fudge them in" applies here. Using this projection process every time you need to create 3D objects with shadows would be absurd. However, there may be times when you don't have a clue what the shadows should look like, let alone where they are.
Figure 13.7 : Finished view of the 3D button.
Tip |
Once you have visualized the shape of common shadows (prism, cylinder, cone, and sphere), you probably won't actually construct them. Consistent shadows present the user with a consistent interface. |
Note |
The next three steps are general rules to follow when you are cast-ing shadows using projection:
|
Figure 13.8 : Projecting points to find shadows.
Figure 13.9 : Parallel relationship.
Figure 13.10: Perpendicular relationship.
Square buttons are probably the easiest buttons to make, so let's start with them. It is possible to make buttons in a vector illustration program and then port them into a raster format; however, realism is usually lacking with this technique. Throughout these button-making tasks we'll focus on raster techniques in Adobe Photoshop (not a requirement, just our choice) starting with a blank canvas.
To begin making buttons, it's important to know how big they need to be. If you're already familiar with the type of buttons found on Web sites, you already know what size the buttons need to be. If not, you may want to look at the portfolio of Web graphics presented in Chapter 6 "Presenting Effective Web Graphics," to help guide your button decisions.
To begin making a square button with beveled edges as in Figure 13.11, follow these steps:
Figure 13.11: Two views of the square button you"ll be creating.
Rectangular buttons come in different sizes and colors. Obviously without the bevel, the button would be easier to create, but it would also be less effective.
Making round buttons is very similar to creating rectangular buttons, and it requires changing the type of selections that are made (see Figure 13.19). Again, round buttons come in all sizes and colors.
Figure 13.19: Two views of the round button you will be making.
To begin making a round button, follow these steps:
Creating soft buttons is straightforward as long as you know the exact color of your background. Soft buttons are those that are feathered into the background color. If you're using a tile bitmap in your background, it may be more difficult to create and use this type of button.
To create a soft button, complete the following steps:
Button bars are usually created so that they can be used as an image map. The buttons you have created thus far would be inserted into a page, and when clicked, they would each take you to a different location or display a resource such as a picture or video. Alternatively, an image map is a graphic that has several links assigned to it. Depending on where you click on the image, it will take you to a respective location.
For ease of explanation, let's use the square button that was created earlier as a basis for our bar. Let's assume that you want two buttons, side-by-side on the page, such as forward and backward paging buttons (see Figure 13.29).
Figure 13.29: Two views of the button bar you will be creating.
To create a button bar, complete the following steps:
Figure 13.31: Two views of your finished button bar.
Workshop |
If you combine a button, HTML text, and the TABLE structure, you have more control over how your button bar appears on the page. In this example, the same button is cached and used several times to fill out button bars in both vertical and horizontal arrangements. By combining graphic buttons and HTML text, you reduce the number of files you must manage. |
Irregularly shaped objects are generally created in illustration packages and then rasterized so that they can be used as a bitmap (see Figure 13.32). As you're creating them, the most important factor is to make sure that the background color is set correctly so that the anti-aliasing that occurs works to your advantage. To begin creating an irregularly shaped button, complete the following steps:
Figure 13.32: The irregularly shaped button you will create.
Figure 13.34: Using the Wand tool to select the inside of the shape.
Figure 13.35: Using the Border option to select pixels that will be the bevel.
Figure 13.36: Finishing your irregular button.
The final step in using your buttons is to include them in the
coding for your page. To use the graphics in your code, the tag
<IMG SRC> will be combined
with the tag
<A HREF>.
For example, if you made an image called Button.gif and wanted to code it as a button linked to another Web site (uniform resource locator, or URL), the code would look like this:
<A HREF="http://some.site.com"><IMG SRC="Button.gif"></A>
If I wanted to link a button from one page to another, with both pages in the same location on my server, the code would look like this:
<A HREF="nextpage.html"><IMG SRC="Next.gif"></A>
Now that you are button savvy, look at the following chapters for additional information:
I've already created some buttons in an illustration program, but how do I get them to a raster format? | |
The best way is to export the illustration out of the program in a bitmap format (TIFF, PCX, BMP). Macromedia FreeHand for Windows does a pretty good job, but the Macintosh version doesn't have this feature. A second way is to export an EPS file out of the illustration package. Photoshop does a very good job of rasterizing EPS imports. However, on the PC side, standardization of the EPS format is very loose-meaning that you may get variable results depending on which illustration program you're using. The last way is to use a screen capture. This is the brute force method, but it does work if you can capture it in 24-bit mode. | |
I've created my buttons, but there are all these little discolored pixels around the edges. What caused them and what can I do to correct the problem? | |
The problem you are running into is that of anti-aliasing. When you create a line, circle, or any selection, the raster program tries to make your image look better by blurring the edges slightly. This blur occurs between the object and the background colors. If you lay the object on a new colored background, the anti-alias is between the old background and the object that creates discolored pixels on a new background. Take a look at Chapter 3 which describes in depth how to solve this problem in the paint program. | |
Are there any places I can get stock buttons that look great so I don't have to create them? | |
There are several companies that sell CD-ROMs with stock buttons on them, including companies such as Macromedia and Corel. Another good place to look is at the Yahoo! site. Do a search for buttons. |