A rchive Date
[ 30-05-2000 ]
Category
[ Information Technologies ]
sub-Categoy
[ Adobe ]
|
[Putting a new skin on your objects
by Greta Harrison
Version: 8
Platforms: Macintosh, Windows
September 1999
There's no shortage of interesting and innovative ways to manipulate images with Photoshop 5 and Illustrator 8. One cool effect is mapping patterns to an object's surface. You can create this effect in several ways, but in this article, we'll demonstrate how to generate a pattern from the image and then re-apply it to the object's form using Photoshop's Displace filter.
The advantage to this technique is that the pattern captures similar tones as well as the light direction on the original object. Besides enhancing the dimensionality of the effect, it also makes the final patterned object much easier to blend back into its original scene.
Making the pattern
To begin, choose an image with some dimension that won't be too difficult to separate from its background. We chose this stock image of a pear.
Because complex shapes aren't suited to this technique, choose a simple image. From this image, we'll generate the pattern.
Now open a new document in Illustrator. Then choose File > Place to bring in the desired image. While it's selected, choose Filter > Create > Object Mosaic. In the Number Of Tiles section, set Width to 30 and then click the Use Ratio button to automatically determine the proportional height. Next, make sure the Color option button and the Delete Raster check box are selected, and then click OK. Deselect the resulting mosaic, and then use the Direct Selection tool to remove any unimportant information like the background. We removed the leaf and stem as well, since they won't be included in the pattern.
Once you've completed that, select the mosaic and double-click on the Scale tool to bring up its dialog box. Scale the mosaic uniformly by 115 percent and then click OK. Now that the basic shape is a bit larger, transform it into a simple pattern by selecting every other square with the Direct Selection tool. Then choose Filter > Distort > Punk & Bloat. Adjust the slider until you get a desirable effect and then click OK. We maxed the slider out to the full 200% Bloat.
Next, use the Pencil tool to draw a rough outline around the pattern. As you draw around your object and approach the path origin, hold down the [option] key ([Alt] key in Windows) to close the path. Then fill the path with black, and choose Object > Arrange > Send To Back. With that, you've completed a simple pattern. Select the whole pattern and copy it to the Clipboard for the next steps.
Preparing the image
Now that you've finished the pattern, open Photoshop 5 and then open the image. Now paste the pattern from the Clipboard into a new Photoshop document. It will automatically appear on its own layer, Layer 1. To keep track of this workshop more effectively, rename this layer Pattern. Then make sure the pattern covers all the relevant parts of your object. You can do this quickly by adjusting the opacity of the Pattern layer until you can see your object underneath.
The next step is to separate the pear image from the white background. To do this, first select the Background layer and then use the Magic Wand tool to select the white in the background. Then choose Select > Inverse. This selects the image and deselects the background. Once the image is selected, copy and paste it. Photoshop automatically creates a new layer for the image and names it Layer 1. Rename this layer after your object--in this case, we renamed this layer Pear. The Pear layer should be under the Pattern layer. Now you can get rid of the pear image on the Background layer by selecting the Background layer and filling it with white. Make sure that the Foreground Color is white and then choose Edit > Fill. In the resulting Fill dialog box, leave the default settings and click OK. With the object and the background separate, we're ready to test how the pattern looks.
Note:
If the image you're working on has a more complex background, you may have to spend some time masking it out and selecting it. If you wish to place the pattern into the scene, don't delete the background by filling it with white.
Getting a preview
That part was easy, but now you need to conform the pattern to the pear's surface. To get a rough idea of what the pattern will look like, link the Pattern layer and the Pear layer and then choose [z]G ([Ctrl]G in Windows). Photoshop masks out any part of the pattern that isn't in the areas of the Pear layer that contain image data.
It's a good idea to do this just to make sure you like where your design is heading. In design, and especially in Photoshop, the devil is always in the details, and this project is no exception.
Making a contour map
Next, you need to create a displacement map to form the pattern to the pear's shape. This is a somewhat complicated process, so follow each step carefully. First, ungroup the layers by choosing Layer > Ungroup, then turn off the visibility of the Pattern layer. Next, choose File > Save A Copy and save a flattened copy of your image as Displacement.psd. Then, open Displacement.psd in Photoshop and convert it to grayscale by choosing Image > Mode > Grayscale. Now, use the Eraser tool to remove any parts of your image you don't want to contain the pattern. In our case, we removed the stem and most of the leaf.
Now that you have just the basic shape, choose Filter > Blur > Gaussian Blur. In the resulting dialog box, select the Preview check box. The blur settings you use will vary depending on the resolution of your image. You basically want your displacement map to be as blurry.
For an image at 300 dpi, use a Radius setting of 40 pixels, as we did. If your image has less resolution, then you'll need a lower setting. Once the image is blurred, save it.
As you can see, we're using the pear itself as a basis for the displacement map. The Displace filter distorts in the same direction every time, but you can adjust its effect. For a good result, the trick is to create soft areas of modulating tone. For additional information about the Displace filter, read "Image warp or asymmetrical deformation."
Image warp or asymmetrical deformation
Photoshop's Displace filter is a little strange. If you can visualize the filter as throwing a wet piece of fabric against an object, that wouldn't be too far off from what it actually does.
For this example, we have a symmetrical pattern and a symmetrical object. Our displacement map was also symmetrical, but you can see that the final displacement isn't. The displaced image always distorts in the same direction. The upper left of a displacement always contains all the loose ends. By creating a good displacement map, you can work with the nature of the filter and modify its effects.
The Displace filter alone doesn't really do a lot to add dimension to an object. Once the pattern is trimmed to fit, you don't see a lot of form enhancement.
The circle doesn't really look more spherical. That's why it's important to use patterns based on the original subject's lighting or create a pattern with light to dark modulation to really take advantage of the effect.
Contouring the pattern
In the original image, select the Pattern layer and turn its visibility back on. While it's selected, choose Filter > Distort > Displace. In the resulting Displace dialog box, match your settings.
You will, however, need to choose your own Vertical and Horizontal Scale settings to create the displacement that suits your particular image. Moderate settings seem to work best. For our image, we used 60% for both. (You'll probably want to experiment several times to see the different effects.) Now click OK.
Next, you're given the opportunity to select your displacement map. Choose your fuzzy image, Displacement.psd, and then click Open. The filter displaces the Pattern layer based on the map, but it probably won't be perfect. Figure J shows our resulting pattern displacement as well as a comparison of the pattern shape to the original pear.
This shows that we need to work on our displacement map a bit more. The pattern is conforming well to the pear's shape on the right, but is very distorted on the left. This is typical of the Displace filter. Press [z]Z ([Ctrl]Z in Windows) to undo the displacement. We'll correct the problem by making adjustments to the displacement map and then we'll try again.
Adjusting the map
Activate Displacement.psd and create a new layer. We need to extend the left side of the map to either push the distortion out of the way or alleviate it. With the Paintbrush tool, paint some black along the left edge of the pear to widen it a bit. Then use the same Gaussian Blur settings as before to give it the same fuzziness as the rest of the image. Save the image as Displacement2.psd. This time use Displacement2.psd when you apply the Displace filter. You should get different, and hopefully better, results. If you need to make further adjustments, just go back to Displacement.psd and try again.
That was the only adjustment we had to make to fit the pattern properly around the pear, but we still have messy edges. To trim them, [z]-click ([Ctrl]-click in Windows) on the Pear layer. This will automatically load the selection of the pear outline. Next, click on the Pattern layer and then choose Select > Inverse. Once the selection inverses, just press the [delete] key. Your pattern should fit like a charm.
Finishing up
The pattern is trimmed and in place, but you'll need to apply a few finishing touches to really clean up the image, such as erasing the portions of the pattern that cover the leaf. In this article, we gave you a method for mapping a pattern to the surface of an image, in this case, a pear. This technique can be used with a variety of patterns generated from Illustrator or Photoshop. The benefit of using Illustrator's Object Mosaic filter is that the pattern has similar lighting and tonality to the original subject.
Copyright © 1999, ZD Inc. All rights reserved. ZD Journals and the ZD Journals logo are trademarks of ZD Inc. Reproduction in whole or in part in any form or medium without express written permission of ZD Inc. is prohibited. All other product names and logos are trademarks or registered trademarks of their respective owners]
|