Nodes/ComfyUI_depthMapOperation/Points To Image advance (Projection)
ComfyUI Node

Points To Image advance (Projection)

The projection renderer with hole-filling — the one you'll actually reach for

By chri002·Created about a year ago·Updated about a year ago· 15
Points To Image advance (Projection)
  • images
  • points
  • IMAGE
colorfalse
fov35.0
correctfalse
ksize2
threshold2

If I could only keep one renderer out of this pack, it'd be this one. Points To Image advance (Projection) is the perspective camera from Points To Image (Projection) plus the hole-filling pass from the advance ortho node - everything you need to render a transformed cloud back into something worth looking at, without needing a second node to patch it up.

It earns that "advance" name honestly. Perspective projection gives you the parallax-with-real-depth look where near parts of the cloud grow as the camera turns; the hole-fill pass covers the gaps that rotation and perspective expose; and because it renders to a normal IMAGE, whatever comes out can go straight to a save node, a preview, or an img2img pass. For the animated "photo comes alive" workflow that this pack is really about, this is the workhorse.

How it works

Two things happen in sequence. First, the standard perspective render: the cloud is centered, a camera is placed at a distance derived from fov, points are projected with pinhole-camera math (X and Y divided by depth), and closer points are drawn over farther ones with depth encoded as brightness. Then, if correct is ON, a cleanup pass finds pixels whose depth falls below threshold and replaces them with the average color of their non-black neighbors, using a ksize-sized neighborhood. The holes that perspective naturally opens up when you rotate the cloud get filled instead of staying black.

The inputs that matter

  • images - the size template; output matches its width and height. Feed it your source photo.
  • points - the Points3D cloud.
  • color (default OFF) - depth-as-grayscale vs. RGB.
  • fov (1–2000, default 35) - field of view. Keep it 30–50 for a natural lens; animate Transform Points instead of abusing this.
  • correct (default OFF) - master switch for hole-filling.
  • ksize (2–128, default 2) - blur kernel size for the fill. Bigger = fills larger gaps, more smearing.
  • threshold (0–256, default 2) - depth below which a pixel counts as a hole and gets filled.

Output: IMAGE, a standard image tensor that wires into any save/preview node.

Install

Pack-standard. ComfyUI Manager → "ComfyUI_depthMapOperation", or:

cd ComfyUI/custom_nodes
git clone https://github.com/chri002/ComfyUI_depthMapOperation

Restart. No models to download, no keys; the deps (torch, numpy, opencv-python, scipy, pandas) are already present in a stock ComfyUI.

Where people get burned

Same traps as its siblings, so this is the checklist: correct alone won't do anything if threshold is too low to mark any pixels as holes - raise it if gaps survive. Extreme fov values are where the README's "artifacts with some extreme values" warning bites hardest, especially with perspective. And the fill is a neighborhood average, not an inpainter, so it'll smear across big gaps - fine for masks and subtle parallax, not for reconstructing hidden geometry. Single frame only; the pack is batch-size-1 everywhere.

CategorydepthMapOperation

Inputs (7)

NameTypeDefaultDescription
imagesIMAGE
pointsPoints3D
colorBOOLEANfalse
fovFLOAT35.01–2000
correctBOOLEANfalse
ksizeINT22–128
thresholdINT20–256

Outputs (1)

NameTypeDescription
IMAGEIMAGE