Jump to content

Creating an Animated Waving Flag!


Recommended Posts

This tutorial extends http://forums.getpaint.net/index.php?/topic/12895-create-a-waving-flag-using-displacement/

What you will need:

Paint.NET (self-evident)

Displacement and Alpha Mask - plug-in

'UnFREEz' - GIF-animator

This tutorial explains, how to change this


into that:


Interested? Then the follow the tutorial carefully, for the tiniest mistake returns noticeable roughness (you know what I mean ;) )

For we want the flag to wave forever, we need a mask for alpha displacement, that can be moved without interrupting the pattern. We want the flag to wave in horizontal movements, so the displacement mask must be panoramic. Let's make it!

Making the displacement mask:

Hidden Content:
First of all, you need to decide, how big you want the flag to be. I like 600x400 best. So we make a new 600pix wide times 400pix high image.


Then, in order to make the pattern appear random, we render clouds, all default values. Now comes the tricky part: we want it to be panoramic:

We select the whole picture (Ctrl. + A), and copy it (Ctrl. + C). Then we go to Image - :ExpandCanvas: Canvas Size (Ctrl. + Shift + R), uncheck 'Maintain aspect ratio', double the width (here: 1200), and set the Anchor to 'Right'.


Now click 'OK', or simply press 'Enter'. Then we paste the image (Ctrl. + V)

Next, we go to Layers - :RotateZoom: Rotate/Zoom (Ctrl. + Shift + Z), click 'Reset All', check 'Tiling', and set 'X Pan' to '0.500'.


Press Enter and apply :GaussianBlur: 'Gaussian Blur' at Radius '40'.


Now, go to :ExpandCanvas: Canvas Size, halve the width (here: 600), and set the Anchor to 'Middle'.


Go to Adjustments - :BrightnessContrast: Brightness/Contrast, set Brightness to '0' and Contrast to '40'.


Create somewhere on your computer a new folder. Save this image there as '01.png'.

Then, go to :RotateZoom: Rotate/Zoom, click 'Reset All', make sure 'Tiling' is still checked, and set 'X Pan' to '0.100'.


Press Enter. Press 'Ctrl. + Shift + S'. Save this image as '02.png' in the same folder.

Press 'Ctrl. + Shift + Z'. Press Enter. Press 'Ctrl. + Shift + S'. Save this picture as '03.png'. repeat this until you have saved the image '20.png'. And you've got all displacement masks!


Making the actual flag (though based on the displacement masks):

Hidden Content:
Now, download or save or whatever but simply open a flag with Paint.NET. :Resize: Resize it to your mask's dimensions (here: 600x400). If you're having trouble doing this, make sure 'Maintain aspect ratio' is unchecked.


Next, :Resize: resize the image to 90% of its size.


Set the transparency alpha of your secondary color to '0' and :ExpandCanvas: expand the canvas of your image to the mask's dimensions (here (once again): 600x400).


Save that image as 'FlagTemplate.png' or something like that, main thing is you can find and open it and that you know what it is.

Now comes a repetitive procedure. I'll only explain it once, so read very carefully:

Open your FlagTemplate. Run the 'Alpha-Displacement'-effect as following:

For the Mask File, browse '01.png'.

Check the checkbox for 'Displacement on'.

Set the X and Y values to '12'.


Click 'OK'.

:ImportLayers: Import another layer from a file. That file should be the mask you applied to the FlagTemplate, here '01.png'. Go to this newly imported :Properties: layer's properties (F4), set the Blending mode to 'Multiply' and the opacity to '128'.


Next, select the :MagicWandTool: 'Magic Wand'-tool, set the Tolerance to '50' or less and go to the layer of the distorted flag.

Click somewhere on the transparent area around the flag.


Without changing the selection, go to the other layer (of the shadows, actually) and hit 'Del'-ete.

Make a new folder in the folder of your masks (named 'Flags' or sth. like that) and save this image as '01.GIF'. The format is very important. Don't mind flattening.

Now, repeat that part, the only difference is that you won't be using the mask '01.png', but '02.png', and you will save the resulting flag as '02.gif', do that until that folder looks like that (you must have '20.gif'):



Hidden Content:
Having done the repetitive part, open the folder of the Flag-GIFs in Explorer, open UnFREEz, and drag the files form the Flags-folder in the right order to the GIF-animating program. Set the frame delay to '9 cs' and then, click 'Make Animated GIF'.


Save it somewhere you'll find it. Open the animated GIF in a browser. I recommend Firefox: I have tried opening the same animation in IE7, IE8, Safari and Firefox, and in the latter, it simply works best.

Thanks for reading!

Edited by Ego Eram Reputo
Updated links
Link to comment
Share on other sites

No cursing, not even if you censor it.


The Doctor: There was a goblin, or a trickster, or a warrior... A nameless, terrible thing, soaked in the blood of a billion galaxies. The most feared being in all the cosmos. And nothing could stop it, or hold it, or reason with it. One day it would just drop out of the sky and tear down your world.
Amy: But how did it end up in there?
The Doctor: You know fairy tales. A good wizard tricked it.
River Song: I hate good wizards in fairy tales; they always turn out to be him.

Link to comment
Share on other sites

  • 1 month later...
  • 2 weeks later...
  • 1 month later...

This is truly an epic tutorial!! Great job. There needs to be more tutorials that have this quality, and more people like you to post them!

Just a suggestion, at the step where you need to select and delete the excess background. After the background is deleted. run an anti-alias or a tiny tiny feather on the edge of the flag to make it look a bit smoother.


My Humble Gallery

Astronomy Fans group on facebook

I see things, I'm an astronomer

Link to comment
Share on other sites

Are you sure about that? http://www.getpaint.net/search.html + "antialias" picks up at least two plugins.

Link to comment
Share on other sites

  • 6 months later...
  • 5 months later...

I finally figured it out.but cannot post my result.says I can't post it for some reason.do you know why?Weird it's worked now.lol Went wrong at first because(control+shift+Z)wasn't working.Good tut,bye the way.boltbait.smile.pngcityflag4.gif

Edited by ipswichmanc





Link to comment
Share on other sites

  • 10 months later...
  • 2 months later...

What I really like about your flag is that the ripples/waves in the animation is more real than what you find in most types of animated waving flags. A majority of what I often see, the waves go the entire height of the flag whereas your method does not, which is a bit more realistic to when you watch a real flag wave (the winds just don't work that way).

Link to comment
Share on other sites

  • 8 months later...

4a3b2deb.pngSOB links broken on noted:

looked in "search" but no joy. any alternatives you can suggest?

Creating an Animated Waving Flag!

Started by

arik-so, Jul 16 2009 04:52 AM

This tutorial extends ('Create a Waving Flag using Displacement').pointing2.pnglink broken

What you will need:

Paint.NET (self-evident)

'Alpha-Displacement' - plug-in pointing2.pnglink broken

'UnFREEz' - GIF-animator = link works

Edited by Scooter


  Age is only  a number --in my case a Really BIG number, but there you have it

When the prefect paint.net image is created, I will still be wondering "How they Do that?"- sigh☺️


Link to comment
Share on other sites

  • 1 year later...

No you're not.  The images appear to be broken.


Let's see if anyone has the desire to rebuild this tutorial.  Open to offers.....

Link to comment
Share on other sites

  • 1 year later...
  • 11 months later...
  • Create New...