Nodes/ComfyUI/Save Point Cloud
ComfyUI Node Runs on cloud

Save Point Cloud

Writing N×7 clouds to disk as .ply or .npy, depending on who's reading

By Comfy-Org·Created 4 years ago·Updated about an hour ago· 130,947
Save Point Cloud
  • model_3d
  • viewport_state
  • model_3d_info
  • camera_info
  • model_3d
  • model_3d_info
  • camera_info
  • width
  • height
filename_prefix3d/ComfyUI
width1024
height1024

Point clouds in camera-comfyUI are N×7 tensors - x, y, z, then RGB and alpha. SavePointCloud is how you get that tensor out of the graph and onto disk, in whichever of the two formats the pack supports: .ply or .npy. The choice is genuinely a "who's going to read this file" decision, and the README spells out the tradeoff plainly: .npy is fast and preserves the tensor exactly, .ply is the format every external 3D tool understands.

Use .npy when the cloud is staying inside the pipeline family - the pack's own LoadPointCloud reads it back in one step, byte-for-byte, no conversion, no loss. Use .ply when the destination is a human or a different program: open it in CloudCompare, Meshlab, Blender, or any point-cloud viewer, share it, or hand it to photogrammetry tooling. If you're doing iterative work, .npy in and out is the pragmatic default and you export .ply at the end when the cloud is final.

The inputs

  • pointcloud - the N×7 tensor (x y z + RGB + alpha).
  • save_as - ply or npy, default ply.
  • filename_prefix - default ComfyUIPointCloud; supports %date:yyyy-MM-dd%-style format tokens, with a counter appended.

It's an output node - nothing comes out the right side, you just get a UI entry pointing at the written file in ComfyUI/output/.

How it works

The .ply path uses Open3D to write the cloud with positions and colors (and alpha, when present). If Open3D isn't available, it falls back to a plain ASCII PLY writer, so the node never hard-fails on a missing dependency - worth knowing if you ever see a warning in the console but a valid file anyway. .npy is a straight numpy.save of the tensor. Colors are clipped to 0–1 on the PLY path, which matches how the pack's color tensors are normalized.

Installing it

It's part of camera-comfyUI; install the pack once. Manager → Custom Nodes Manager → camera-comfyUI → Install → restart, or:

cd ComfyUI/custom_nodes
git clone https://github.com/Alexankharin/camera-comfyUI.git
cd camera-comfyUI && python install.py

No optional dependencies required - though installing the base requirements (which include Open3D) gets you the better PLY writer.

Common issues

  • Colors look wrong in an external viewer - the pack normalizes color to 0–1, so check your viewer's expectations. Most handle it fine, some expect 0–255.
  • .ply opens but has no color - you fed a cloud without color columns (N×6 or fewer). The pack expects N×7; check upstream (DepthToPointCloud outputs the full form).
  • Huge ASCII files - that's the fallback writer without Open3D; installing the pack's requirements gets the binary writer and smaller files.

Get it saved, then get it somewhere useful.

Category3d

Inputs (7)

NameTypeDefaultDescription
model_3dFILE_3D_POINT_CLOUD_ANY,FILE_3D_PLYPoint cloud file (.ply)
filename_prefixSTRING3d/ComfyUI
viewport_stateLOAD_3D
widthINT10241–4096
heightINT10241–4096
model_3d_infooptLOAD3D_MODEL_INFO
camera_infooptLOAD3D_CAMERA

Outputs (5)

NameTypeDescription
model_3dFILE_3D_POINT_CLOUD_ANY
model_3d_infoLOAD3D_MODEL_INFO
camera_infoLOAD3D_CAMERA
widthINT
heightINT