This is the personal website of John Watson: father, software developer, artist, guitar player. Follow or contact me on Google+ or Twitter or GitHub or Facebook.

Creating sprites with Blender and Gimp

February 7th, 2011

Blender

Blender

I’ve been using simple placeholder images for my game so that I could work on gameplay. But I’m getting to a point now where I think I’ve got the core of the game nearly complete and I need more than just placeholders. For example, I created a type of flying enemy ship that can loop and roll and dive and I needed some graphics so that I could test the code that draws the animations.

But I’m not a very skilled artist. Which is a problem since I am a one-man shop making a game with graphics in it and my total budget is very nearly zero dollars. Even if I was a talented artist, I simply don’t have the time to hand-draw every frame of animation that I’m going to need.

Then I remembered Blender. Blender is an open source 3D modeling and rendering application. Using Blender, I can create one model of an object, set properties like color and texture, and then let Blender’s rendering engine draw it for me. After building the model, Blender gives me lots of nice graphical details like reflections, texture, and shading. And I get as many different views of my model as I want at any angle, rotation, or scale.

After exporting the frames from Blender, I use Gimp to load the frames as layers and generate a sprite sheet using the Sprite Sheet plugin. Here’s the sprite sheet and the resulting animation:

Jet spritesheet

Jet sprite sheet

Jet sprite

My process for rendering my jet/plane thingy above:

  • Model in Blender
  • Setup a simple animation that rotates the object
  • Export all images for the animation as PNG files
  • Load the PNG files as layers in Gimp
  • Use the Sprite Sheet plugin to create a new spritesheet image from the layers

So Blender turned out to be a huge win. It took me about two days to get up to speed on using Blender (The Noob to Pro Wiki Book is a great resource). But now I can create much nicer graphics for my game with much less labor. Once I have a model, rendering 20 frames of animation and converting it to a sprite sheet takes about a minute. And I can just as easily create as many different sprite sheets as I need from this model. Say, if I wanted an animation of the plane banking right or left and turning 180 degrees. Another potential side benefit is that I have all of the 3D meshes already built if I ever decided to go 3D.

Using this process, you could quickly create sprites with various facing, rotation, and animation without a lot of additional effort. And modifying your sprite later involves just changing the model and then rendering all of the different views you need instead of redrawing every frame.