This page gives a brief overview of how to setup a skeleton in Spine and begin animating.
Spine is not limited to animating characters, but doing so is common and makes for a good example. Instead of using a single image for the whole character, a character in Spine is composed of a number of separate, smaller images. For example, there could be images for the head, torso, arms and legs. These images are attached to bones and the bones are then animated. The images move smoothly when the bones move, enabling the set of images that make up the character to be posed and animated in many ways.
Using Spine begins in Setup Mode, where the bones are created and the images are attached. The upper left corner of the editor will show Setup or Animate to indicate the current mode and this is clickable to toggle between modes.
The Images node in the tree defines where Spine finds images for your skeleton. The images path is relative to where the project file is saved or can be an absolute path. Once the path is set, the images appear under the Images node.
Spine watches the images directory and immediately reflects any changes to the image files.
Positioning the individual images that make up a character can be made easier by importing an image of the fully assembled character and using it as a template to create the bones. To do this, drag your template image from under the Images node in the tree into the editor area, which attaches it to the root bone. Check Background for the template image in the properties underneath the tree, so it can't be selected and won't be exported.
The template image's color can be changed to more easily distinguish between the template image and the rest of the images.
Under the Images node, click an image then shift+click or ctrl+click another to select multiple. Drag these images into the editor area and Spine adds slots for them all under root bone.
Adjust each image using the Translate and Rotate tools so they match the template image.
Images are not attached to a bone directly, instead they are attached to a slot which is attached to a bone. A slot may have many images attached, but only one can be visible at a time. Slots are for organization and allow for more control over the draw order for complex skeletons.
Drag the slots under the Draw Order node in the tree to change the draw order. Slots higher in the list are drawn on top of those lower in the list. You may also use the plus (+) or minus (-) keys on your keyboard to change the draw order of the selected image. Hold shift to jump by 5.
When it is no longer needed, the template image can be hidden by clicking the visibility dot in the tree.
If using Photoshop or Gimp, setting up a skeleton may be simplified with Spine's Photoshop or Gimp script which can be found in the Spine installation directory. The very latest scripts can also be found here. The scripts export layers as PNG files and create a JSON file in Spine's format. Import this JSON by clicking the Spine logo in the upper left, then Import Data, Skeleton. The imported skeleton will have one bone and all the images attached with the correct position and draw order. All that is left for you to do is create the bones, which is described below.
Another productivity tip for Photoshop is to use Adobe Generator. After using Spine's Photoshop script initially, Adobe Generator will keeps the PNG files in sync with the PSD so you never have to do an explicit export step. Since Spine watches the image files and immediately reloads them when they change, this means the images in Spine are kept in sync with the PSD.
Use the Create tool to create new bones. First select the bone that will be the parent of the new bone, then click and drag to create a bone.
While dragging the new bone, press shift (it doesn't need to be held) to select the image under the mouse. When dragging the new bone ends by releasing the mouse button, the selected image will be parented under the new bone.
Using shift with the Create tool is very efficient because you both draw a new bone and change the image parent at the same time.
Later you may need to change the parent of a bone, slot, image or other item. To do that, select the item, press P or click the Set Parent button, then click the new parent in the tree. If choosing a bone to be the parent, you may click the bone in the editor area rather than the tree.
To change the length of a bone, choose the Rotate, Translate or Scale tool, then click and drag the tip of the bone. The length can also be changed in the bone's properties under the tree. If the length is zero, the bone will appear with a different icon in the editor area but is otherwise exactly the same as any other bone.
Bones can be given a color in the bone's properties under the tree. This can make it easier to differentiate between bones.
The Image and Bone buttons under the Compensation section of the toolbar are useful for adjusting bones without affecting attached images or child bones.
Another way to adjust an existing bone is choose the Create tool, select the bone to adjust, then click and drag while holding alt. This will redraw the selected bone without affecting attached images or child bones.
Click the Setup text in the upper left corner of the editor to switch to Animate Mode.
The animation visible under the Animations node in the tree is the animation that will play and be edited in Animate Mode.
Animation is done by posing the skeleton and setting keyframes. When the animation is played, the bones are automatically interpolated between keyframes to achieve smooth movement.
The Dopesheet button expands the dopesheet, which provides an overview of the keyframes. Keys can be dragged to easily tweak and retime the animation.
Typically keyframes are set at frame zero. This is the starting position of the animation. To set a keyframe, click the key icon next to the Translate, Scale, and Rotate tools. A green key means no key is set, yellow means values have been edited but not yet keyed, and red means a key is set.
As a shortcut, pressing K will set a keyframe for all edited values, while pressing L will key the values for the currently active tool. If the Auto Key button is pressed, a key is created automatically whenever a keyable change is made.
Next, click the timeline to jump to a later frame, pose the skeleton, and set keyframes. Click and drag in the timeline to see the skeleton animate smoothly.
The typical workflow for building an animation is to first rough out the major poses, then come back and refine the movements. One way to do this is to click the Playback button, then click the Stepped button.
Stepped disables interpolation between keys, making it easier to see the major poses. Once all of the large movements have been created, Stepped can be disabled and more keys added to refine the interpolation between major poses.
The Graph button expands the graph, which shows the interpolation between the selected key in the dopesheet and the next key.
Non-linear interpolation is key to life-like animation and can be used by clicking the Bezier Curve icon.
Drag the handles in the graph to control the interpolation. The X axis represents the time from the selected key to the next key. The Y axis represents the change in value from the selected key to the next key.