Nodes/ComfyUI-Image-Effects/๐Ÿ”บ Triangulate
ComfyUI Node

๐Ÿ”บ Triangulate

Real low-poly art without the 3D software

By orion4dยทCreated about a year agoยทUpdated about a year agoยท 28
๐Ÿ”บ Triangulate
  • image
  • IMAGE
โ—„num_points500โ–บ
โ—„edge_threshold0.30โ–บ
โ—„color_modeaverageโ–บ
โ—„point_distributionedge_basedโ–บ
โ—„triangle_outlinefalseโ–บ
โ—„outline_thickness1โ–บ
โ—„smoothing0.0โ–บ

Low-poly art - portraits and landscapes broken into flat, faceted triangles - usually means installing Blender, or a Delaunay script, or an image-to-3D pipeline that has no business being in a photo workflow. This node does it inside ComfyUI with one box: scatter points over your image, connect them into a triangle mesh, and fill each triangle with a color sampled from the original photo. That's the entire low-poly recipe, automated.

It's part of orion4d's Image Effects pack, in the Geometric category alongside Voronoi, Polygon, Hexagonal Pixelate, and Crystallize. Triangulate is the most "artistic" of the geometric nodes - Polygon gives you a tidy grid mosaic, Voronoi gives you organic cells, but Triangulate is the one that actually nails the fashionable low-poly aesthetic people search for.

The mechanism

It runs an actual Delaunay triangulation (via scipy's Delaunay) over a set of points, then draws each triangle with cv2.fillPoly, colored from the source region it covers. The quality of the result lives almost entirely in where the points land, which is what point_distribution controls:

  • edge_based (default) - runs Canny edge detection and concentrates half the points along detected edges, so faces and outlines keep their shape instead of dissolving into abstract shards. This is the one that makes portraits actually look like the person.
  • random - points anywhere. More chaotic, more "modern art," less recognizable.
  • grid - a jittered grid, closest to Polygon's orderly look.

The other dials:

  • num_points (default 500, 50โ€“2000) - triangle count. 300โ€“800 is the sweet spot for a portrait; below ~200 it gets very abstract, above ~1200 it stops looking low-poly and starts looking like a jpeg that's trying to apologize.
  • edge_threshold (default 0.3) - sensitivity of the edge detection that seeds edge_based points.
  • color_mode - average (blended, painterly), dominant (flat, posterized), or gradient (darkens toward the bottom of the frame for depth).
  • triangle_outline + outline_thickness - draw the mesh lines for that technical-drawing look.
  • smoothing - blends the faceted result toward a Gaussian blur of itself; a hint of it softens the harshest edges.

Output is a single IMAGE.

What to expect

First run at defaults on a portrait will give you a decent faceted face; don't be shy about cranking num_points up if the features dissolve. It's faster than you'd fear - the triangles are drawn with vectorized OpenCV fills, not per-pixel Python - but the Canny + Delaunay pass plus the mesh drawing is still CPU work, so expect a second or two on a 1024 image. As with every node in this pack, only the first frame of a batch is processed. And the randomness of point placement is unseeded, so each run produces a slightly different mesh - re-running the same workflow won't give you the identical triangle pattern, which matters if you're comparing variants.

Install

ComfyUI Manager: search ComfyUI-Image-Effects. Manual:

cd ComfyUI/custom_nodes
git clone https://github.com/orion4d/ComfyUI-Image-Effects.git
cd ComfyUI-Image-Effects
pip install -r requirements.txt

Restart, then right-click โ†’ Add Node โ†’ Image Effects โ†’ Triangulate. No model downloads. This one genuinely needs scipy for the Delaunay triangulation - it's in the requirements, so keep it on the list if you're installing dependencies by hand.

CategoryImage Effects

Inputs (8)

NameTypeDefaultDescription
imageIMAGEโ€”
num_pointsINT50050โ€“2000โ€”
edge_thresholdFLOAT0.300.1โ€“1โ€”
color_modeCOMBOaverage3 options: average, dominant, gradient
point_distributionoptCOMBOedge_based3 options: random, edge_based, grid
triangle_outlineoptBOOLEANfalseโ€”
outline_thicknessoptINT11โ€“5โ€”
smoothingoptFLOAT0.00โ€“1โ€”

Outputs (1)

NameTypeDescription
IMAGEIMAGEโ€”