Mesh_Data_Set
Reassemble a mesh from raw data — the setter to Mesh_Data_Get's getter
- mesh
- vertex
- face
- Normal_vnfn
- UVs_vtft
- vertex_color
- Texture_Diffuse
- Texture_reflection
- mesh
Mesh_Data_Set is the constructor half of the pack's data story. Where Mesh_Data_Get tears a MESH into raw arrays and textures, this node takes those same pieces and builds a mesh back out of them. Run them in sequence - Get, edit the numbers, Set - and you've got a read-modify-write loop for 3D data that the pack's array and tensor tools happily feed.
It's also the escape hatch when you have geometry sitting in plain lists (say, from a script or a non-mesh node) and need to turn it into something the mesh pipeline understands.
How it works
Everything except the device selector is optional, and the node fills in only what you give it. If no mesh is connected it creates an empty one from scratch. Then it assigns each provided piece to the right slot:
vertex→ positions, cast to float32face→ triangle indices, cast to int64Normal_vnfn→ vertex normals ([0]) and face-normal indices ([1])UVs_vtft→ UV coordinates ([0]) and UV face indices ([1])vertex_color→ per-vertex colorsTexture_Diffuse→ the albedo texture (as an IMAGE)Texture_reflection→ the metallic-roughness texture
The device dropdown is the one required input: Default (keeps whatever device the input mesh is on, or falls back to CPU for a brand-new mesh), cpu, or cuda:0 - with more GPU entries if you have multiple cards.
The output
mesh(MESH) - your rebuilt or patched mesh.
The Normal_vnfn and UVs_vtft inputs expect the same [data, indices] pairs that Mesh_Data_Get outputs, so the two nodes round-trip without you splitting anything by hand.
Install
It's part of ComfyUI-3D-MeshTool:
cd ComfyUI/custom_nodes
git clone https://github.com/807502278/ComfyUI-3D-MeshTool
cd ComfyUI-3D-MeshTool
pip install -r requirements.txt
Restart ComfyUI. Or install via ComfyUI Manager (search "ComfyUI-3D-MeshTool").
Common issues
The node does no validation - it casts and assigns whatever it's handed. Feed it a face array with an index pointing past the end of vertex and you'll get a mesh that renders with holes or crashes downstream renderers. So the practical rule: only modify data you got from Mesh_Data_Get, and keep the row counts consistent with the original (edit values, don't delete rows, unless you know what you're doing). If a texture comes out wrong, check that you're feeding an IMAGE on the texture sockets - the node doesn't convert those, it just stores them.
Inputs (9)
| Name | Type | Default | Description |
|---|---|---|---|
| device | COMBO | 3 options: Default, cpu, cuda:0 | |
| meshopt | MESH | — | |
| vertexopt | LIST | — | |
| faceopt | LIST | — | |
| Normal_vnfnopt | LIST | — | |
| UVs_vtftopt | LIST | — | |
| vertex_coloropt | LIST | — | |
| Texture_Diffuseopt | IMAGE | — | |
| Texture_reflectionopt | IMAGE | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| mesh | MESH | — |