Read an Excerpt
Chapter 11: Creating Backgrounds, Patterns, Brushes, Textures, and Frames
11.1 How do I...
Create a seamless background?
I have created backgrounds, and they look fine, but the edges don't blend well if I use them as fills or Web page backgrounds. How can I be sure that my backgrounds will repeat and blend well?
Creating a seamless pattern (for backgrounds, textures, patterns, or brushes) helps the image pattern repeat without being noticeable. If it doesn't repeat seamlessly, it will look like wallpaper that is badly aligned, with noticeable breaks and inconsistencies at the seams. The trick is to make sure the edges on the right of the pattern match with the edges on the left, and that the top of the pattern matches and blends with the bottom. Depending on how you make the pattern, there might be more than one option for getting the blends to work. Several ideas are explored in the following example and comments.
Making a repeating pattern is difficult or impossible if you try and do it by eye, but it is far easier if you know how to use the proper Photoshop technique. When creating a pixel-based seamless pattern (these differ from the vector patterns looked at in section 11.3), use the Offset filter (Filter, Other, Offset) to shift the image vertically and horizontally to check and repair the seam. Offset makes the seams of the pattern apparent in a workable image area (rather than at the opposite edges of the image as they would be normally). By shifting the seams into the work area using the Offset, you can blend and correct what is wrong. Another workaround to help make seamless patterns follows in the comments on using a vector-based technique. Neither case exhausts the possibilities for creating patterns or for working with these two effective tools.
1. Create a new document. Alter the dimension and ppi depending on the resolution you are working at and the intended size of the pattern/texture or tiling background.
2. Create the rough of your pattern, texture, or background. You can do this by using multiple applications of filters, freehand drawings, and parts of pictures - any number of combinations is possible. (For an example, see Figure 11.1.)
The following examples (Figures 11.5 through 11.13) set out with the express purpose of creating a recognizable cinderblock pattern. A combination of determined steps was used to meet the goal. First, the basic texture for the blocks was established using filters to make a cinderblock surface texture (Pointillize and Craquelure). Then the texture was saved and applied to the document using Texturizer (See Figure 11.5). Next, the basic mortar pattern was sketched with the Pen tool (see Figure 11.6). Using the pen sketch, the mortar was created and given depth and shadow using channel manipulations, path strokes, and the Emboss filter. To create the mortar, the paths were stroked with the Smudge tool and lightened to stand off better from the cinder block. And finally noise was added to restore a finely gritty, mortar-like finish (see Figures 11.7 through 11.13). Using 11CDfig01 from the CD-ROM, apply the action titled "Mortar from a Path." This takes you through the exact steps of creating the mortar. If you are interested in the settings for the steps, open the setting steps in the Actions palette after the action has been loaded. You can read the settings from the Actions palette or place stops for the steps and run the action; when you do this, the dialog boxes appear as they are encountered in the action with the settings that were used.
3. Offset the pattern (Filter, Other, Offset) to check how the edges match and show where repairs or blending are needed. Be sure to check the Undefined Areas in the dialog box to Wrap Around before executing the Offset. This makes the pixels that exit to the right and bottom re-enter on the left and lop respectively.
When setting the number of pixels to offset, use a number that will make the offset apparent and easy to find. For example, if you work on an image that is 5-inch x 5-inch at 300ppi, you might offset by 300 pixels (1 inch) in both directions. This places the seam along the inch marker on the ruler and leaves plenty of room to either side of the seam to make corrections.
4. Make the necessary corrections to blend the image seams. This is usually easiest to do with the Stamping tool and a soft brush. It is best not to make the blend in one sample. Like making dust corrections (see section 8.1), it is best to sample, move, and sample again to avoid creating noticeable patterns. You might have to apply other image repair techniques from Chapter 8, "Cleaning, Repairing, and Altering Images," as well.
In the sample image, it was quicker to borrow the mortar from the second row and lay it over the existing mortar in the first row than to rebuild it. The discrepancy was probably a result of not using snap-to guides at 1600% magnification (see the note following Figure 11.20). A selection was made from the mortar in the second row using the Marquee tool; then the mortar was cut and pasted to the image two times. After placing the mortar roughly with the Movement tool, the individual layers were adjusted with the skew to make the mortar match at the top and bottom. The edges were blended in with the Eraser using a soft brush, and the Stamping tool was used to clone over and blend the other parts of the seams. Check out the corrections in 11CDfig02 on the CD-ROM by switching off the background layer. Figure 11.16 shows the results of the corrections for the offset.
5. After correction, offset the image one more time (the same distance as offset in step 3). Spot check the image areas between where the arrows are pointing in Figure 11.15. The offset should leave only two points that might need correction - where the seam crossed the edge of the image after the offset.
6. Make any necessary corrections as per observations in step 5.
7. After making the corrections, save the image. The sample image was saved in PSD format for future use and corrections, and then it was saved as a CompuServe GIF to use as a Web page background. Figure 11.17 shows the result of loading the cinderblock pattern that was created into a Web browser to see it in your own browser, load HTML 2 from the HTML folder on the CD-ROM....