Visit ComfyUI Online for ready-to-use ComfyUI environment
Optimize 3D mesh models by reducing face count for improved performance and file size, leveraging meshlib.mrmeshpy library.
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.
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.
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.
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.
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.
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.
target_face_ratio that retains about 50% of the original faces, and adjust as needed based on visual inspection.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.meshlib library is not installed in your Python environment, which is required for the decimation process.meshlib library by running the command pip install meshlib in your terminal or command prompt.target_face_num nor target_face_ratio has been specified, which are necessary to determine the level of decimation.target_face_num or target_face_ratio parameter to a valid value before running the node.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.