This may be one of the easier of my GAP tutorials to follow. Here is what we are making:
Frames ModifyOne of the features of this tutorial is you will be using the Frames Modify plug-in for GAP. I don't explain it during the tutorial, but the Frames Modify plug-in has a lot of features including allowing the user to modify a set of layers within either a set of frames or over the entire group of frames using various Gimp plug-ins. It has more features than just that, and is quite a useful part of GAP along with the Move Path plug-in.
PreliminariesCreate a nice working folder to save all of your image files that will be created during this tutorial. It's a good habit to always make a working folder for animation files created with GAP, since it can make a lot of them.
Grab
this script by saulgoode:
Right-click the above and select Save Link As or Save As (depending on the choices your browser offers) and save the script into your Gimp Scripts folder.
Finding Your Gimp Scripts FolderFrom a Gimp image window select:
Edit | PreferencesThis opens the Preferences Dialog window.
On the left side of the window will be a list of various items that you can select.
At the bottom of that list is a heading named
Folders.
Click on the little + or triangle icon beside the Folders name to expand that section.
Look below Folders and click on the Scripts listing.
Now on the right side of the window, you will see a section showing the Path or Paths to your Scripts folder(s).
Normally you want to place your scripts into the Scripts folder located inside your personal
.gimp-2.6 folder if you have a choice of more than one Scripts folder.
Refresh ScriptsFrom a Gimp image window, select:
Filters | Script-Fu | Refresh ScriptsA Pattern Image FileGrab this image and open it in Gimp:
Here is the link in case you prefer to download it in Gimp:
Once you have the image opened, select:
Edit | CopyThat will place a copy of the image on your clipboard
Open your Patterns Dialog window by selecting from a Gimp image window:
Windows | Dockable Dialogs | PatternsIf you look in the upper left corner of your Patterns Dialog window, you will see an icon showing the copy of the image above that you copy/pasted in Gimp:
Let's Begin1.)
Open a new 400x400 image window.
2.) Drag the red-and-white pattern from the upper left corner of your Patterns Dialog window on to your 400x400 image.
You should now have this:
3.) Add an Alpha Channel to your Background Layer in that image by selecting:
Layers | Transparency | Add Alpha Channelor simply right-click on the Background Layer in the Layers Dialog window and select:
Add Alpha Channel
This adds transparency to the layer.
4.) Save your 400x400 image as
background_000001.xcf into your working folder.
5.) From the background_000001.xcf image window, select:
Video | Duplicate Frames5a.) As the above image shows,
set N times to 30. From Frame and To Frame remain at 1.
5b.)
Click OK.
Gimp has now created 30 additional copies of background_000001.xcf and placed them in your working folder. You will only see the background_000001.xcf frame though.
6.) Again from the background_000001.xcf window select:
Video | Frames Modify6a.) Notice the
Function button in the upper left corner. Click on it and select:
Apply filter on layers6b.)
Click OK.
7.) The Filter Selection Dialog will open:
7a.) As shown above select:
plug-in-map-object7b.) Then click the
Apply Varying button.
8.)
This opens the first instance of Map Object. Here we will provide GAP with the settings for our first frame:
8a.) In the
Options Tab:
Make sure you have selected
Cylinder as the Map To type and
Transparent Background selected as shown above.
8b.) In the
Cylinder Tab:
Set Radius to 0.10
Set Length to 0.65Do not worry about setting Top and Bottom. You can leave those alone.
8c.) In the Orientation Tab:
Position Values are:
X: 0.50000
Y: 0.60000
Z: 0.00000
Rotation Values are:
X: 0.0
Y: -180.00 (that's minus 180.0)
Z: 0.0
No need to worry about any other Tabs.
8d.) Click
OK.
9.) A little window will open:
Click Continue10.)
This will open the second instance of Map Object. Here we supply GAP with the settings of our final animation frame:
10a.) In the
Orientation Tab:
The only change you need to apply is to
make Y 180.0.
10b.) Click OK.
11.) You will get a second little Continuation Dialog window open:
Click Continue.Now GAP goes to work calculating the rotation value for each of the in between animation frames. Depending on your processor speed, this could take a minute or so, or several minutes.
When it finishes processing, select:
12.)
Video | Frames to Image12a.) As shown in the image above, in the
Layer Basename section,
change (41ms) to (100ms)
12b.) Then
click OK.
This will create a nice multilayered image.
13.) In the new image that is created, try playing back the animation by selecting:
Filters | Animation | Playback13a.) You will notice a slight pause in the animation. That is because for the first (bottom) and last (top) layers the cylinder is at the same rotation position. In the Map Object window, the first layer Y value was at -180.0 and the last frame Y value was set at 180.0. Geometrically those two values are the same. (Also the range from -180.0 degrees to 180.0 degrees is 360 degrees or one full rotation)
14.) In the Layers Dialog window, delete either the bottom or the top layer of the multi-layered image to fix the slight pause in the animation.
15.) Run
Filters | Animation | Playback and the object should have a nice smooth rotation now.
16.) From the Layers Dialog window, select the bottom Layer of the multi-layered image.
16a.) Either click on the New Layer icon at the bottom left of the Layers Dialog window or from the image window select:
Layer | New Layer16b.)
Accept the default settings to create a transparent layer in the New Layer dialog window and
click OK.
17.) Move the New transparent layer to the bottom of the stack of layers in the Layers Dialog window.
18.) Bucket Fill that layer with color white.
19.) If you properly installed saulgoode's script mentioned at the beginning of this tutorial, select:
Filters | Animation | Combine BackgroundThis will add a background (only white in this case) behind each of the animation layers.
20.) After running the script delete the bottom white layer.
21.) Save the multi-layered image as an animated GIF by selecting:
File | Save As21a.) Then select a name for your file: some_name.gif and Click on the SAVE button.
21b.) Make sure when the Export Dialog window opens that you select:
Save As AnimationOtherwise Gimp will combine all of the layers into one and save it as a standard GIF image rather than an animation.
21c.)
Click Export.
21d.) Another window opens, and you can accept the defaults there and just click OK (or SAVE perhaps).
Your animated GIF is now saved.
Here is a sample of applying a center picture (similar to the approach in PhotoMaster's Christmas Ornament tutorial) to a simple background, and then converting to a spinning cylinder via GAP:
Thanks for checking out this tutorial.