Dog Gone Fox: The Making of an Amiga Cartoon Created by: Robert Corns NOTE: The full animation ( Icon "DogGone" ) requires over 1.5 megabytes to load and run. HOWEVER, it is built up from six segments, each of which can be run on an Amiga with less than 1 MB memory ( in fact, most run on 512 K!). In order of loading, you could view the segments represented by the icons "Opening", "Sleep", "Smack", "SmckSnk", "Sneak", and "Eat". The animation is in the PFX format produced by PageFlipper Plus from Mindware International, the fastest and most flexible Amiga animation format. You can use the "SplitPFX" utility on Disk1 to "split" each of the animation segments into its component IFF imagery. Please note that this is version 1 of SplitPFX, so it does not work perfectly on all cases, but it sure beats manual splitting! Now, about the animation. Concept and Storyboard Development: The development of this animation is a classic case of the use of "modularity" in the construction of an animation. A long animation takes a lot of effort, with a lot of trial and error along the way. By breaking the story into smaller pieces, each smaller piece can be perfected, and only at the end does the whole animation come together. This cute cartoon, which provides a comical twist to the chicken- and-the-fox story, has been divided into fairly distinct stages: the introduction, which includes a two-color "preview" of the story; the sleeping guard dog; the watchful fox; the fox sneaking up on the guard dog; and finally, the "punch line", with the fox eating the dog. Each stage is developed separately. Here is a brief description of each segment: 1. Opening A four-color (two bit plane) introduction, giving the title of the piece ( "Snacktime" ), and its author, Robert Corns. This illustrates a really neat way of doing an intro, by illustrating a "summary" of the ensuing animation. When split with "SplitPFX", it yields about 160 frames which can be loaded into a paint program. 2. Sleep A sixteen color ( four bit plane ) loop showing the dog snoring. A very effective way of using loops to lengthen an animation. The actual "snore" is seventeen frames, which are looped five times. When developing a storyboard, you should always look for opportunities to "loop" to lengthen the animation with no extra artistic effort. 3. Smack A sixteen color ( four bit plane ) segment showing the fox licking its chops in anticipation of the upcoming meal. Effective use of looping to show eyes blinking at the beginning ( A "blink" is two frames, eyes open and eyes closed ). About 25 frames altogether. 4. SmckSnk ( Abbreviation for "Smack Sneak ") A sixteen color ( four bit plane ) segment showing the beginning of the fox sneaking up on the dog. About 52 frames altogether. 5. Sneak Another very effective use of looping. A left-right cycle of the fox stepping is looped five times to create the illusion of the fox moving from the tree towards the dog. Eight colors (three bit planes ). 6. Eat The final stage - the fox reaches the dog, and swallows him whole! About 83 frames, four bit planes ( sixteen colors ). Includes the final credits. Technical Considerations 1. Using Different Numbers of Bit Planes This animation is also a fine example of reducing the number of bit planes in animation segments where fewer colors will suffice. Within the six segments, there are examples of two, three, and four bit plane usage, as the situation merits. Yet, when the final animation runs, it flows seamlessly from one segment to the next, no matter how many bitplanes are used. 2. Use of "Slaves" to chain segments. This is also a perfect example of the use of the "slave" concept within PageFlipper Plus F/X as a means of chaining pieces of a long animation together. Its advantage is that one set of double buffers are shared by all segments, thus economizing on memory usage. If you care to save the scripts and print them to examine them closely, you will notice that the only technical considerations when using slaves to chain segments are as follows: * Each segment is preceded by a "blank" frame, and followed by two blank frames. The blank frame must correspond to the image dimensions of the segment. For instance, you would use a two- bitplane blank for a two bitplane segment, a three bitplane blank for a three bitplane segment, and so on. It should have the same color map as the images of the segment ( or at least of the first image of the segment ). This can be created very easily by loading in any image of the segment into a paint program, then "clearing" the image and saving the resulting blank screen. * The "master" which calls the "slave" must be synchronized to the slave. This is done by simply counting the number of frames in the slave ( excluding the blank at the beginning and the two blanks at the end), then putting a loop into the master which simply loops a blank for the number of frames executed in the slave. For instance, if the slave has a loop of 17 images executed five times, then 12 images after the loop, the number of frames is 17 times 5 plus 12, or 97. Thus, a loop of 97 is required in the master JUST AFTER the slave is invoked, to synchronize the master to the slave. If you look at the script of the master carefully, you will see such synchronization loops after each of the six slaves invoked. Here, now, are some notes from the author, Robert Corns. The Making of Snacktime, by Robert Corns. Snacktime was done with traditional cel animation techniques. In fact, most of it had been drawn on paper several years ago. The idea had started as an exercise in drawing a "sneak cycle". A cycle is a series of drawings such that the picture following the last drawing of the series is the first drawing of the series. Any repetitive action, such as walking, may be represented with a cycle. While I was drawing the sneaky fox, I started to build up a story to motivate why he is sneaking around. I had filmed the black and white line drawings in Super 8 and it looked pretty good. That was the farthest I ever took it on film. Enter the Amiga. Here was a computer with incredibly fast color graphics and sound capabilities and I knew from the beginning it would be a machine well suited to animation. So with the project on paper, there was a need to transfer these images to the Amiga. Digitization was the most obvious means. But before this was done, a decision had to be made as to what resolution would be best to work in. The higher the resolution, the better the details in a given picture could be rendered, but at the cost of using more memory. For a project the size of Snacktime, I thought, and rightly so, that it would be best to conserve memory wherever possible. With this goal in mind, the drawings were digitized in low resolution (NTSC 320 by 200). I now had a series of grey scale pictures that had to be "cleaned up". If you ever look at a magnified view of a digitized line drawing, you'd see areas that were supposed to be pure white are actually a motley pattern of light greys, while the lines are composed of dark greys. This is bad, because the standard animation compression technique is delta compression. Basically, this saves the animation as the differences between successive pictures. I found the following method to be most useful for getting rid of the "noise" in digitized pictures. I would load a 16-color grey scale picture into the 32-color lo-res mode of Deluxe Paint. I actually only need two or three colors outside of the grey scale. Using the palette control, I changed three of the colors, not in the grey scale range, to bright red, bright blue, and bright green. I then started to trace the outline with the blue. The red and green colors were for parts of the drawing where it might be confusing if it were all done in blue. The brightness of these colors was important to help the outline stand out from the grey. In this way, it is easy to see which part of the drawing still needed to be traced. Once the tracing of the drawing was completed, I selected the stencil control and locked the red, green, and blue colors. With these safely locked, I could clear the screen, and presto - the red, green, and blue colors would remain on the screen while the "noisy" greys vanished. Turning off the stencil, the drawing could now be saved. This had to be done with every drawing and is quite labour intensive. On the other hand, it is by far much quicker to do the drawing on paper, digitize it and then clean it up than it is to draw it directly with the computer. I also found that tracing by hand produced far better results than using the line searching features on many picture processing packages. Next the cleaned up outlines were colored in. Two possible methods for saving memory by correct palette techniques were used in Snacktime The first is somewhat straightforward. The basic strategy is to have each scene use as few bitplanes as possible. With the Amiga, normal mode, a lo-res picture can have from 1 to 5 bitplanes, each bitplane doubling the number of allowed colors, but at a cost of about 8K per bitplane. Snacktime has scenes done in two bitplanes (four colors), three bitplanes (eight colors), and four bitplanes (sixteen colors). The second way of saving memory with the palette is somewhat more subtle. It is related to delta compression and it is perhaps best suited to explain this with an example using two bitplanes ( four colors). Suppose an artist wanted to make a drawing with red, green, blue, and black. When he popped up the palette control, he could have made palette box (1) red, box (2) blue, box (3) green, and box (4) black; or, he could have made a different choice, say black/green/ blue/red, or any other arrangement. It really doesn't matter. The artist draws his picture by putting some red here and some blue there, etc. The artist paints his picture by where the colors should go; it is not important as to the specific assignment of boxes and colors. To the Amiga however this assignment is important. The Amiga sees the artist as painting box (1) here and box (2) there, etc. The Amiga then consults a lookup table to find which color goes into which box and by putting the right colors in the right boxes, recreates the picture. For the Amiga, each box has its own unique binary number; box (1) = 00, box (2) = 01, box (3) = 10, and box (4) = 11. Now comes the delta compression aspect of the problem. As mentioned before, delta compression works by recording only the differences between two pictures. Suppose our intrepid artist has two pictures; the first picture has the top leftmost pixel in blue and the second picture has green in that position. To the viewer, the only important thing is that the delta compression records this pixel as changing from blue to green. Suppose the artist had chosen the palette so that blue = box (1) = 00 and green = box (4) = 11. Then the Amiga has to record that for the upper leftmost pixel, 00 changed to 11. The Amiga had to flip two bits to do this. Suppose instead of this choice of palettes, the artist had blue = box (1) = 00 and green = box (2) = 10. Then the Amiga would have recorded that for the upper leftmost pixel, 00 changed to 10. Only one bit had to be flipped this time! Both choices of palettes produce the required change of blue to green, but one palette requires more work and storage on behalf of the Amiga than the other palette. For each scene in Snacktime, I already knew what colours I would use. What I had to do was to consider each scene as a whole to pick out the optimal placement of these colors within the palette boxes. The ultimate aim was to minimize the total number of bits being flipped for that scene. This technique of properly choosing where the colors sit in the palette does significantly affect the overall size in memory that the animation uses. A properly chosen palette can also be driven at a faster speed than a poorly chosen one. This can be important for some hi-res animations which have much slower flat out flipping rates than lo-res animations. Finally, with all the pictures colored in, it was time to assemble them into a film. As one last decision in trying to keep the overall size of the film small, I decided not to use any complicated still or scrolling backgrounds (with the exception of the tree). The film was compiled with PageFlipper Plus F/X (PFX for short). At the time I was doing this, my system had one megabyte of memory. This forced me into compiling all scenes separately. It wasn't until I got 3 megabytes that I was able to finally link the completed film together. Fortunately, the manual for PFX is, in my view, very well written and this final step only took an evening for the linking and debugging. I might also add that it is from the PFX manual that I learned the trick of trying to minimize the number of bits flipping between pictures. HINTS AND TIPS FOR EXTENSIONS AND MODIFICATIONS Again, "SplitPFX" allows you to extract the frames. Having these, you can reassemble the animation in ANIM or PFX format, experimenting with Robert's "sneak cycle" technique ( how about a wagging tail? Dog barking?). The IFF imagery can be used as a basis for adding or changing a scene. How about a second surprise, when the chicken coop blows up and out comes ... Cel animation, in addition to providing great entertainment on its own, can be used to "liven up" a "real" presentation (ala Roger Rabbit). Have Fun!