ComfyUI > Nodes > ComfyUI-Hunyuan3d-2-1 > Hunyuan 3D 2.1 Meshlib Decimation

ComfyUI Node: Hunyuan 3D 2.1 Meshlib Decimation

Class Name

Hy3D21MeshlibDecimate

Category
Hunyuan3D21Wrapper
Author
visualbruno (Account age: 5579days)
Extension
ComfyUI-Hunyuan3d-2-1
Latest Updated
2025-08-11
Github Stars
0.23K

How to Install ComfyUI-Hunyuan3d-2-1

Install this extension via the ComfyUI Manager by searching for ComfyUI-Hunyuan3d-2-1
  • 1. Click the Manager button in the main menu
  • 2. Select Custom Nodes Manager button
  • 3. Enter ComfyUI-Hunyuan3d-2-1 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

Hunyuan 3D 2.1 Meshlib Decimation Description

Optimize 3D mesh models by reducing face count for improved performance and file size, leveraging meshlib.mrmeshpy library.

Hunyuan 3D 2.1 Meshlib Decimation:

The Hy3D21MeshlibDecimate node is designed to optimize 3D mesh models by reducing the number of faces, which is a process known as decimation. This node is particularly useful for artists and designers who need to simplify complex 3D models while maintaining their essential shape and features. By reducing the face count, the node helps in improving rendering performance and reducing file sizes, making it easier to work with 3D models in various applications. The node leverages the meshlib.mrmeshpy library to perform decimation, ensuring high-quality results. It offers flexibility by allowing you to specify either a target number of faces or a target face ratio, providing control over the level of detail retained in the decimated mesh.

Hunyuan 3D 2.1 Meshlib Decimation Input Parameters:

trimesh

The trimesh parameter represents the input 3D mesh that you want to decimate. It is expected to be a mesh object containing vertices and faces. This parameter is crucial as it serves as the base model that will undergo the decimation process.

subdivideParts

The subdivideParts parameter is a boolean that determines whether the mesh should be subdivided into parts before decimation. This can be useful for maintaining the integrity of different sections of the mesh during the decimation process. The default value is False.

target_face_num

The target_face_num parameter specifies the exact number of faces you want the decimated mesh to have. If set to a value greater than zero, the node will attempt to reduce the mesh to this specific face count. This parameter provides precise control over the decimation level. The default value is 0, which means it is not used unless specified.

target_face_ratio

The target_face_ratio parameter defines the proportion of the original face count to retain in the decimated mesh. It is a float value between 0.0 and 1.0, where 1.0 retains all faces, and 0.0 would remove all faces (though this is not practical). This parameter allows for a more flexible approach to decimation compared to specifying an exact face count. The default value is 0.0.

Hunyuan 3D 2.1 Meshlib Decimation Output Parameters:

new_mesh

The new_mesh output parameter is the resulting 3D mesh after the decimation process. It contains the vertices and faces of the simplified mesh, reflecting the reduction in face count as specified by the input parameters. This output is crucial for further processing or rendering tasks, as it provides a more efficient version of the original mesh.

Hunyuan 3D 2.1 Meshlib Decimation Usage Tips:

  • To achieve a balanced reduction in face count while maintaining model quality, start by setting a target_face_ratio that retains about 50% of the original faces, and adjust as needed based on visual inspection.
  • Use the subdivideParts option if your mesh consists of distinct sections that should be preserved during decimation, as this can help maintain the structural integrity of complex models.

Hunyuan 3D 2.1 Meshlib Decimation Common Errors and Solutions:

ImportError: meshlib not found. Please install it using 'pip install meshlib'

  • Explanation: This error occurs when the meshlib library is not installed in your Python environment, which is required for the decimation process.
  • Solution: Install the meshlib library by running the command pip install meshlib in your terminal or command prompt.

ValueError: target_face_num or target_face_ratio must be set

  • Explanation: This error indicates that neither target_face_num nor target_face_ratio has been specified, which are necessary to determine the level of decimation.
  • Solution: Ensure that you set either the target_face_num or target_face_ratio parameter to a valid value before running the node.

Hunyuan 3D 2.1 Meshlib Decimation Related Nodes

Go back to the extension to check out more related nodes.
ComfyUI-Hunyuan3d-2-1
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.