On animation

23.12.2015 22:02

The end of the year is getting near and I guess it's time again for some lighter topics. A year ago I was writing about my foray into drawing cartoon characters. I can't really say I advanced on that front very much. On the contrary, it seems that without regular practice I quickly revert to my old state of barely being able to draw anything beyond circuit diagrams. It's also apparent that I lack imagination to come up with anything better than some unoriginal ponies. I was however intrigued by some amateur animations I saw, which made me wonder how hard would it be to put some of my old drawings into motion. Unsurprisingly, it turned out that it is in fact hard. Over the past summer I managed to make barely a few seconds of animation that looks presentable.

I found few good tutorials on how to do animation. Most of the time I simply studied existing cartoons. Luckily, there's no shortage of content on the web you can look at frame-by-frame. For instance, by stepping through any of the existing animations of a horse trot it's easy to see what are the key frames for motion of different limbs. Which is how I came up with these frames for the walking animation.

Original sketch and key frame study for Onwards animation

It's like reverse engineering the way you recognize and perceive images and motion. Some of the things I learned were quite surprising: single frames often look horrible, but work perfectly good in motion. Other times, small changes between frames that make sense individually look terribly when played back. It turns out cartoon characters really only look good from a handful of angles. You can also get away with a lot of things in animation that make little physical sense. For instance, I did some exercises in calculating visual angles, angular speeds and relative sizes for the camera rotation clip you see below. They just don't make much sense even though I think it's not that apparent in the animation itself.

Of course, I don't have access to any kind of professional software, so I took what I guess you could call a software developer's approach to art.

I drew individual character cels in GIMP using a Wacom Intuos tablet, with scans of some of my old ink-and-pencil drawings as a reference. For the rotation clip I found it quite impossible to keep proportions correct without some kind of a guide, so I programmed a spherical model in Python and PIL. I imported the resulting frames into GIMP before drawing sketches over them. And then I went back to tweak the model because it looked awful and so on enough times to give me the Tetris effect.

Onwards!

(Click to watch Onwards! video)

Of course, drawing and coloring with a tablet saves a ton of time, because you can just copy-paste parts that do not change between frames. Still, making all the individual cels is very time consuming, which is why everything you see here is only one quarter of the full 24 frames per second. I found GIMP's Animation Playback window and the wonderful Export Layers plug-in most useful.

For backgrounds I used Inkscape, simply because it was easier to draw a bunch of straight lines with vectors instead of free-hand. Another reason was because I have yet to discover a simple method of drawing things in GIMP that do not have black outlines. I'm scared of real video editing software ever since I've used Cinelerra a few times in Kiberpipa years ago, so when ever possible, I turned to (messy) Makefiles and Python to do compositing. In the two clips you see here, the foreground cels were exported from GIMP into individual PNG files and the background was one or two large PNGs exported from Inkscape. Python scripts then used PIL to layer frames in the right order and right offsets.

In the end I couldn't escape using a video editor though. Music, credits and cross-fades were done in Kdenlive. I used FFmpeg to encode individual frames produced by my scripts into MJPEG files that I could import into Kdenlive.

Spin state

(Click to watch Spin state video)

So, after this exercise, what can I say about making cartoons? I certainly have a whole new respect for people that manage to produce even ten minutes worth of content in their free time. I've spent way too many evenings fussing over details in a second of video. On that note, this is also a scarily efficient method of procrastination on more important projects. On the other hand, seeing my character moving smoothly for the first time was a feeling comparable with the proverbial first LED blink on a new microcontroller or finally figuring out a math problem I've been working on for a month.

Posted by Tomaž | Categories: Ideas

Comments

Hi!

I would have expected at least some consideration for http://pulkomandy.tk/projects/GrafX2 when it comes to animation. But maybe we still lack too much features...

PulkoMandy, I haven't heard of GrafX2 or Deluxe Paint before (I only seen a few Amigas in the Computer Museum and never really used one). It looks more suitable for pixel art and I was going more for traditional animation here.

Posted by Tomaž

Add a new comment


(No HTML tags allowed. Separate paragraphs with a blank line.)