Mesh to Point Cloud
When you want points, not polygons
- trimesh
- point_cloud
Some downstream tools simply don't want triangles - they want points. Point-cloud networks, gaussian-splatting tooling, distance-field computations, and a bunch of analysis code all prefer a raw set of samples over a mesh with faces. This node is the bridge: Mesh to Point Cloud converts a TRIMESH into a point cloud. The output type is still TRIMESH (that's how this pack represents point clouds - the mesh type with no faces), so it feeds the pack's other point-cloud-aware nodes, like Add Normals to PointCloud.
Two inputs at the top, and they define two very different modes:
mode-strip_adjacencyuses the mesh's existing vertices directly, no new samples.surface_samplingsamples fresh points across the surface. This choice is the whole personality of the node.include_normals- carry surface normals along with the points. Keep it on unless you know your consumer doesn't want them; normals are cheap and every point-cloud algorithm I've met is happier with them.
If you pick surface_sampling you get two more knobs:
sample_count- how many points to generate. The density dial. 10,000 is a light default; go up for fine detail.sampling_method- the sampling strategy (uniform over the surface, plus whatever other strategies the pack offers). Uniform is the sensible start.
Where it fits
The classic chain: Load Mesh → repair → Mesh to Point Cloud → Add Normals to PointCloud → whatever consumes points. It's also the honest way to analyze a mesh - a dense point sample is what many distance and shape metrics actually want. If you're going the other direction (points back into a surface), the pack's Reconstruct Surface family (Poisson, alpha wrap) is the return trip.
Install
Standard pack install:
cd ComfyUI/custom_nodes
git clone https://github.com/PozzettiAndrea/ComfyUI-GeometryPack.git
cd ComfyUI-GeometryPack
pip install -r requirements.txt --upgrade
python install.py
Or ComfyUI Manager → GeometryPack. Usual caveats: experimental comfy-env/pixi install with a heavy first download; fast-moving repo, reports to Discussions.
Watch out
strip_adjacency gives you exactly the mesh's vertex count - so a low-poly model becomes a disappointingly sparse cloud. If you want density, you want surface_sampling with a real sample_count. And remember the cloud doesn't remember the surface: once you've stripped the faces, features that lived in the topology (like which points were connected) are gone. If you might want the surface back later, keep the original mesh around rather than assuming a point cloud can regenerate it faithfully.
Inputs (5)
| Name | Type | Default | Description |
|---|---|---|---|
| trimesh | TRIMESH | — | |
| mode | COMBO | strip_adjacency | strip_adjacency: use mesh vertices directly. surface_sampling: sample points from surface. |
| sample_countopt | INT | 10000100–10000000 | Number of points to sample (only for surface_sampling mode) |
| sampling_methodopt | COMBO | uniform | Sampling strategy (only for surface_sampling mode) |
| include_normalsopt | COMBO | true | 2 options: true, false |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| point_cloud | TRIMESH | — |