How to Control Christmas Lights - How to do almost anything with Christmas Displays.
  August 20, 2008 - Wednesday |Id: Visitor|Login|Prefs|Register| 125 more shopping days until Christmas  
Home
About
Story
Forum
Forum Pro
How To
Photos
Videos
Classifieds
Community
Score Board

High Scorer
Art Colin




HowTo: Create a Compact Animated GIF of a Lights Display  (Peter Olsen)


                    Page 1   Page 2    Page 3       Next Page >>

Step 1 : Introduction


Photos do not do justice to animated Christmas lights displays but videos produce huge files that take forever to download. Animated GIF files can display the same animation in a fraction of the size. For samples of some compact animated gif displays go to: http://computerchristmas.com/index.phtml?link=photos

For a comparison of video vs GIF go to http://cr.planetchristmas.com:8080/read?25059,42
The ELVES1.WMV video there is 632Kb. I converted it to an animated GIF that ended up less than 40Kb. See http://cr.planetchristmas.com:8080/~10/read?31925,63 (Part of it is shown in the last two steps below).

When I refer to animation I am talking about animation that uses multiple discrete light circuits to do the animation, not continuous animation using electric motors etc, although the techniques below can be used on those as well.

Step 2 : Overview


An animated GIF file is simply a series of GIF files combined into one file. The main difference between a video and an animated GIF file is that a carefully created animated GIF file does not contain multiple frames of the same thing.

A typical animated display does not have continuous motion but lights up one circuit for say half a second, then lights up another circuit for the next half second. eg. a waving Santa typically has two circuits of the arm that are lit alternately. A video captures up to 15 “identical” frames while each arm position is lit. An animated GIF file uses only one frame for each but displays it for half a second.

When a video is compressed into a WMV or AVI etc. the software will remove redundancy from one frame to the next. It normally does it very well. The problem is that usually a large part of the display changes from one frame to the next, not just the animation. Lights move in the wind, the camera shakes slightly etc. meaning the video has to store a large proportion of the scene in each frame.

If you simply take a series of still photos and combine them into an animated GIF file, you will end up with a large file for the same reason as above. Even though you are reducing the number of frames stored, each frame is still almost totally different from the previous one due to wind movement etc. and hence the entire frame has to be stored each time. The secret is to firstly ensure that the ONLY thing that changes from one frame to the next is the actual animation and secondly to reduce size of the frames that are stored.

The animation at right is two frames. The first one is the entire scene, the second is just the two tiny wings.

Step 3 : Software


There are many shareware and commercial programs that allow you to create animated GIF files. Do a search on the web and/or see last step below. I use Ulead GIF Animator V5.05 for several reasons as outlined below. You can download a fully working version from http://www.ulead.com/ga/trial.htm and trial it for 30 days, then you need to purchase it. If you need longer than 30 days to evaluate it you could try:
http://www.allcracks.net/download.php?id=81825&action=download
but of course that is purely to allow a longer trial prior to purchase. (I found that I had to re-run the patch each time I wanted to use the program after the 30 days, but it runs in a fraction of a second and then starts up the program automatically so it is not a problem.)

I also use Gif Construction Set because some of its displays are more convenient than GIF Animator. It shows the partial frames whereas GIF Animator fills in the background when you open a GIF file (as opposed to a UGA file).

Here is a sample from Gif Construction Set that shows the partial frames.

Step 4 : Basic technique

The basic technique for creating an animated GIF is to take one shot of your display showing the first step of the animation. You compress that frame and tidy it up as much as possible and store it as a GIF file. This becomes your master slide.

You then take additional photos from the same camera position. You then create all the frames in the animation by cutting and pasting the changing parts of the animation over the top of the master slide.

If you can single-step your display via a computer it is easy to capture the individual frames. If not and you capture multiple steps of the animation due to time lapse, don’t worry. You simply cut out and paste the parts that are relevant to each step.

After saving the images in the animated GIF you set the timing for each one. The simplest way is to copy the actual timings from the program you use to run the animation. If that is not possible use a stop-watch or just guess.

Step 5 : GIF Compression

You generally cannot use your normal image editing program to do the cutting and pasting onto the master frame to create each frame of the animation. Because of the quirks of GIF compression, every time you re-save the image there will be minor differences in pixels that are nowhere near what you pasted. They aren’t visible to the eye but they make a huge difference to the size of the animated GIF file. For each new frame the animation program generally stores a rectangle that incorporates all parts of the image that have changed from the previous frame. If random pixels have changed all over the image, a large amount of unnecessary data is stored for each successive frame.

What you have to do is find an animated GIF program that has its own editing capabilities built in. Ulead GIF Animator is one such program. You use your normal image editing program (I use Photostudio 2000) to do the initial touching up of the photos, but then you do the cut and pasting from within the animation program itself. That way you guarantee that only the changed parts of the image are stored.



                    Page 1   Page 2    Page 3       Next Page >>
 

 
Designed, Hosted, and Coded by Hill Robertson
Computer Christmas - Copyright © 2001 Hill Robertson