arik-so

Creating an Animated Waving Flag!

Recommended Posts

arik-so    1

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

usa.png

into that:

usag.gif

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.

79693035.png

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'.

10231567.png

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'.

31023488.png

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

68143573.png

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

31491875.png

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

55061344.png

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'.

82065072.png

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!

47033903.png

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.

49584903.png

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

93479621.png

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).

30877422.png

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'.

87386258.png

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'.

17696394.png

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.

93343858.png

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'):

93297058.png

Animating:

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'.

46909994.png

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

Share this post


Link to post
Share on other sites
RHoward    0

cool....I will try it (Eventually). All these tutorials will destroy my computer...one by one, with all the plugins i need to download...

Share this post


Link to post
Share on other sites
arik-so    1

Thanks.

And it's just one plug-in you need to download for this one: Alpha-Displacement.

And UnFREEz is hardly more than 2MB. (I think ^^ might be 200 kb (10 times less))

Share this post


Link to post
Share on other sites
mcamp14    0

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.

Share this post


Link to post
Share on other sites
arik-so    1

Thanks. And yes, you're right. What a pity it is, by the way, that the Paint.NET team hasn't made an own antialias plugin yet. It's one of the most essential tools to smooth images. But the feather plug-in is okay^^

Share this post


Link to post
Share on other sites
arik-so    1

What I meant, it's not built-in. And, it's not perfect. I find the feather plug-in better.

By the way: does nobody want to actually try out this tutorial? I quite hope the result would be worth it.

Share this post


Link to post
Share on other sites
ipswichmanc    0

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

Share this post


Link to post
Share on other sites
gregors    0

To make it look even more like wind blowing a flag i would suggest putting some vertical (or almost vertical) distortion on the cloud image before (or maybe after) blurring it.

Share this post


Link to post
Share on other sites
jim100361    61

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).

Share this post


Link to post
Share on other sites
Scooter    117

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

Share this post


Link to post
Share on other sites
Ego Eram Reputo    1,684

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.....

Share this post


Link to post
Share on other sites
doughty    224

I've got a screen capture of the tutorial with all the hide buttons open. All the pictures are there.

Edited by doughty

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now