One way to create animations in Linux is to use the GIMP Animation Package (GAP). It allows you to create each GIMP layer as a frame and export it as an animation. This is great, but what if you wanted the flexibility
One way to create animations in Linux is to use the GIMP Animation Package (GAP). It allows you to create each GIMP layer as a frame and export it as an animation. This is great, but what if you wanted the flexibility of vector graphics while designing your frames? That’s where this tutorial comes in. You can use Inkscape to create the frames, ImageMagick to stitch them together into a gif animation, and ffmpeg (or avconv) to create a video from them.
So let’s begin.
You will need the following:
- Inkscape for creating frames.
- ImageMagick suite to stitch frames into an animation.
- FFmpeg for creating a video animation
You will also also need a Linux or UNIX based operating system, any where all of these programs work, and a lack of fear of the command line.
1. Creating frames
Drawing frames in a vector graphics program such as Inkscape gives you some amount of extra flexibility, and makes it easier and quicker to draw cool things. As we go along we’ll use my example, but your animation can be anything you can imagine.
First we need to create a background of the size which we want our final animation to be. Let’s make it 220×180 px here. Just draw a square, select it and in your “W” (width) and “H” (height) areas enter “220.000” and “180.000” respectively. The “.000” are to make sure that it is exactly of that size.
You can make the background of any color or gradient you wish. Here is mine.
To do an export click on the square and go to File > Export bitmap. In the dialog that pops up make sure a “selection” tab is pressed and use the browse button to browse to the location you wish to save your frames in (that would be the animation folder mentioned above) and the file name you wish to save it under (0.png). Once you’re done with the browse dialog click the “export” button.
For this animation let’s start with a blue circle without fill color and with a fairly fat stroke paint (border), like this:
I think you might already be getting the idea of where this is going. For the next frame you reveal a little more of the circle, export as frame 2.png and then draw a little more again and export as frame 3.png and so on until the full circle is complete. The less you reveal per step the more steps or frames it takes for your circle to be drawn and the smoother will its final animation be.
To make it less daunting though, you can leave the export bitmap dialog open all the while you’re exporting, and then just change the number in the file name and hit export every time you make a modification to the circle (and reselect the background).
In this example, I’m going to make a fade in effect using Inkscape’s opacity feature. Here’s a next object we have here:
So far we have a circle drawing itself and then starting to glow. Now you can write something i