> For the complete documentation index, see [llms.txt](https://docs.convai.com/api-docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.convai.com/api-docs/zh/cha-jian-yu-ji-cheng/convai-unity-sdk/getting-started/add-lip-sync/create-a-custom-blendshape-map.md).

# 创建自定义口型同步映射

口型同步映射将源 blendshape 通道（来自传输流）路由到你的角色上的实际 blendshape 名称 `SkinnedMeshRenderer`。当你的骨骼绑定使用的 blendshape 名称与随附的直通映射所预期的不同时，或者当你需要为特定角色微调权重时，请创建自定义映射。

{% stepper %}
{% step %}

#### 创建资源

在 Project 窗口中，导航到你想存储该映射的文件夹。右键单击并选择 **创建 > Convai > 口型同步映射**。为资源起一个具有描述性的名称，例如 `ConvaiLipSyncMap_MyRig_FromARKit`.
{% endstep %}

{% step %}

#### 配置顶层字段

选中新的资源以在 Inspector 中打开它。

**顶层字段：**

| 字段            | 默认值    | 说明                                                    |
| ------------- | ------ | ----------------------------------------------------- |
| **目标配置文件 ID** | *(空)*  | 此映射所针对的配置文件 ID（例如 `arkit`, `metahuman`，或你的自定义配置文件 ID） |
| **说明**        | *(空)*  | 可选的设计备注 — 运行时不使用                                      |
| **全局乘数**      | `1.0`  | 写入前应用于所有输出权重的缩放（0–3）                                  |
| **全局偏移**      | `0.0`  | 添加到所有输出权重的偏移（-1–1）                                    |
| **允许未映射直通**   | `true` | 没有显式映射条目的通道会直接使用其源名称写入                                |

**映射条目：**

单击 **+** 在 **映射** 列表以添加新条目。每个条目将一个源通道映射到一个或多个目标 blendshape 名称。

| 条目字段             | 默认值     | 说明                                             |
| ---------------- | ------- | ---------------------------------------------- |
| **源 Blendshape** | *(空)*   | 从 Convai 接收时通道的名称（例如 `jawOpen`)                |
| **目标名称**         | *（空列表）* | 你角色上的 blendshape 名称 `SkinnedMeshRenderer` 所驱动的 |
| **乘数**           | `1.0`   | 每个条目在全局乘数之前应用的缩放（0–5）                          |
| **偏移**           | `0.0`   | 每个条目的偏移（-1–1）                                  |
| **已启用**          | `true`  | 可切换此条目的开关，而无需删除它                               |
| **最小值夹紧**        | `0.0`   | 最小输出值（0–1）                                     |
| **最大值夹紧**        | `1.0`   | 最大输出值（0–1）                                     |
| **使用覆盖值**        | `false` | 启用后，始终写入 **覆盖值** 而不是流值                         |
| **覆盖值**          | `0.0`   | 当 **使用覆盖值** 启用时写入的固定值                          |
| **忽略全局修饰符**      | `false` | 省略 **全局乘数** 是位于 **全局偏移** 用于此条目                 |

{% hint style="info" %}
**允许未映射直通** 当你的大多数 blendshape 名称与源通道匹配时，这很有用——你只需要为不同的那些添加条目。未映射的通道会直接使用其源名称写入。
{% endhint %}
{% endstep %}

{% step %}

#### 将映射分配给组件

在 `ConvaiLipSyncComponent` 在 Inspector 中，将你的新映射资源拖入 **映射** 字段中。

进入 Play Mode 并对角色说话。所有已映射的 blendshape 都会动画。检查 Unity Console 中是否有关于无法解析的 blendshape 名称的任何警告。
{% endstep %}
{% endstepper %}

### 使用示例

#### 示例 1：从 ARKit 流到自定义骨骼

**场景：** 某个模拟角色由一位艺术家进行了骨骼绑定，他使用了 snake\_case 命名（`jaw_open`, `mouth_smile_left`）而不是 ARKit 标准的 camelCase 名称（`jawOpen`, `mouthSmileLeft`).

**设置：**

* 创建 `ConvaiLipSyncMap_CustomRig_FromARKit.asset`
* 目标配置文件 ID： `arkit`
* 允许未映射直通： `false` (所有名称都不同)
* 为每个 blendshape 添加条目：

| 源 blendshape      | 目标名称                |
| ----------------- | ------------------- |
| `jawOpen`         | `jaw_open`          |
| `mouthSmileLeft`  | `mouth_smile_left`  |
| `mouthSmileRight` | `mouth_smile_right` |
| *(对所有需要的通道继续)*    |                     |

**预期结果：** 尽管使用了不同于 ARKit 标准的命名约定，角色的嘴部仍能正确动画。

#### 示例 2：降低下颌运动强度

**场景：** 一个 AI 前台接待角色在说话时下颌张得太大，看起来不自然。

**设置：**

* 复制随附的 `ConvaiLipSyncDefaultMap_ARKit.asset` 并将其重命名为
* 找到 `jawOpen` 条目
* 设置 **乘数** 到 `0.6` 是位于 **最大值夹紧** 到 `0.7`

**预期结果：** 角色的下颌只张开原始流值的 60–70%，从而产生更克制、更自然的口部运动。

### 下一步

在配置好口型同步后，请验证你的整个场景设置。

{% content-ref url="/pages/21a0b0c11649e9125ef5195167e66c3a2caaadf1" %}
[验证你的设置](/api-docs/zh/cha-jian-yu-ji-cheng/convai-unity-sdk/getting-started/validate-your-setup.md)
{% endcontent-ref %}


---

# 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:

```
GET https://docs.convai.com/api-docs/zh/cha-jian-yu-ji-cheng/convai-unity-sdk/getting-started/add-lip-sync/create-a-custom-blendshape-map.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
