How to use Spine to make simple 2D skeleton animation

In 2D games, we often see various character animations. Animations can bring life and aura to a game. Creating a wonderful animation requires not only powerful software tools, but also a complete workflow.

Spine is a 2D skeletal animation editing tool for game development. Spine can provide a more efficient and streamlined workflow for creating the animations your game needs.

Spine3.8.75 Professional Edition/Chinese

Why choose skeletal animation?

In Spine, the animation is realized by binding the picture to the bone, and then controlling the bone. 2D skeletal animation has the following advantages over traditional frame-by-frame animation:

Smallest size:  Traditional animation needs to provide each frame of picture. The Spine animation only saves the animation data of the skeleton, which takes up very little space and can provide unique animations for your game.

Art requirements:  Spine animation requires less art resources, which can save you more manpower and material resources to better invest in game development.

Fluency:  Spine animations use interpolation algorithms to calculate intermediate frames, which keeps your animations always smooth.

Equipment Attachment:  The picture is bound to the bone to realize the animation. If you need equipment that can easily change roles to meet different needs. Even change the appearance of the character to achieve the effect of animation reuse.

Blending:  Blending between animations is possible. For example, a character can shoot a gun, but also walk, run, jump or swim.

Procedural animation:  You can control the bones through code, such as shooting with the mouse, staring at the enemy, or leaning forward when going uphill.

Spine workflow

skeleton

Take a small animation as an example:

Here is a robot "little garbage". After we finish drawing the game characters in the painting software, we import it into Spine.

In the above, we mentioned that the difference between skeletal animation and traditional animation is that skeletal animation does not draw frame by frame, but binds the picture to the bone, and then controls the bone to realize the animation. Therefore, when drawing characters, we cannot "dry one layer to the end", and we must distinguish the layers of each structure of the character's body according to the needs of the character's movement.

After importing the material, we are about to create the skeleton. Usually, the parent bone drives the child bone to move, which is FK (Forward Kinematics) forward dynamics. Take the bending of the arm as an example, the bending of the forearm will drive the palm to move, instead of the palm staying in place.

Then, when we create bones for the material, we need to determine the relationship between the parent and child sets, and arrange and combine the bone sets.

After completing the skeleton establishment of the whole body, we assign the picture (slot) to the skeleton, and the basic binding is completed.

Mesh and Weights

Weights are used to bind the vertices of the mesh to one or more bones. When the bones are adjusted, the vertices are also adjusted, so that the mesh automatically deforms with the bones.

After completing the setting of bones and weights, move the bones, and the software will automatically calculate the distortion and changes caused by the material, thereby realizing animation.
animation

In the animation production stage, add key frames to the bones on the time axis, perform operations such as deformation and displacement, and many others.

After completing the animation, adjust the curve (the playback speed of each stage of the animation) and many other options, and our little robot walking animation is complete. Compared with bone binding, grid and weight setting, in 2D skeletal animation, the specific animation production is undoubtedly a relatively more challenging process, and there are more factors that need to be considered in the production process.

Guess you like

Origin blog.csdn.net/xujialu123/article/details/131561270