> For AI agents: the complete documentation index is available at /llms.txt, the full documentation bundle is available at /llms-full.txt.

# 为网格着色（PaintMesh）

<div class="node-meta"><code>PaintMesh</code><span>3d/mesh</span><span>角色：3D 网格</span></div>

PaintMesh 接收一个 3D 网格和一个体素颜色场。它为每个顶点分配场中最近体素的颜色，并返回应用了这些顶点颜色的网格。如果体素场为空，则使用默认零（黑色）顶点颜色绘制网格。

## 参数

| 参数             | 类型        | 默认 / 范围 | 说明            |
| -------------- | --------- | ------- | ------------- |
| `mesh`         | MESH · 网格 | —（连线输入） | 已应用顶点颜色的绘制网格。 |
| `voxel_colors` | VOXEL     | —（连线输入） | —             |

## 输出

| 输出   | 类型   | 说明 |
| ---- | ---- | -- |
| mesh | MESH | 网格 |

## 怎么接

- **上游**：Load3D / 3D 生成模型
- **下游**：SaveGLB / RenderMesh
- **接线**：上游接 3D 生成模型或 Load3D，输出接 RenderMesh（出图）、SaveGLB（导出）或下一个网格处理节点；注意单位与坐标系保持一致。

## 使用案例

从 `mesh`、`voxel_colors` 开始填就能跑起来。典型接法：`Load3D` → 本节点 → `SaveGLB`。输出类型是 MESH，只能接同类型的输入端口，颜色对不上就是接错了。

## 端口与连线示意

![PaintMesh 端口与连线示意](/svg/PaintMesh.svg)

## 同类节点

[网格简化](/nodes/11/DecimateMesh.md) · [填充孔洞](/nodes/11/FillHoles.md) · [获取网格信息](/nodes/11/GetMeshInfo.md) · [合并网格](/nodes/11/MergeMeshes.md) · [平滑网格法线](/nodes/11/MeshSmoothNormals.md) · [重新网格化网格（窄带 DC）](/nodes/11/RemeshMesh.md) · [渲染网格](/nodes/11/RenderMesh.md) · [旋转网格](/nodes/11/RotateMesh.md) · [焊接顶点](/nodes/11/WeldVertices.md)
