SVG to Animated Sprite Experiment

This is more of a record for myself rather than a usual blog post, but I've been working hard to develop an art pipeline where I can avoid having to draw a gazillion sprite frames without going full shadow-puppet like Spriter.

Today's result is rubbish:

...but y'know, it's more of a proof-of-concept than an actual art attempt.

The idea is simple:  

  1. Draw a simple SVG image with multiple components
  2. Import into Blender, assemble components and animate
  3. Render animation from Blender into sprite page ready for 2D game.

Of course, the implementation is far from simple.

First off, Blender imports the SVG outlines as curves, not meshes.  So in object mode, you have to select the curve, press Alt-C, then select Mesh from Curve/Meta/Surf/Text.

That makes the outline into a bunch of lines.  In edit mode, select all the vertices and press F to make it a face.  Then, optionally Triangulate Mesh.

Position, scale, rotate the components as required (although I forgot to duplicate the faces and flip the normals, so I encountered lighting problems later).

Create an armature.  In object mode, add a single bone armature.  Then in edit mode, extrude the bone.  Create all the bones this way.  Then rename them all.

Bind the mesh to the armature.  Select mesh first, then shift-select the bones.  Then parent the mesh to the armature with empty vertex groups.

Assign vertices to groups.  Select the vertices, then under the Mesh->vertices menu you can assign to the group of the correct bone.

Paint weights.  Select bone in armature, then shift-select the mesh.  Then switch to weight painting mode.  Paint the appropriate section with weight 1.

Animate.  Select armature in pose mode.  Select frame from timeline.  Move/Rotate bone.  Create location/rotation key frame (I key).

Set up camera properties and render animation.

Then use spritify plugin (under render properties) to create sprite page / animated GIF.

Comments

Popular posts from this blog

Micro:Bit and SPI display

DCS World with TrackIR under Ubuntu

Polygon Triangulator!!