基本概念
Knowledge of these basic concepts is necessary to set up your own skeletons.
为了设置你的骨架,了解这些基本概念是非常有必要的。
骨架
Each skeleton in the project appears in the tree view, along with all the bones, slots, attachments, and other information that make up the skeleton. A project may have multiple skeletons by choosing New Skeleton
from the Spine menu.
项目树形视图中的每个骨架,由骨骼,插槽,附属部件,以及其他信息构成。一个项目中,可以通过选择Spine菜单中的New Skeleton来创建多个骨架。
骨骼
A skeleton has a hierarchy bones. Each bone has a scale, rotation, and translation which is called the bone's transform or SRT. When a bone is transformed, its children are affected. For example, moving an arm bone will also move the hand bone. This hierarchical nature of the bones make manipulating images more intuitive, allowing the animator to focus on the large scale motion. It also makes it easy to keep the distance between elements consistent, when desired.
一个骨架拥有一个骨骼的层级结构。每个骨骼都有一个缩放、旋转和平移信息,这就是所谓的骨骼的矩阵变换或SRT。当骨骼变换时,其子骨骼也会受到影响。例如,移动手臂骨骼也将移动手掌的骨骼。骨骼的这种分层特性使得操纵图像更加直观,让动画师专注于大规模的运动。它也可以很容易地保持元件之间的距离一致,当需要时。
Bones are used for most animation in Spine, even skeletons that are not humanoid or animal. Simple skeletons can use a bone per image. Meshes can be used to animate images without using bones.
在Spine中,骨骼可用于大多数动画,即使骨架不属于人类或动物。简单情况下,一张图片可以设置一个骨骼。可用使用网格来制作图像动画而不需要骨骼。
附属部件
In skeletal animation, an image, mesh or other "attachment" is attached to a bone, then when the bone is transformed (translated, rotated, or scaled) the attachment is also transformed. However, in Spine attachments are not attached directly to a bone. Instead, attachments are attached to a "slot" and the slot is attached to a bone.
在骨骼动画中,图像,网格或其它“附属部件”都被附着在到骨骼上,当骨骼被变换(平移,旋转和缩放)时,这些附件也会改变。然而,在Spine中,附件不能直接附着在骨骼上。代替方案是,附件被附着在一个插槽上,而插槽被附着在一块骨骼上。
root
is a bone with two slots, eyes
and head
, and each slot has an attachment with the same name.
root
是一个骨头,有两个插槽,分别是眼睛和头部,并且每个插槽都有一个同名的附件附着在上面。
插槽
Slots exist to facilitate flexible draw order. The draw order for a skeleton is a list of slots, where attachments for slots higher in the list are drawn on top of those below. The draw order can be seen under the skeleton in the tree.
插槽的存在是为了方便灵活的绘制顺序。骨架的绘制顺序是根据插槽的顺序来显示的,附件的插槽越是在插槽列表的上面就越早被绘制。骨架的绘制顺序可以再树形视图中查看。
Slots decouple bones from the draw order, allowing attachments on the same bone to be drawn above and below an attachment on a different bone. For example, the torso bone has slots belly
and shirt
, the hip bone has slot pants
. Slots allow belly
to be drawn under pants
and shirt
to be drawn above pants
, even though both belly
and shirt
are on the same bone.
在渲染顺序中,插槽和骨骼的嵌套,这允许同一骨骼下的附件被绘制在另一附件骨骼的上面和下面。
A slot can have any number of attachments, but only one attachment can be visible at any given time. A slot cannot have multiple attachments visible at the same time because the order those attachments are drawn would be undefined.
Slots also group attachments of the same type. For example, a weapon
slot may have a knife
, sword
, axe
, etc. Only the weapon
slot appears in the draw order, which simplifies managing the draw order when the skeleton has a large number of attachments.