Mesh Primitive
Mesh Primitive makes the raw shapes everything else carves
- model
- image
Mesh Primitive is the "new file" button of ComfyTV's 3D geometry workshop. It generates a basic mesh - cube, sphere, cylinder, cone, plane, torus - from scratch, with no model input and no download. That sounds too simple to write about, but it's the stage that feeds everything else: want to drill a hole in a wall? The cylinder is your drill bit. Want a pedestal under a generated statue? That's a cylinder or a torus. Want anything to test the boolean, decimate or bake pipeline on? Start here. In a pipeline where most meshes come from AI generation or imports, this is the source of clean, predictable geometry.
ComfyTV is the canvas-style app layer on ComfyUI where every operation is its own node. Mesh Primitive is a producer in the 3D category, and its COMFYTV_MODEL output wires straight into Mesh Boolean, Mesh Ops, Line Art, or a Scene3D render.
How it works. You pick a kind, tweak its parameters in the node body (dimensions, radius, segment counts, arc angles), and the node emits the mesh recipe - actually a three.js geometry parameters JSON - which downstream stages use to generate the actual geometry. The viewport in the node body shows you the shape, and its snapshot becomes the image output. Because the geometry is parametric, you can regenerate a different cylinder in seconds by changing one number rather than remodeling.
The inputs that matter. The project_id, parent_output_id, recipe and captured_image inputs are internal plumbing - recipe is the geometry JSON the node body fills in, and captured_image is the viewport snapshot. The one you actually touch:
kind-cube,sphere,cylinder,cone,planeortorus. Everything else (width, radiusTop, phiLength, arc, etc.) is edited in the node body for the selected kind.
Outputs are model (the COMFYTV_MODEL) and image (the preview snapshot). There are no required inputs - this is the rare ComfyTV stage that needs nothing wired in.
Install. Install the pack once:
cd ComfyUI/custom_nodes
git clone https://github.com/jtydhr88/ComfyTV
Restart ComfyUI (full restart, not a browser refresh) and the stage appears under ComfyTV → 3D. ComfyUI Manager - search "ComfyTV" - works too. Zero Python dependencies (the pack's pyproject.toml dependency list is empty) and no model files - primitives are pure math. Desktop/multi-install users: clone into the running instance's path from the startup log or the node won't register.
Where people get burned. Honestly, this is a hard node to break - which is its charm. The main thing to know is that the parametric controls live inside the node body, not as ComfyUI widgets, so if you're looking for a "radius" input on the node shell you'll miss it. Second: the output is a parametric recipe, not a baked mesh file - if a downstream stage expects an already-generated mesh and nothing renders, re-run the primitive first (or check that the downstream stage regenerates from the recipe, which ComfyTV's own stages do). And one thing people underuse: because primitives are clean and predictable, they're the perfect test objects - run a boolean or a bake on a cube-and-sphere setup before pointing it at your precious generated mesh, and you'll learn the stage's knobs without wasting an expensive asset.
Inputs (5)
| Name | Type | Default | Description |
|---|---|---|---|
| project_id | STRING | Internal — populated by the projectStore on the frontend. | |
| parent_output_id | INT | 00–2147483647 | Internal — lineage parent set by spawn handlers on the frontend. |
| kind | COMBO | cube | 6 options: cube, sphere, cylinder, cone, plane, torus |
| recipe | STRING | {} | Internal — three.js geometry.parameters JSON for the selected kind (width/radiusTop/phiLength/arc/...); filled by the node body. Downstream ops generate the mesh from this recipe. |
| captured_image | STRING | Internal — /view? URL of the preview-viewport snapshot. Written by the 3D preview in the node body; becomes the `image` output. |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| model | COMFYTV_MODEL | — |
| image | COMFYTV_IMAGE | — |