Benscomputer.no-ip.org
Benscomputer.no-ip.org


Creating Animation Videos with The Gimp and Lives



This article is intended to be a tutorial on how to create simple animations using the Image Editor of choice then using Lives to compile the Images into a Moving JPEG file. This final result can then be transcoded to any format.

For the Purposes of this tutorial the Image Editor of choice is The GIMP because it is a) Open Source and b) My favourite editor.

At the time of writing I have only created two movies in this manner, so this is intended to be an articles for beginners written by a begginer.

Lets get started

First create a directory for all your files to reside in.
Setting the BG colour
My first movie was one of space flight. It did not begin in this manner but transformed into the final result as I had ideas whilst creating. You may of course wish to detail your ideas on a piece of paper before starting creation. I however did not.

Fire up the GIMP  and ensure that the background colour
is set to black


Then
select File... new.
Because the images are intended to be a movie it would be very wise to select PAL in the dropdown box or simply enter 720 and 576 into the width and height boxes.

You should now have a new image with a black background.


Creating Frames

Note: If you see a dialog saying you need to emrge down then do so.

Save this into your working folder as 00001.jpg, when you see a dialog asking about compression slide the slider to 100 (No compression). If you don't do this you could end up with a very poor quality video.

Note: Lives will read these images in numerical order so it is very important that you stick to the file naming conventions I have specified. Otherwise your movie will not make sense!

We are going to be creating our video to run at 12 Frames Per second. The DIVX standard is 25 however for a first attempt that is a lot of work to create even the shortest video (3 seconds = 75 frames) so alt-tab out of the GIMP and copy 00001.jpg and paste it back in as 00002.jpg and repeat until you have 12 images labelled from 00001.jpg to 00012.jpg
This gives you a black screen for one second

You will need to use this method of saving every time I say save a frame. One frame is equal to a single image, so if I write to make four frames you will need to create four copies of the image.

Stars


Next change back to the GIMP and create a new layer (Layer... New Layer) Call the layer Stars, ensure the resolutions is set to 720 x 576 and that the layer fill type is set to Transparancy.

This layer is where we will create our stars to give the impression of space.

Select the paintbrush in a circle size 3, making sure the forground colour is set to white start clicking in some stars.

Try to avoid clicking in any patterns or too many stars, this layer is intended to contain a quarter of our stars at most.


Once you are happy with your stars select Layer... Duplicate Layer.

now in the Layers dialog (if you cannot see it find the main Gimp box and select File.... Dialogs.... Layers) right click on stars copy and choose edit attributes. Change the name to Stars Sparkle. and hit OK
Stars Sparkle


Layer Selection
Make sure that Stars Sparkle is the selected layer in the layers dialog (a white box around the little preview) and then change back to the editing window. Hit Ctrl-A to select the entire layer.

We are now about to make our stars sparkle.

Choose Filters, Light Effects, Sparkle. In the dialog choose the settings you feel most appropriate. We are after a subtle sparkle nothing too heavy. Once you think you have got it correct hit OK. Once the image has been processed you may need to hit Ctrl-Z and try again depending on how extreme the settings you chose. Remember a subtle change in light will look far better than huge changes of light once it is animated.

Bad Choice of SparkleThis is an incredibly bad use of sparkle for our needs. Whilst it does look extroadinarily pretty in still, when it is animated the points will flash very noticeably. It is of course possible to animate a star such as this but that is beyond the scope of this tutorial.

The easiest way to tell if a difference has been made is to click the eye next to stars sparkle in the Layers Dialog. You should see the dots appear to darken. If so then this is exactly what we are after.

Now repeat this process 3 more times to create a total of 8 layers, 4 with sparkle four without. This should leave you with a layers dialog looking like this;


Layer Select Dialog

And hopefully an image looking similar to this.

In order to make the stars sparkle in the animation we can switch on or off each of the layers as we need. However given that the viewer will see 12 Frames per second I strongly recommend that whenever you switch on or off a sparkle layer you leave it in that state for at least 4 frames.

To switch off a layer simply click the eye next to the layers name, to switch it back on click it again.

You will need to make the stars sparkle throughout making the animation, simply remember to keep the status quo for at least 4 frames. The stars are split into seperate layers so that you can make layers sparkle independantly.

Now using this technique make a seconds worth of frames (12 frames) with the stars sparkling


Creating Movement

This is often difficult to manage, once you build up experience it gets easier and easier. The reason for our first movie being in space is that it is harder to notice when subtleties go wrong.

We will start with some basic sideways movement, our spaceship will turn to the right.

One of the problems posed by using multiple layers for the stars is it makes this bit all the more tricky to get right, however if you use the rulers in the GIMP it is far less difficult.

You now need to go through each of the stars layers and hit CTRL-A before using the mouse to drage the contents slightly to the right (an inch at very most). Be careful not to have any vertical movement, horizontal only. Take note of exactly how far it was moved as you will need to move the other layers to the exact same place.

If you are careful you can make quite a good effect of movement just by moving one layer.

If for you first animation you do not wish to have sparkling stars then you can choose merge visible layers from the Image menu, just be sure to unselect the background layer in the Layers Dialog (unclick the eye) This will give you one layer of stars which you can then move.

Whichever method you choose you will need to draw some new stars into the right side of the frame.

For every bit of movement you 'draw' you need to save a frame. Think of it like making a flipbook when you were younger.



Movement in general is done in this way, whether it be left right, up, down. The easiest way to depict forward motion is to gradually zoom in on the area you are wishing to 'travel' to. This can be done by copying the area, selecting edit.. paste as new and then Image... Scale image. If you are going to do this you have to unclick the little chain in the scale image dialog and set the resolution to 720 x 576.

then copy and paste the new enlarged image back into your original.

Keep in mind that the image quality will degrade in quality the 'closer' you get, so you will need to re-draw from time to time, using a low opacity brush to add definition is often a good idea.



Concepts Explained

So there you have it, the basic concepts explained. Adding Audio is done later in the process, but you know have the basic knowledge of how to create movement and to create frames. Try to keep the detail to a minimum whilst you are learning, on my first project I spent 6 hours creating something that lasted 30 seconds and had some fairly basic errors in it.

Create your frames before progressing onto the next stage. Remember 12 frames = 1 second.

Creating your video.


Now you should have a directory full of image files. To collate these into a Movie file we are going to use Lives Once it is installed run the command lives.

Lives will then open , select File..  Open File/Directory
Changing the FPS
In the dialog choose the first image in your working directory (should be 00001.jpg) it will take some time but Lives will open all of your images.
However the Playback speed of Lives is currently far too high for our needs so change it by selecting Tools... Change Playback/Save Speed and change 25 to 12.
Then hit OK

You can now preview your animation by clicking the Play arrow located in the top Right of the window.


Adding Audio

Now you probably want to add some audio to your animation. Please keep in mind if you are going to distribute your video you need to own the copyright to the audio track or have the express permission of the copyright holder.

Simply select Audio.... Load new Audio for clip. Choose your audio clip and hit OK.

Now the chances are your Audio Track is far longer than your animation, to trim the audio simply select Audio... Trim/pad Audio... Trim/Pad audio to selection.

Your video is now ready to be saved, so File... Save As ... My_video.avi

Once that has finished saving and assuming there were no errors exit Lives and in a console cd to your work directory.

run

mplayer My_video.avi

You can in fact use most Media Players to view the video however you can also just transcode it to DIVX for wider use.

mencoder My_video.avi -ovc lavc -lavcopts vcodec=mpeg4:vbitrate=1500:vhq -oac mp3lame -o My_Video-divx.avi

Here are a couple of examples of my work. Both have a few fundamental flaws that I could have avoided if I had thought of them

SpaceFlight.avi


SuperNova.avi

The images rendered for supernova can be found here




Creative Commons
LicenseAll works in this site are licensed under a Creative Commons Attribution-NonCommercial-ShareAlike2.5 License, and are copyright to me, Ben Tasker, or their respective owners. Unless otherwise stated