> 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/particles-in-emotes.md).

# 表情中的粒子

如何使用骨架导出表情中的粒子

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) ![](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)

将粒子添加到你的表情中分为两个步骤，你可以结合这些视频按照指南操作：

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

[![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)

*简单的粒子系统。*

接下来，下载并安装该插件。操作方法：进入 Edit > Preferences > Add-ons，然后点击 Install，在电脑中浏览并选择文件。

![](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)

*点击 Edit > Preferences。*

![](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)

*在右侧选择 Add-ons，然后点击 Install。*

完成后，勾选复选框以启用它。一个名为 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)

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

![](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)

*你会在视口右侧找到 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)

你会注意到，Outliner 中创建了一个包含粒子骨架的集合。系统还通过烘焙每个对象的全部运动创建了一个动画片段。

![](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)

*插件生成的骨架。*

![](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)

*插件生成的动画片段。*

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

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

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

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

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

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

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

我们首先要做的是导入或附加插件生成的集合。你也可以先把它导出为 glb 文件，再导入到你的表情文件中。或者更简单更快捷地附加这个集合，方法是进入 ***File*** > ***Append***，在电脑中浏览粒子文件，选择文件夹 ***Collection*** 并选择所需的集合。

![](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)

*要附加一个集合，请转到 File > Append。*

![](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)

*浏览到粒子文件后，选择 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)

*选择由插件生成的集合（你可以在之前将其重命名）。Particles\_Out 只是这个示例中的重命名名称。*

接下来，我们要合并骨架。在 Object Mode 中，先选择粒子骨架，然后按住 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)

完成后，粒子看起来可能会有些乱，但别担心，这是流程的一部分。要修复它，请在 Outliner 中逐个选择每个粒子对象，进入 Object Properties（橙色方块图标），在 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)

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

在对所有粒子对象都完成这些操作后，先在 Outliner 中选择第一个粒子对象，进入 Modifiers（蓝色扳手图标），此时 Object 字段会是空的。由于这里是 Modifiers 选项卡，这意味着你需要在这里选择由哪个骨架来驱动对象。因此只需点击 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)

*选择正确的骨架来驱动这些对象。*

现在骨架已经正确合并并设置好了，想要正常工作还差最后一步。如果你尝试播放动画，会发现粒子没有移动。这是因为它们现在属于 Armature\_Prop，而它播放的是道具的动画。还记得粒子原本有自己的动画片段吗？我们现在需要做的是把粒子动画片段中的关键帧复制到道具动画片段中。

为此，进入 ***姿态模式*** ，然后在 Outliner 中展开 ***Armature\_Prop*** 然后 ***Pose***。选择所有属于粒子的骨骼。

![](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)

*选择所有粒子骨骼。*

选中这些骨骼后，在 Action Editor 中选择包含所有关键帧的粒子原始动画片段。按 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)

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

完成了！保存文件，确保删除原始的粒子动画片段，然后像平常一样导出。

如果你需要更多操作信息，请查看 ***导出*** 中的部分 [为你的表情添加道具和声音](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 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/particles-in-emotes.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.
