Tutorial to generate an animated fluttering flag
Purpose
Taking the image on the left, we will generate the image on the right using the Gimp and the script 'fluttering flag'.
Download
Link to the
download page of the script 'fluttering flag'. The script is available in english, french and german.
Gimp-Tutorial
1
1.1. Open an image of an ordinary flag with The Gimp. It should be just that, an image of a flag, no mast, no border, nothing else. The file to be opened can be a png file, a gif file or a jpg file.
1.2. Go to the menu
Script-fu / Animators / fluttering flag...
and click on the words 'fluttering flag'
2
Select the parameters you want or just stick to the default values for a first try.
2.1.
The parameter 'Number of layers' can be chosen in the range from 4 up to 32. The default value is 8. It is the number of different individual images that will compose your animation. It is recommended to use the default value. Smaller values may produce a shaky animation. Bigger values may produce a softer animation but also huge gif files that would not be adequate for a publication on the web.
2.2.
The parameter 'Ripple' can be chosen in the range from 5 up to 150. The default value is 30. A low ripple parameter gives a quite waveless flag, a high ripple parameter gives a very wavy flag.
2.3.
The parameter 'Wind' can be chosen in the range from 1 up to 9. The default value is 5. The parameter 'Wind' affects the amplitude of the movement.
2.4.
The parameter 'Form factor' can be chosen in the range from 1 up to 400. The default value is 5. The parameter 'Form factor' affects the general shape of the deformations produced by the wind. The form factor can be a random number or a specific number. Some form factors produce better animations than others. Fine vertical dark lines may be created with some form factors, just avoid them. Recommended values among others are: 5, 14, 134, 199. If you do find a specially good form factor, please let me know.
2.5. to 2.7.
The 3 color fields should be self-explanatory, at least I hope so.
2.8.
The check box 'Ignore form factor' allows the form factor to be defined as a random number by the script. If checked, the value in the field 'form factor' above is ignored.
2.9.
The check box 'Ignore sky color' allows the generation of an animation with a transparent background. If checked, the color of the sky in the field above is ignored.
2.10.
The check box "irregular shape" is only to be used with flags that do not have a rectangular or square shape, like e.g. the flag of Nepal. That allows white areas that reach the edge of the image to be treated as transparent. Such treatment will not be adequate for "regular" flags like Canada, US, Mexico, France, UK, NL, Luxembourg, Italy, etc... which contain white fields reaching the edges. Thus do not check the box "irregular shape" with rectangular flags.
See
examples of fluttering flags with transparent backgrounds and/or irregular shape.
3
3.1. This is what you see after running the script 'fluttering flag'. It is not yet an animation, but just a stack of 8 layers, containing images that are slightly different from each other. Now you must save this stack as a gif file.
3.2. Go to the menu
File / Save as...
. Choose a folder and a file name for your file. The file name must be ending with the extension '
.gif
' . Two dialog boxes will pop up after clicking 'ok'. They are detailed further down.
4
This is the 1st dialog box popping up when saving the gif file.
4.1. Click on the radio button '
Save as animation
'. Then click on '
Export
'
5
This is the 2nd dialog box popping up when saving the gif file.
5.1. Click on the check box '
Loop forever
'.
5.2. Set the delay between frames to 20 milliseconds.
5.3. In the field 'Frame disposal', select '
One frame per layer
'. Then click on 'Ok'
6
Watching the running animation
You will not be able to see the running animation inside the Gimp. Once your work is saved as a gif file, you can see the running animation with many and most image viewers. (e.g. Gwenview with Linux, Irfanview with Windoze). You can also see the running animation if you open the gif file with an internet browser. I prefer using image viewers for that, but if you don't have one, a browser can do it too.
New : With The Gimp version 2.4.0, it is possible to watch the running animation inside The Gimp through the menu
Filters / Animation / Playback
.
Download
Link to the
download page of the script 'fluttering flag'. The script is available in english, french and german.