A simple spinning circle.
[highlight]Many thanks to ClayOgre for pointing out the need to begin with a larger image and then scale it down to get the final animation shown above. Originally, I started with a smaller base image, and the resulting animation was both oscillating and rotating, which was not the intended result.[/highlight] :w:
From the main gimp window select:
File | New and create a new image with dimensions 1200px width and 1200px height
Then create a New Transparent Layer either from the Layers dialog window or by selecting:
Layer | New Layer
Click OK in the New Layer window that opens.
Select the Ellipse Selection Tool and from the Ellipse Select dialog window set your ellipse selection to a Fixed Size of 600px Width and 600px Height.
Drag a Guide from the ruler on the left side of your image to the 600px mark on the top ruler (which is the middle of your image). Follow that by dragging a Guide from the ruler at the top of your image down to the 600px mark on the left side ruler. [highlight]Alternately, you can also set up Guides by selecting[/highlight]:
Image | Guides | New Guide and set a Guide in the Horizontal direction at 600px
Press OK
Follow that by again selecting:
Image | Guides | New Guide
Then choosing a value of 600 but select Vertical for the direction from the drop down box:
Click OK. Your image now has a vertical and a horizontal guide interesecting at the center of the image:
[highlight]Make sure that your New Layer is selected in the Layers dialog window[/highlight].
With your Ellipse Select tool selected, click on your image window at the point where the guide lines intersect, but do not move your mouse yet. After clicking on that spot, hold down your mouse button and then press CTRL-SHIFT together then drag your mouse outward and you will get a circle selection that is nicely centered in your image window. Then you can release the CTRL-SHIFT keys and your mouse button.
[highlight]Centering objects in their respective image window is very important for positioning them on the new background for your animation.[/highlight]
Select a Foreground Color of 1427ba (blue color) and fill the selection. If we were to rotate this plain blue circle, it would appear to just stand still. So we will make half of it lighter blue so we can observe the rotation.
With your selection still active select the Rectangle Selection Tool:
Set your Rectangle Select tool to Subtract from the Current Selection:
Start your Rectangle Selection near the top left corner of the image and drag it down towards the lower left corner of the image and then over to the Vertical Guide at 600. This will divide the circular selection in half:
I have placed a letter A in the image above to show which side of the circle will remain selected after the Rectangle Select tool was used.
Fill that selection with a lighter blue color 16cae6. Then do:
Select | None
Remove your Guides either by clicking on the Move tool and selecting each guide and moving them back to their respective rulers, or select:
Image | Guides | Remove all Guides
This is what our image will look like:
So we now have a nice centered circle on it's own layer.
From the main gimp window select:
File | New
Again make a 1200x1200px image.
In the new image window just created, select:
File | Save As
And save this image in a new working folder with the name background_000001.xcf
In background_000001.xcf select:
Video | Duplicate Frames
We are making a 30 frame animation. We already have one frame, background_000001.xcf. We need 29 more so therefore set N times to 29 then click OK.
Then select:
Video | Move Path
In the window that opens check the Instant Apply box (A).
For Source Image/Layer (B) select your blue circle layer from the drop down menu if it is not selected. Do not worry if the full name of your Source Image/Layer is not the same as mine. As long as you have the correct layer selected. (Just click the little arrow to at the right side of the red-outlined box shown above to select your New Layer layer if necessary.)
Stepmode (C) set to None.
Handle (D) set to Center
For the X and Y values (E) set X to 600 and Y to 600 (which is the center of the background_000001.xcf image)
In GAP, to animate an object, you use Points, which are basically keyframes. When you start GAP, you are at Point 1. The first point in your animation. We sat up the first Point of our animation making our initial settings. Now to rotate our circle, we must add a point and then change the value of the Rotate section.
Click Add Point (F)
Change the Rotate (G) value to 360.0 either by moving slider all the way to the right, or typing in the value in the appropriate box shown above, or using the little triangular up button and hold it down until you reach a value of 360.0 for the rotation. As an exercise, if you continue to press the little triangle up botton, you can go beyond a value of 360.0. In this tutorial, we will just rotate our object once.
Once you have set the Rotate value press AnimPreview (H):
Select Exact Object on Frames as shown above and then press OK.
This will make a preview for you to watch your animation. When finished viewing the preview, close it out and also close the image that gets created and select Don't Save.
Return to the Move Path window and press OK.
When that proces is finished select:
Video | Frames to Image
Set the To Frame, as indicated in the image above to 29 instead of the default 30. If you recall in the preview window that you made, the animation stopped briefly each time it went around. The reason is that frames 1 and 30 are identical. In frame 1, the circle is rotated zero degrees and in frame 30 it is rotated 360 degrees, which is the same as zero degrees rotation. Since the two frames are identical, this shows up as a pause in the object rotation. By deleting one frame, we can have a continual rotating object.
Then accept the other default values in the window and click OK.
In the new window that opens, select:
Image | Scale Image
Choose a value of 300px for both the Width and the Height values. For Interpolation method choose Cubic (Best)
Press Scale
[highlight]Note: The reason that we do not start out with an image 300x300px is because apparently due to the way GIMP interpolates an objects placement when it is rotated, the resultant animation would be not be quite smooth. A huge thanks to ClayOgre for pointing this out, since the original tutorial started out at 300x300px and it produced an animation that kept sort of vibrating as it rotated.[/highlight]
Then do:
Filters | Animation | Optimize (for GIF)
When that finishes processing, another window opens. In this window select:
File | Save As
I chose rotate.gif for the filename.
Press Save
Another window opens:
Select Save As Animation as shown above the click on the Export button.
In the window that opens after that, just press the OK button.
Your animated gif has been created.
Please continue to Part 2 if you would like to do more.















