The design and implementation of an Open Source animation tool.

July 18, 2007

Dissection: The K-Sketch Grommet

This is the first "dissection" post, where we do an in-depth examination of one element of an existing piece of animation software, accompanied by my own anatomical sketches.

Our first example will be from K-Sketch, a program for quick and natural capture of simple animations. Although some ideas in Moing go back to the video and animation software I was using before Inkscape and Sodipodi (when I was working on an animation tool called "Animat"), K-Sketch is my most recent influence. I expect a lot of ideas from it to show up in the completed Moing, particularly with respect to performance capture. In this particular case, I would like to consider the "grommets" used in K-Sketch to manipulate selected objects as a model for the manipulation of pegs in Moing.

Essentially, when you select part of the drawing in K-Sketch (typically done with a lasso-style tool), the semi-transparent grommet that appears over the center of the selection looks sort of like this:

These sorts of basic handle shapes are easier to pick out against a complex background than the various arrows which some applications (Inkscape included) use, but are still distinct enough that they suggest distinct functions. Indeed, dragging each region of the grommet has a different effect. For example, dragging the central region simply moves the selection (i.e. translation):

Dragging one of the circular "handles" rotates the selection around the grommet's center:

Dragging the square handles scales the selection uniformly relative to the center of the grommet:

So far, it's all pretty obvious. If you only want to scale in one direction, that's what these regions on the side are for:

I'm not particularly interested in allowing non-uniform scaling for Moing, since I almost always see it abused to make up for a lack of non-rigid deformation (which we're going to try to do right). However, there's one last feature of the grommet which I find extremely interesting:

Dragging this ring causes the selection to follow the motion of the mouse cursor, both moving and rotating in order to keep the same part of the ring under the mouse. In K-Sketch, any motion can be recorded as animation, so manipulation of the grommet ring offers an extremely natural way of getting coordinated motion and rotation.

If we borrow only one feature from K-Sketch's grommet, the ring is the one I like the most.

No comments: