> For the complete documentation index, see [llms.txt](https://docs.decentraland.org/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.decentraland.org/creator/content-creator-zh/chuan-dai-wu-yu-biao-qing/biao-qing/avatar-rig.md).

# 头像骨架

关于头像骨架的基础知识。

Rig 是一个虚拟骨架，用于让模型移动。它由一系列层级排列的独立骨骼组成，很像现实中的骨架，并通过父/子关系来工作。本文将介绍一些基础的绑定概念，例如骨骼位置、骨骼朝向、变形骨骼和非变形骨骼、IK 与 FK 的区别及其用途。关于头像绑定的结构、自定义属性以及动画设置，可在以下内容中找到 [绑定功能](/creator/content-creator-zh/chuan-dai-wu-yu-biao-qing/biao-qing/rig-features.md).

{% hint style="info" %}
**💡 提示**: 安装 [Decentraland Tools Blender 插件](https://extensions.blender.org/add-ons/decentraland-tools/)。它包含一些实用功能，可帮助你编辑和导出 3D 模型、穿戴物和表情动作。
{% endhint %}

## **基础知识**

#### 骨骼位置或枢轴点

虽然 rig 并不是人体骨架的精确复制，但在放置数字骨骼时遵循现实骨骼的位置是一种良好的实践。这样做是为了保证可信且流畅的变形。骨骼位置很重要，因为它决定了枢轴点（即运动开始的地方）。骨骼放置不当会导致网格变形效果很差。下方图片展示了骨骼位置的差异。

![head\_pivot\_rig\_1.0.gif](https://raw.githubusercontent.com/decentraland/documentation-creators/main/images/emotes/head_pivot_rig_1.0.gif)

![head\_pivot\_rig\_2.0.gif](https://raw.githubusercontent.com/decentraland/documentation-creators/main/images/emotes/head_pivot_rig_2.0.gif)

#### 骨骼朝向

骨骼的朝向决定了它们将朝哪个方向旋转，例如正 X、负 Z 等。只要在整个 rig 中保持一致，就可以用许多不同的方式来设置。例如，如果将 X 轴用于脊柱向前弯曲的动作，那么腿部也使用同样的设置就很合理。朝向也很重要，因为它会影响镜像行为。这意味着通常右侧的朝向是左侧的镜像版本，反之亦然。

![](https://2460066822-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FoPnXBby9S6MrsW83Y9qZ%2Fuploads%2Fgit-blob-0ca8cf13d59ffd63b35554c9926c95b15a858756%2FboneAxis.gif?alt=media)

*打开坐标轴以显示骨骼朝向。*

![](https://2460066822-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FoPnXBby9S6MrsW83Y9qZ%2Fuploads%2Fgit-blob-d88dffc01ac9a2cef8e92560d1d474b5ea5b678e%2Fboneorientation.gif?alt=media)

*坐标轴就是骨骼旋转的方向。*

#### 变形骨骼和非变形骨骼

变形骨骼是会让网格产生变形的骨骼，它们负责决定模型的运动方式。这是基础骨架，它 **绝对不应被编辑**。以任何方式修改它都可能破坏 rig，并导致导出后动画无法工作。因此，这个基础 rig 被移到了单独的图层中（最底部的最后一层）。这些骨骼就是随网格一起导出的骨架。

非变形骨骼不会让网格产生变形，但它们在一个健全的 rig 中仍然是必需的，并用于 [IK、FK](#what’s-FK-and-IK-in-a-rig) 以及其他自定义属性的设置。非变形骨骼的例子包括控制器、IK 和 FK 骨骼、脚部设置骨骼等。这些不应导出，它们只用于动画目的。

![](https://2460066822-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FoPnXBby9S6MrsW83Y9qZ%2Fuploads%2Fgit-blob-617f8ee76a78ef3cdf9ddb35a1643e6c2d3ec4a9%2FDeformationBones.png?alt=media)

*变形骨骼。*

![](https://2460066822-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FoPnXBby9S6MrsW83Y9qZ%2Fuploads%2Fgit-blob-dd1eef74806715dfab5aa4ed780e20037c643cb4%2FNonDeformationBones.png?alt=media)

*非变形骨骼。*

{% hint style="warning" %}
⚠️ **注意！** **请勿编辑基础骨架！**
{% endhint %}

![](https://2460066822-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FoPnXBby9S6MrsW83Y9qZ%2Fuploads%2Fgit-blob-efdebcd044a259066f57ea9b43add79cff6cd69c%2FBaseSkeleton.png?alt=media)

*基础骨架。*

#### 控制器

作为良好实践，不应通过操纵变形骨骼来给 rig 制作动画，因为这可能会导致 rig 失效。相反， **动画应通过操纵控制器来完成。**

控制器本质上就是非变形骨骼，这意味着它们不会影响网格，因此可以安全地被操纵和动画化。它们的作用是通过约束和驱动器来控制基础骨架，而不是直接触碰它。它们通常具有不同的形状和颜色，作为其功能和用途的视觉提示，让动画师更容易区分骨骼。其中一些除了位移、旋转和缩放变换外，还会拥有更多属性，因为可以为它们添加自定义属性，例如 IK/FK 切换。

另一个需要注意的重要点是，无法在与最初制作该控制器设置不同的软件中使用它。每种软件都有自己的逻辑，而且约束无法导出。

![](https://2460066822-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FoPnXBby9S6MrsW83Y9qZ%2Fuploads%2Fgit-blob-5a35cfafed8502560e922a62958e0791b8f196d5%2FRigControls.png?alt=media) \_控制器及其不同的形状和颜色。\_

{% hint style="warning" %}
⚠️ **警告**：该 rig 必须在创建它的同一款软件中进行动画制作。比如，无法在 Maya 中使用 Blender 的设置，反之亦然。
{% endhint %}

#### rig 中的 FK 和 IK 是什么？

rig 可以使用两种不同的设置来影响其移动方式：FK 和 IK。

#### FK - 正向动力学

在正向动力学（FK）中，层级中的父级会带动其下所有子骨骼移动。以手臂为例：当肩膀旋转时，整条手臂也会随之旋转；当上臂旋转时，前臂会跟随其运动。在 FK 动画中，每根骨骼都必须单独旋转。这种设置对运动有很强的控制力，非常适合弧形运动，而弧形运动对于流畅动画至关重要。

*层级中的运动方向。*

![](https://2460066822-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FoPnXBby9S6MrsW83Y9qZ%2Fuploads%2Fgit-blob-e80fd8aee4e2111128bd3a0532630b69e9ce7afe%2FFK_GIF.gif?alt=media)

*在 FK 中，每根骨骼都必须单独旋转。*

#### IK - 逆向动力学

在逆向动力学（IK）中，层级中的子级可以影响其父级的运动。以手臂为例，当手移动时，整条手臂都会跟随这个动作。这也意味着，无论肩膀如何移动，手都会保持其位置。在这种设置下，极向量/极点目标会控制骨骼弯曲的方向。腿部通常使用 IK，这对于动画时让脚保持贴地尤为重要。

![](https://2460066822-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FoPnXBby9S6MrsW83Y9qZ%2Fuploads%2Fgit-blob-b740a0f922dfa3bca875d87f15c9809274b124e5%2FIK.png?alt=media)

*层级中的运动方向。*

![](https://2460066822-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FoPnXBby9S6MrsW83Y9qZ%2Fuploads%2Fgit-blob-c98257d54f76eecf00cd6d398d4634d0e9dc1251%2FIK_last.gif?alt=media)

*在 IK 中，手会带动整条手臂移动，并且还能保持它的位置。极点目标控制肘部弯曲的方向。*


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.decentraland.org/creator/content-creator-zh/chuan-dai-wu-yu-biao-qing/biao-qing/avatar-rig.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
