> 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-dong-zuo/biao-qing-dong-zuo/particles-in-emotes.md).

# 表情动作中的粒子

如何使用 Armature 导出表情动作中的粒子

Emotes 2.0 可以包含声音和道具，但你知道它也可以使用粒子吗？这会很有趣，还能为它增添额外的视觉亮点！而且它们也能加快动画制作流程。

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

但由于 Emotes 2.0 不支持对象动画和粒子系统，我们需要将这些粒子转换为骨架（这是支持的），才能把它们添加到表情动作中。为此我们将使用基金会内容团队开发的 Blender 插件，可通过下面的链接下载。

使用 [Blender 的粒子转骨骼插件](https://github.com/decentraland/docs/blob/main/creator/images/emotes/particle_system_to_bone_animation.py) 开始吧！

![](https://2460066822-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FoPnXBby9S6MrsW83Y9qZ%2Fuploads%2Fgit-blob-fedd9930f6fbd3e6633784b91f386b7f73def781%2F01_love_grenade.png?alt=media\&token=480ce63c-7c3a-4360-b3e6-98911d53d005) ![](https://2460066822-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FoPnXBby9S6MrsW83Y9qZ%2Fuploads%2Fgit-blob-6edab81a249a2af117c36e6a020f296e66c248a7%2F02_guitar.png?alt=media\&token=1a3aeae5-21ca-4e66-95b5-7a0c403995b9)

将粒子添加到你的表情动作中的过程分为两个步骤，你可以结合这些视频一起参考指南：

* **将粒子转换为骨架**

[![Video Preview](https://i.vimeocdn.com/video/1803452887-82f74713a8f16df8c3618654f539cfddf78cb1f9dfac951d99d340004ac26ad6-d_590x332)](https://vz-8a0704eb-552.b-cdn.net/bb51a195-4a80-48d3-badd-0bfe6cc9e3b3/playlist.m3u8)

* **将粒子骨架合并到道具骨架**

[![Video Preview](https://i.vimeocdn.com/video/1803464351-0e8bf5158cb87707397a547948f99278b1af45d7669622887a43c3bd9340c064-d_590x332)](https://vz-8a0704eb-552.b-cdn.net/9f512c34-ae83-42fe-a858-165ccea6d0c5/playlist.m3u8)

{% hint style="info" %}
**注意！**

⚠️ 本文档不会介绍如何创建粒子系统。本文的目标是帮助你将其应用到你的表情动作中。
{% endhint %}

## 将粒子转换为骨架

如前所述，Emotes 2.0 不支持对象动画或任何形式的粒子系统。因此我们需要将粒子转换为骨架。

要开始，你需要一个可用的粒子系统和该插件。下方显示的粒子系统非常简单，它只是一个演示该插件如何工作的示例。为了获得更好的效果，请确保你的粒子系统与表情动作的动画相匹配。

![](https://2460066822-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FoPnXBby9S6MrsW83Y9qZ%2Fuploads%2Fgit-blob-92fed0596a56173060223ae8c24d5a382525b0ae%2F03_particles.gif?alt=media\&token=7130242b-19f0-4cb4-b03d-34770666e0e4)

*简单的粒子系统。*

接下来，下载并安装该插件。为此，请前往 编辑 > 首选项 > 插件，并点击 安装 以浏览你电脑中的文件。

![](https://2460066822-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FoPnXBby9S6MrsW83Y9qZ%2Fuploads%2Fgit-blob-fcbbcaa82dcc0fd866c283159bc03a1bb5dd45ad%2F04_add_on_01.png?alt=media\&token=10077070-c8ce-4b9f-8eaf-334d363256b1)

*点击 编辑 > 首选项。*

![](https://2460066822-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FoPnXBby9S6MrsW83Y9qZ%2Fuploads%2Fgit-blob-9112f5928a05ee9d997fda1727bddb8be97d07c0%2F05_add_on_02.png?alt=media\&token=ad69339f-7016-4aa4-b104-1ac0769471cc)

*在右侧选择 插件，然后点击 安装。*

完成后，点击复选框启用它。名为 Converter 的选项卡会出现在视口右侧。

![](https://2460066822-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FoPnXBby9S6MrsW83Y9qZ%2Fuploads%2Fgit-blob-78548b30ab90c198efa1a71f3446bb464bf02585%2F06_add_on_03.png?alt=media\&token=10f53201-27e2-40eb-adb9-d06ad13dc9e0)

*点击复选框以启用该插件。*

![](https://2460066822-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FoPnXBby9S6MrsW83Y9qZ%2Fuploads%2Fgit-blob-4a89c2c64d73b3e97c8dd08f02622d2cfddeaf7f%2F07_add_on_04.png?alt=media\&token=594de0aa-87d6-4c6a-8020-656918a75d84)

*你会在视口右侧找到 Converter 选项卡。*

接下来，选择对象，进入 Converter 选项卡，按需要重命名 Output Collection，设置 Start 和 End Frames，然后点击 Particle System to Armature Converter，如下所示。

![](https://2460066822-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FoPnXBby9S6MrsW83Y9qZ%2Fuploads%2Fgit-blob-f9a4aef139227a8e40a7e4c173d61589360a003a%2F08_particles_converter.gif?alt=media\&token=12dced6c-bf0f-4f16-8616-a8e5b1561f8d)

你会注意到，大纲视图中创建了一个集合，其中包含粒子骨架。还创建了一个动画剪辑，它烘焙了每个对象的所有运动。

![](https://2460066822-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FoPnXBby9S6MrsW83Y9qZ%2Fuploads%2Fgit-blob-dcedfabd28f457c3b2b0d9b1f568b2aa5dc42cf6%2F09_add_on_05.png?alt=media\&token=68cb2b27-7b70-4761-9a3c-4539daa7c692)

*由插件生成的骨架。*

![](https://2460066822-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FoPnXBby9S6MrsW83Y9qZ%2Fuploads%2Fgit-blob-408a3e4d1d65d2580dc2e45b218c49b1af520207%2F10_add_on_06.png?alt=media\&token=17d03ab3-19db-41bb-8b5f-921ad8eb1351)

*由插件生成的动画剪辑。*

到此，粒子转换为骨架就完成了！记得用不同的名称保存文件（保留原文件作为备份），下一步我们还会用到它。

{% hint style="info" %}
**注意！**

⚠️ 粒子应该是添加到表情动作中的最后一个元素。当表情动作准备好后，你将拥有动画的精确时长，这会让你更容易将粒子与所执行的动作同步。
{% endhint %}

## 将粒子骨架合并到道具骨架

Emotes 2.0 每个文件只能有两个骨架和两个动画剪辑。如果我们直接导入粒子，就会得到三个骨架和三个动画剪辑。解决方法是把粒子骨架合并到道具骨架中。之所以合并到道具而不是头像骨架，原因很简单：头像骨架不能通过添加或删除骨骼的方式进行任何编辑。因此，道具骨架就是唯一的选择。

## 将粒子骨架合并到道具骨架

Emotes 2.0 每个文件只能有两个骨架和两个动画剪辑。如果我们直接导入粒子，就会得到三个骨架和三个动画剪辑。解决方法是把粒子骨架合并到道具骨架中。之所以合并到道具而不是头像骨架，原因很简单：头像骨架不能通过添加或删除骨骼的方式进行任何编辑。因此，道具骨架就是唯一的选择。

我们首先要做的是导入或追加由插件生成的集合。你也可以随时先导出它的 glb 文件，再导入到你的表情动作文件中。或者你也可以直接追加该集合，这要简单快捷得多，只需前往 ***文件*** > ***追加***，浏览你电脑中的粒子文件，选择文件夹 ***集合*** ，然后选择所需的集合。

![](https://2460066822-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FoPnXBby9S6MrsW83Y9qZ%2Fuploads%2Fgit-blob-93003f27dab11d88c5d0c1f7a35a20e569ea3414%2F11_merge_01.png?alt=media\&token=c56d86eb-43c3-4c83-8cf8-74af3f4faa06)

*要追加一个集合，请前往 文件 > 追加。*

![](https://2460066822-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FoPnXBby9S6MrsW83Y9qZ%2Fuploads%2Fgit-blob-03f4b688abed6216e6c812330b43feb6be1b769b%2F12_collection_01.png?alt=media\&token=c3e450a6-c83f-4138-b4be-8da068ed4c25)

*浏览到粒子文件后，选择 Collection 文件夹。*

![](https://2460066822-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FoPnXBby9S6MrsW83Y9qZ%2Fuploads%2Fgit-blob-03d1d436119126e84a14cd9dfb175272ac8e9fd6%2F13_collection_02.png?alt=media\&token=8228ec65-748d-420e-87d8-406d04c103fc)

*选择由插件生成的集合（你可以给它重命名）。Particles\_Out 只是此示例中的重命名方式。*

接下来，我们要合并骨架。在对象模式下，先选择粒子骨架，然后按住 Shift 选择道具骨架，再按 Ctrl+J 将它们连接/合并，如下所示。

![](https://2460066822-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FoPnXBby9S6MrsW83Y9qZ%2Fuploads%2Fgit-blob-94982e00e1f6d568203b19c102bd90d8dc0cce36%2F14_merge_armature.gif?alt=media\&token=0bcc80b0-cc8c-4a2c-b396-0c3f24d3d37b)

完成后，粒子看起来可能会乱掉，但别担心，这是过程的一部分。要修复它，依次在大纲视图中选择每个粒子对象，进入对象属性（橙色方块图标），在 Relations 下检查其父级是否为 Armature\_Prop。对所有粒子对象都这样做。这意味着所有对象都是 Armature\_Prop 的子级。

![](https://2460066822-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FoPnXBby9S6MrsW83Y9qZ%2Fuploads%2Fgit-blob-4cef5e6c2c5dbb2ee4983151dd9be0c6bae03f2b%2F15_armature_parent_01.png?alt=media\&token=80f15788-ab6a-4365-9fb8-e76881087b05)

*确保 Armature\_Pop 是每个粒子对象的父级。*

对所有粒子对象都完成上述操作后，在大纲视图中选择第一个粒子对象，进入修改器（蓝色扳手图标），此时 Object 字段会为空。由于这里是修改器选项卡，这意味着你需要在这里选择哪个骨架来驱动该对象。只需点击 Object 并选择 Armature\_Prop，然后对所有粒子对象重复此操作。这样做时，你会注意到粒子对象正在恢复到原始大小，修复了骨架合并时产生的混乱。

![](https://2460066822-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FoPnXBby9S6MrsW83Y9qZ%2Fuploads%2Fgit-blob-0cf4efd9e6dda8f9eebc6469611773942d905ae1%2F16_armature_parent_02.png?alt=media\&token=bf967c75-e5b2-4e90-80e7-382137f12508)

*选择合适的骨架来驱动这些对象。*

现在骨架已经正确合并并设置完成，还差最后一步才能正常工作。如果你尝试播放动画，会发现粒子没有移动。这是因为它们现在已经成为 Armature\_Prop 的一部分，而它播放的是道具动画。记住粒子原本有自己的动画剪辑？现在我们需要做的是，把粒子动画剪辑中的关键帧复制并粘贴到道具动画剪辑中。

为此，进入 ***Pose Mode*** 并在大纲视图中展开 ***Armature\_Prop*** 然后 ***姿态***。选择所有属于粒子的骨骼。

![](https://2460066822-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FoPnXBby9S6MrsW83Y9qZ%2Fuploads%2Fgit-blob-51d18dda68765686af9ba13cdf9dfa9e4a14d284%2F17_merge_armature_02.gif?alt=media\&token=3f881f1c-cf12-4b0b-89e8-86e246b55ca8)

*选择所有粒子骨骼。*

选中骨骼后，在动作编辑器中，选择包含所有关键帧的粒子原始动画剪辑。按 A 全选关键帧，右键单击并复制关键帧。然后选择道具动画，在第一帧上设置一个关键帧，再将粒子动画剪辑中的关键帧粘贴进去。

![](https://2460066822-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FoPnXBby9S6MrsW83Y9qZ%2Fuploads%2Fgit-blob-40f7a2031d8fb8bd41fad014c36e2c3551e66b09%2F18_merge_armature_04.gif?alt=media\&token=6d6b5cde-88e6-4fa6-8770-533306a7bd98)

*将粒子动画中的帧复制到道具动画中。*

完成了！保存文件，务必删除原始粒子动画剪辑，然后像平常一样导出。

如果你需要更多操作说明，请查看 ***导出*** 部分中的 [为你的表情动作添加道具和声音](https://docs.decentraland.org/creator/emotes/props-and-sounds/) 文档。


---

# 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 by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.decentraland.org/creator/content-creator-zh/chuan-dai-wu-yu-biao-qing-dong-zuo/biao-qing-dong-zuo/particles-in-emotes.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
