More Related Stories

Tutorial: Page (1) of 1 - 08/03/06 Email this story to a friend. email article Print this page (Article printing at MyDmn.com).print page
Waving the Flag in Adobe Photoshop Creating soft fabric effects with displacement maps By Dave Nagel We've looked at displacement effects in Adobe Photoshop for creating effects like crumpled paper and water reflections. This time around, we'll look at it from another angle: creating billowing fabric, like a flag waving in the wind. And we'll also take a look at some compositing tricks to make the effect a bit more convincing.
 
Something along these lines.



Preparation
This tutorial will involve the creation of two separate images. The first is, of course, the fabric object to which you want to apply the billowing effect--in my case, a flag. The second is an image that will be used as a displacement map. You won't need anything else (except a little skill and a copy of Photoshop--pretty much any version) to complete this tutorial.

The main (flag) image
Presumably you already have a flag or piece of fabric that you've created in Photoshop. It's beyond the scope of this article to get into the creation of a graphic element like that.

Here's the base element Ill be using, which I created in Photoshop for this purpose. It's basically just a rectangle with a little texturing and some stars and stripes composited onto it.



Whatever type of element you're using, there are two things you need to keep in mind:

1. Make certain that the flag (or fabric) object consists of a single layer with no layer effects applied to it. If you're using multiple layers, merge them into a single layer. (But don't flatten the image.) If you have layer effects applied, rasterize them (Layer > Layer Style > Create Layers), and then merge the resulting layers together.

2. You need to create space on your canvas around your flag. If any part of the flag is touching the edge of the canvas when you apply the displacement effect, it will look terrible. So maybe make your canvas twice the size of the flag object you're using, and center the flag in the canvas, as in m example above. (I happen to have a white background on a separate layer to make it easier for you to see.)

The displacement image
Now we'll create the image that will be used for displacement, trying to keep it as simple as possible for now.

To begin, create a new document that's about twice the dimensions of your flag image. You need lots of room to wrk with in order to pull off this effect. If the displacement image is too small, you'll get poor results in the end. So make it nice and large.

In my case, the flag n my image is 415 x 249 pixels. I'm making my displacement image 830 x 830.

Now, for the first attempt at displacement, we're simply going to use a gradient map. (We'll look at more complex displacement maps in the second part of this tutorial.) To create a gradient map in your displacement image, choose Layer > New Fill Layer > Gradient Fill.

This dialog will pop up.



To create a custom gradient, click on the currently selected gradient--not the pul-down menu, but the picture of the gradient itself. That will call up the Gradient Editor dialog.



Now you can add stops and shift around colors in order to make something like this.



Essentially you want to create an undulating pattern of blacks, whites and grays. This is what will be used to create the ripples--or "billowing"--in the flag image. Keep the undulations fairly tight, but space them a bit unevenly.

If you need help working with the Gradient Editor, I have a separate tutorial on that, which you can read by clicking here.

Here's my resulting gradient image. Feel free to try variations on this to achieve the results you want.



Now save your gradient image. It's critical that, whenever you apply the displacement effect to your flag, you have the currently saved version of your gradient available to you. If you make changes to the gradient and attempt to apply a new displacement, the changes will not be seen in the displacement until the changes to the gradient have been saved.

Got that?

You will.


Compositing the gradient
Now, before we get to the actual displacement/billowing of the flag, we're going to do a little compositing trick. This will help add shadows and highlights to the billows in the material, thus making a ore convincing effect.

In your displacement image, select all. Then type Shift-Command-C (Mac) or Shift-Control-C (Windows) to copy the pixels in your displacement image. (A regular copy won't work right for this purpose. You need to hold down the Shift key.)

Now go over to your flag image, and paste in the pixels (Command-V).

Now go over to your flag image and paste the gradient onto a new layer directly above the flag layer.



Then, with the gradient layer selected, choose Layer > Create Clipping Mask (or something similar to that, depending on your version of Photoshop).

This happens.



Now go to the Layers palette and set the gradient layer's Blend Mode to "Soft Light."

Neat.



You can increase or decrease the brightness/contrast of the gradient layer to affect the strength of the highlights and shadows you've created, if desired.

And voila!



Now we're almost ready for the displacement.

Skewing the flag
Now, you might want to put your flag at a slight angle when you create this effect to simulate the look of a flag hanging from a pole.

To do this, select your flag layer in the Layers palette. Then choose Edit > Free Transform.

For my example, I'll set the H skew to 25 and then set the rotation to 25 degrees to match it. (You can set these values numerically up in the top Tool Options bar.)



Now aren't you glad you made your canvas so big?

All right. Now we're ready to displace.

The final displacement effect
And now, at last, we arrive at the displacement. To apply this effect, choose Filter > Distort > Displace.

A filter dialog will pop up. For starters, use these settings. (Definitely use "Tile," rather than "Scale.")



After you hit "OK," a new dialog will pop up asking you to select your displacement map. Choose the gradient image you created earlier.

And here's the result.



Now you can go back to your gradient image and experiment with different gradients to get exactly the look you're after. Here's a version with variations on the gradient map, the shading and the vertical value used in the Displace filter.

Next time around, we'll look at methods for adding in more complex undulations, including horizontal and diagonal ripples. If you have any questions in the meantime, be sure to visit me in the Adobe Photoshop forum at DMN Forums by clicking here.


If you liked this article click here to recommend it.    Page: 1

Contact the author: David Nagel is the editor and producer of Creative Mac and Digital Media Designer; host of several World Wide User Groups, including Synthetik Studio Artist, Adobe Photoshop, Apple DVD Studio Pro, Mac OS, Adobe Illustrator, Adobe InDesign, Corel Painter, Creative Mac and Digital Media Designer; and executive producer of the Digital Media Net family of publications. You can reach him at [email protected].
Related Sites: Creative Mac ,   Digital Producer ,   Audio Video Producer ,   Corporate Media News ,   Digital Media Designer ,   Oceania ,   MacDesignPro
Related Newsletter: DMN Newsletter ,   Pixels Newsletter ,   Mac Alert Newsletter ,   Digital Media Net ,   DMNForums ,   Tutorial Finder
To Comment on This Article, Click HERE

Most Recent Reader Comments:
  • Re: Waving the Flag in Adobe Photoshop by Ram1 at Aug. 12, 2006 10:54 pm gmt
  • Re: Animating Flag by Srinivas M R at Sep. 11, 2006 11:31 am gmt
  • Re: Waving the Flag in Adobe Photoshop by Srinivas M R at Sep. 05, 2006 4:45 am gmt
  • Waving the Flag in Adobe Photoshop by DMN Editorial at Aug. 03, 2006 11:31 pm gmt

    Click Here To Read All Posts
    Must be Registered to Respond (Free Registration!!!, CLICK HERE)
  • Kingston DataTraveler Elite
    Kingston Data Traveler Elite - USB flash drive - 4 GB (Rated by 0 users)
    Protect your important and sensitive data on Windows-based systems with the 4 GB DataTraveler Elite USB 2.0 Flash Drive from Kingston.
    Price Range $189 to $440View Details Related Items

    Hewlett Packard: $239.76
    Super Warehouse: $221.99
    Buy.com: $211.82
    Kingston 2 GB DataTraveler Elite USB 2.0 Flash Drive (Rated by 4 users)
    Protect your important and sensitive data on Windows-based systems with the DataTraveler Elite USB 2.0 Flash Drive from Kingston.
    Price Range $88 to $116View Details Related Items

    Hewlett Packard: $98.78
    DellBusiness: $116.05
    Buy.com: $94.33
    Kingston 1 GB DataTraveler Elite USB 2.0 Flash Drive (Rated by 3 users)
    Protect your important and sensitive data on Windows-based systems with the 1 GB DataTraveler Elite USB 2.0 Flash Drive from Kingston.
    Price Range $49 to $130View Details Related Items

    PCNation: $61.44
    Hewlett Packard: $49.88
    DellBusiness: $65.65
    Kingston 4 GB DataTraveler Elite USB 2.0 Flash Drive - Privacy Edition (Rated by 0 users)
    Protect your important and sensitive data with the 4 GB Elite - Privacy Edition USB 2.0 Flash Drive from It features on-the-fly, 128-bit AES hardware-based encryption of all data.
    Price Range $224 to $311View Details Related Items

    Buy.com: $260.98
    Hewlett Packard: $291.40
    DellBusiness: $298.75
    Kingston 256-MB USB flash drive DataTraveler Elite (Rated by 7 users)
    Protect your important and sensitive data on Windows-based systems with the 256 MB DataTraveler Elite USB 2.0 Flash Drive from Designed to utilize the high bandwidth of the USB ...
    Price Range $27 to $40View Details Related Items

    Buy.com: $36.95
    Super Warehouse: $29.99
    Hewlett Packard: $31.96
    Kingston Data Traveler Elite 512MB USB2.0 USB Flash Drive (Rated by 4 users)
    Kingston Data Traveler Elite 512MB USB2.0 USB Flash Drive is a leading-edge solution for business and corporate IT users.
    Price Range $29 to $75View Details Related Items

    Hewlett Packard: $34.70
    AtomicPark.com: $42.04
    Buy.com: $36.26
    HOT THREADS on DMN Forums
    Page Title can't change using Dreamweaver Template Pages?!? (1) • by blueStupa on the on the Web Design forum Mac vs PC color difference??? (1) • by Mark Griesbauer on the on the Adobe Photoshop forum **Professionally Trained Composer**  • by Mike Watts on the on the Demo Reels forum [FORUM NEWS] ONE DAY SALES (OCTOBER 23-27) LIMITED  • by Ko on the on the Plugin Central forum Adobe Photoshop Style Layer Tutorial  • by videxpertise on the on the Adobe Photoshop forum Object lable badly formatted  • by awilks on the on the Adobe Illustrator forum Thoughts on the Adobe Version of Dreamweaver?  • by blueStupa on the on the Macromedia Dreamweaver forum
    Marketplace
    Laptop LCD Screen
    Replacement laptop screens for your high resolution graphics needs! We carry high resolution LCD screens for all brands including, Apple, Compaq, Dell, IBM, HP, Sony, Gateway,...
    Free CorelDraw Graphics Suite X3
    Get the CorelDraw Graphics Suite X3 for free when you complete sponsor's survey!
    Free DigiMemo Digital Notepad
    Digitally capture and store handwritten notes for free! survey required
    Get your Designs noticed
    Stand out from the crowd. Place your design onto a professional looking CD or DVD. Primera offers CD-DVD Printers and disc duplicators to help you get your design out there.
    Laptop Screen
    We stock laptop LCD screens for all brands of notebooks including Dell, IBM, Compaq, Sony, Toshiba, Gateway, HP and more. We have thousands of laptop screens to fulfill your L...
    CD Ripping Service, iPod Loading Service
    We take cd collections and turn them into digital music for MP3 players and music servers. Quick turn around and professional service. Price includes shipping and insurance. ...
    Buy a Link Now!
    © Copyright, 2006 Digital Media Online, All Rights Reserved