Creating 2D Animation with Blender and Krita, a Post Mortem
Note: This blog post was made back in 2014… quite a long time ago in Internet and software development time. While the techniques described here still certainly work, the updates to Blender’s 2D animation workflow and Krita’s animation tools have made the process much more simple.
A couple months ago, I was contacted by Michael Crouch, a friend of mine who’s a commercial producer for an NBC affiliate station in Richmond, Virginia. He was producing a promotional spot for Angel Tree, a Salvation Army charity program that runs during the holidays. So standard fare: tight-ish timeline, low budget. However this was for a good cause… and more importantly, he wanted to do something special. An animated spot. He would focus on the overall spot’s script, audio, backgrounds, and environment. I’d be providing character animation that he could lay into the scene.
Oh hell yes.
After batting around a few ideas, we came up with the concept of having a somewhat paper-cut look to the environment. The character animation would be added as if it were a set of ink and watercolor drawings, cut out and laid into the scene. For both aesthetic reasons and time-constraint reasons, it was decided that the bulk of animation would be on 3s and 4s.
We hammered through a few more details on the aesthetic. It was important to avoid singling out any specific ethnic or cultural type as being either a benefactor or beneficiary with respect to Angel Tree. Anyone can help, and everyone can benefit from hope. This presented an interesting challenge in terms of character design. To reflect that message, our character design landed at being a somewhat androgynous child, and as the animation played through, the child’s hair and skin tone would cycle through a series of colors. This way, we could play up the watercolor look and give the spot a bit of a multicultural taste. With the character design in mind, I used a handful of layers in Krita along with a still from his work-in-progress environment to mock-up a proof of concept, both for the aesthetic and for my own personal workflow.
It’s worth mentioning that I did the frames of this character test using the stable release of Krita. I knew at the time that there’s a development branch with animation features. However I hadn’t used it yet and didn’t have a build environment for Krita. That, coupled with time constraints, caused me to decide that I’d just do it the old layer-based way in the stable version.
Happily the character design and the animation aesthetic were approved.
That meant I could push forward with animation. However, as I mentioned, I wasn’t using the Krita animation branch. I could do ink and paint in Krita,but I needed a timeline for doing roughs/pencils. Dopey, the MyPaint fork with animation capabilities hadn’t seen any new updates for about a year. And Pencil, another useful tool that I’d used for my micro-short, Singularity, hadn’t seen meaningful development for even longer. I could’ve maybe used Synfig or Tupi, but as those are more vector-based animation programs, they don’t quite have the drawing tools that want for roughs; they’re too clean. So, predictably, I decided to use Blender.
Wait. What?
Yeah, Blender, the 3D modeling and animation package. Most people are aware that Blender is an extremely capable animation suite for 3D computer graphics. Those same people, however, might not be aware of how useful it is as a 2D animation tool. In this case, I’m specifically referring to Blender’s Grease Pencil feature, typically used for comments, draw-overs, and other kinds of annotations. But as an important feature for this project, Grease Pencil layers can be animated and show onionskinning. Furthermore, drawing with Grease Pencil is incredibly responsive. Grease Pencil strokes are, in fact, 3D curves, but they’re responsive enough to match may naturally scribbly drawing style. And as a kicker, there’s a special branch in the Blender development tree called GPencil_EditStrokes that gives additional features of value to a 2D animator such as editable strokes (duh), colored onionskinning, and Grease Pencil fills.
So here’s the basic workflow I used for this project:
- Draw rough pencils of the animation with proper timing using Grease Pencil in Blender.
- For each Grease Pencil key, generate an OpenGL render of the animation from the Camera view.
- As a house-cleaning step, pull each OpenGL rendered key into Blender’s Video Sequence Editor (VSE) as a strip with a duration matching its screen time as a Grease Pencil key.
- Commit everything—the .blend file and each OpenGL-rendered Grease Pencil frame—to version control (I typically use Mercurial)
- In Krita, pull in each Grease Pencil frame as a layer, nested within its own layer group of the same name.
- Ink and paint each frame of the animation, using a layer group for each frame.
- For each layer group (animation frame) in Krita, solo the group and export that, overwriting the Grease Pencil rough.
- Commit the updated frames (and the Krita project file) in version control.
- Back in Blender’s VSE, open the .blend (or refresh it).
- Render in an MOV container using the QTRLE (QuickTime Animation) codec, preserving the animation’s alpha channel.
I did this for each of the small animations I needed to deliver: a walk, an idle stand, a sit, a turn, and the final animation grabbing and sharing the Angel Tree tag. This workflow served sufficiently well since each little animation was reasonably short and I was animating on 3s and 4s. However, if the animations needed to be longer or I needed to animate on 1s or 2s, there’s a lot of opportunity for scripting some automation into the process. In particular, getting each of the Grease Pencil frames rendered and pulled back into the VSE is a prime candidate for making more efficient. So is the re-exporting process from Krita.
But, each of the animations were complete and could be arranged together by my client to complete his spot. His part was done in After Effects, but to make sure they would sequence well together, I did a test using Blender.
Once I proved to myself that a reasonably acceptable result could be assembled from these core pieces, I passed them along to Michael for integrating into the rest of the spot. They post the finished piece to the NBC12 Commercial Services Facebook page last week and will be airing on NBC12 in Richmond for at least another week, I think.
Generally speaking, I’m really happy with the finished spot. Michael and his team did a fantastic job of integrating the pieces together and giving a strong, unified feel. There’s a bit of a foot slide issue in how they included the walk cycle, but I think that’s only distracting to an animation nerd like me.
Workflow-wise, I’m really quite fond of the Blender to Krita pipe using Grease Pencil for roughs. There’s room for automating the process and I’d really like to explore adding a bit of 2D/3D integration, but the tools are definitely all there. I also ran into a bit of a nasty bug in the GPencil_EditStrokes
branch where if you create a new scene in Blender by doing a full copy, the Grease Pencil layers weren’t really copied… they were linked. So changes in my new scene would absolutely obliterate the Grease Pencil strokes in the original scene. I believe that bug has since been squashed, but boy did it scare the mess outta me while I was working.
But yet, this project came together nicely and I’m quite pleased. I’m looking forward to using this technique more. And things will get even more interesting if the Krita animation branch gets merged into Krita proper… and I’m looking forward to it.
[Update 2014-12-09]: The features from the GPencil_Editstrokes branch of Blender have been merged into the master development branch. They’ll be available for everyone to play with in Blender 2.73 (or, if you’re the adventurous sort, you can check it out in one of the nightly development builds).
[Update 2020-05-26]: This article was written for the 2.7x series of Blender. With the release of the 2.8x series, Grease Pencil objects are first class citizens in Blender and you can do a lot more with them. Furthermore, Krita’s animation capabilities have also improved greatly. You should definitely check them both out.