Save 4 hours! We auto-setup your workflow! Free!

Drop your workflow.json — we handle every dependency, custom node, and model. Just open the link and run.

Auto-Setup Workflow Json (Free) Now!
ComfyUI > Nodes > ComfyUI-Hunyuan3D > Mesh to Trimesh

ComfyUI Node: Mesh to Trimesh

Class Name

Hy3DMeshToTrimesh

Category
Hunyuan3D
Author
unlimitedediting (Account age: 253days)
Extension
ComfyUI-Hunyuan3D
Latest Updated
2026-09-01
Github Stars
0.0K

How to Install ComfyUI-Hunyuan3D

Install this extension via the ComfyUI Manager by searching for ComfyUI-Hunyuan3D
  • 1. Click the Manager button in the main menu
  • 2. Select Custom Nodes Manager button
  • 3. Enter ComfyUI-Hunyuan3D in the search bar
After installation, click the Restart button to restart ComfyUI. Then, manually refresh your browser to clear the cache and access the updated list of nodes.

Visit ComfyUI Online for ready-to-use ComfyUI environment

  • Free trial available
  • 16GB VRAM to 80GB VRAM GPU machines
  • 400+ preloaded models/nodes
  • Freedom to upload custom models/nodes
  • 200+ ready-to-run workflows
  • 100% private workspace with up to 200GB storage
  • Dedicated Support

Run ComfyUI Online

Mesh to Trimesh Description

Converts a ComfyUI MESH to TRIMESH using the first vertex and face entries for downstream nodes.

Mesh to Trimesh:

Hy3DMeshToTrimesh converts a ComfyUI mesh into a trimesh object so you can pass its geometry to a workflow step that expects the TRIMESH type. The conversion uses the mesh’s stored vertices, which describe points in 3D space, and faces, which describe how those points connect to form the surface. It takes the first entry from each collection; it does not process additional entries or expose settings for changing the geometry.

Mesh to Trimesh Input Parameters:

mesh

A required MESH object to convert. The node reads mesh.vertices[0] and mesh.faces[0] and passes them to the trimesh constructor. This means the first vertex and face entries determine the result; any later entries are not used. Connect a mesh whose first entries contain compatible geometry. The interface specifies no minimum, maximum, default value, or selectable options for this input.

Mesh to Trimesh Output Parameters:

trimesh

The resulting TRIMESH object, constructed from the first vertex and face entries of the input mesh. Its vertices represent positions in 3D space, while its faces describe connections between those positions. Connect this output to a downstream node that accepts TRIMESH. The node’s tooltip describes the object as containing vertices and faces as NumPy arrays, although the shown method does not explicitly convert the supplied data to NumPy arrays.

Mesh to Trimesh Usage Tips:

  • Place this node between a MESH-producing node and a node that requires TRIMESH. It changes the geometry’s container type; the source shows no controls for editing the shape.
  • Check that the geometry you want is in the first vertex and face entries. This node selects index 0 from both collections and does not provide a batch-selection setting.
  • If conversion fails, inspect the upstream mesh before adding processing steps: its vertex and face collections must exist, contain a first entry, and describe compatible geometry.
  • There are no configuration settings to tune on this node. Prepare or repair the mesh upstream when you need different geometry.

Mesh to Trimesh Common Errors and Solutions:

'NoneType' object has no attribute 'vertices'

  • Explanation: The node received no mesh object and could not read its vertices.
  • Solution: Connect a node that produces a valid MESH and check that the upstream step completed successfully.

AttributeError: '<type>' object has no attribute 'vertices' or AttributeError: '<type>' object has no attribute 'faces'

  • Explanation: The supplied object does not have one of the properties this conversion reads. The exact type name and message depend on the object received.
  • Solution: Check that the connection supplies a compatible MESH object, rather than another data type.

IndexError: list index out of range

  • Explanation: A vertex or face collection may be empty, so its first entry at index 0 cannot be read. The exact error wording depends on the collection type.
  • Solution: Check the upstream mesh and ensure it contains both vertex and face data before converting it.

NameError: name 'Trimesh' is not defined

  • Explanation: This can occur if Trimesh is unavailable when the node runs. The supplied excerpt does not show how that name is imported or defined, so it does not establish whether this error will occur in a complete installation.
  • Solution: Check that the node package is installed completely and that its required trimesh-related dependency is available; consult the package’s installation instructions for the correct setup.

Constructor error about invalid vertices or faces

  • Explanation: If the first entries exist but have an unsuitable shape, type, or relationship, the trimesh constructor may reject them. The exact message depends on the data and the constructor implementation, which are not shown here.
  • Solution: Inspect or regenerate the mesh upstream so its first vertex entry contains usable positions and its first face entry refers to those vertices correctly.

Mesh to Trimesh Related Nodes

Go back to the extension to check out more related nodes.
ComfyUI-Hunyuan3D
RunComfy
Copyright 2025 RunComfy. All Rights Reserved.

RunComfy is the premier ComfyUI platform, offering ComfyUI online environment and services, along with ComfyUI workflows featuring stunning visuals. RunComfy also provides AI Models, enabling artists to harness the latest AI tools to create incredible art.

Mesh to Trimesh