> ## Documentation Index
> Fetch the complete documentation index at: https://docs.comfy.org/llms.txt
> Use this file to discover all available pages before exploring further.

# DecimateMesh - ComfyUI Built-in Node Documentation

> Simplifies a 3D mesh to a target face count using QEM (quadric error metric) simplification, running the computation on the active compute device.

Simplifies a 3D mesh to a target face count using QEM (quadric error metric) simplification, running the computation on the active compute device. The `"midpoint"` placement mode is the cumesh-faithful preset that provides the best quality while preserving thin features such as hair, whereas `"qem"` places vertices at the QEM-optimal position with optional line and feature-edge controls. The output mesh stays welded.

## Inputs

### Common Inputs

| Parameter | Description | Data Type | Required | Range |
| - | - | - | - | - |
| `mesh` | The 3D mesh to simplify. | MESH | Yes | - |
| `target_face_count` | Target max faces. 0 disables. (default: 200000) | INT | Yes | 0 to 50000000 |
| `placement_mode` | midpoint: cumesh-faithful (recommended). qem: QEM-optimal placement. (default: `"midpoint"`) | DYNAMIC\_COMBO | Yes | `"midpoint"`<br />`"qem"` |

### Midpoint Inputs

The `"midpoint"` placement mode does not expose additional sub-parameters; it uses the default midpoint placement preset.

### QEM Inputs

The following sub-parameters appear in the interface only when `placement_mode` is set to `"qem"`.

| Parameter | Description | Data Type | Required | Range |
| - | - | - | - | - |
| `line_quadric_weight` | Per-edge line-quadric weight; preserves sharp ridges/valleys. 0 = off. (default: 0.0) | FLOAT | No | 0.0 to 100.0 |
| `feature_edge_quadric_weight` | Extra quadric weight on dihedral feature edges (creases). 0 = off. (default: 0.0) | FLOAT | No | 0.0 to 1000.0 |
| `feature_edge_min_dihedral_deg` | Minimum dihedral angle (degree) to count an edge as a feature edge. (default: 30.0) | FLOAT | No | 0.0 to 180.0 |
| `clamp_v_to_edge` | Project the QEM-optimal position onto the collapsed edge segment. (default: true) | BOOLEAN | No | `true`<br />`false` |

Note: Decimation is skipped when `target_face_count` is 0 or when the mesh already has no more faces than the target. The node displays a face reduction summary on itself, for example `faces: 1.23M → 200K (-84%)`.

## Outputs

| Output Name | Description | Data Type |
| - | - | - |
| `mesh` | The simplified mesh with the reduced face count; connectivity stays welded. | MESH |

> This documentation was AI-generated. If you find any errors or have suggestions for improvement, please feel free to contribute! [Edit on GitHub](https://github.com/Comfy-Org/embedded-docs/blob/main/comfyui_embedded_docs/docs/DecimateMesh/en.md)

***

**Source fingerprint (SHA-256):** `55336e5b52e27d940e5402ecd74fd0ac847a1c6acd35955eccf72aab8ed940f9`


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.