Nodes/kubakub nodes/kubakub relief export (stl panel / obj prow)
ComfyUI Node

kubakub relief export (stl panel / obj prow)

Relief export panel (STL)

By kubakubkub·Created about a month ago·Updated 2 days ago· 10
kubakub relief export (stl panel / obj prow)
  • field
  • field_b
  • path
◄filename_prefixreliefforge/panel►
◄base_mm40►
◄decimate2►
◄shapepanel (stl)►
◄interior_angle_deg28.0►

The interesting thing about a relief chain is that it ends in the physical world, and every physical process starts with a file. This node is where the relief leaves ComfyUI as a closed STL solid, in millimetres, ready to print or mill. It's the last step of the facade chain, it's an output node, and it's deliberately dumb: no options about materials, no remeshing, just a clean solid and the path it landed on.

What it writes

It takes the height field and builds a closed mesh: the relief as the top surface, a flat back, and side walls joining them. That "closed" part is the whole point - slicers and CAM tools want watertight, and a naked height field capped with a solid back plate is one of the few routes to watertight that doesn't involve a remesh pass. Coordinates are in a local frame where x runs across the panel, y runs up it, and z points outward, and the numbers are true millimetres. STL carries no unit field, so when your slicer opens the file and asks how to interpret it, the answer is millimetres because that's what was written.

The mesh is built as a grid, so it's dense. That's what decimate is for.

Inputs

field - the finished relief. Whatever you export, make sure it's had mould prep and anti perch applied first; there's nothing in this node that will stop you writing an uncastable, climbable panel straight to disk.

filename_prefix (default reliefforge/panel) is the name in the ComfyUI output folder, and a part before the / makes a subfolder, so reliefforge/panel gives you output/reliefforge/panel_00001.stl. A counter is always appended, which means nothing gets quietly overwritten when you iterate - mildly annoying for versioning by hand, genuinely useful when you're on the fifth revision and want the third one back.

base_mm (default 40) is the solid back plate under the relief, on top of whatever relief depth the field carries. So the total thickness of a panel is roughly base_mm + max_relief_mm. Set it to 0 and the relief starts right at the flat back. Don't set it to 0 in real life unless you enjoy casting paper.

decimate (default 2, range 1–16) uses every n-th pixel for the mesh. 1 is full detail. The default of 2 already halves the vertex count in each direction - a quarter of the triangles - for a visual difference you'll struggle to see. Push it to 4 on a big panel for a poster-sized relief if your file sizes are getting silly or your CAM software starts wheezing.

Output

path is a STRING with the full path of the .stl you just wrote. It's a string, so you can print it, log it, or feed it into whatever node comes next in your pipeline. It's also the only output, which tells you this node is a terminus.

The workflow around it

The chain the pack documents is: elevation image → depth (Depth Anything V2 or Marigold) → relief field → mould prep → anti perch → safety check → export. Run the safety check before and after the anti-perch step; the two overlays together are the strongest single page you can put in a submission. The KB makes the same argument from the other end - flat-backed relief is the printing/milling job that actually works today, unlike the shape-in-the-round generated meshes whose topology everyone complains about. You're not asking a generative model for a watertight object here; you're asking a depth model for a picture and doing the geometry yourself, which is why this path is reliable.

Installing

ComfyUI Manager → search kubakub nodes → install → restart. Manual:

cd ComfyUI/custom_nodes
git clone https://github.com/kubakubkub/ComfyUI_KubaNodes
python -m pip install -r ComfyUI_KubaNodes/requirements.txt

The only package this adds is opencv-python-headless, and only if you don't already have OpenCV. ComfyUI 0.37.0 or newer. No Blender for the relief group, no models to download. The author tested the pack on Windows 11, a 12 GB card and Blender 4.5; other setups are untested but this particular node is numpy and file writing, so there's not much to go wrong.

Where people get burned

The file size surprises everyone the first time. A 4K depth map at decimate 1 makes a mesh with millions of triangles and an STL to match; if your slicer takes two minutes to open it, you already know the fix.

Scale seems wrong far more often than the geometry is. If the panel arrives at the wrong size, check panel_width_mm back at relief field - every dimension downstream is derived from it, and this node has no scale setting of its own.

And if the node writes somewhere you didn't expect, remember the prefix is relative to the ComfyUI output directory, not the pack folder or your desktop. Subfolders work; absolute paths don't, and they aren't supposed to.

Categorykubakub/3d/fabricate/relief

Inputs (7)

NameTypeDefaultDescription
fieldRELIEFFORGE_FIELDThe finished relief to export.
filename_prefixSTRINGreliefforge/panelFile name in the ComfyUI output folder; a part before / makes a subfolder. A counter is added.
base_mmFLOAT400–500Solid back plate under the relief, in mm (0 = the relief starts right at the flat back).
decimateINT21–16Use every n-th pixel for the mesh. 1 = full detail, higher = smaller, lighter file.
shapeoptCOMBOpanel (stl)panel: one flat panel as a closed .stl solid. prow: the relief folded into two wings that meet at an edge, as one .obj.
interior_angle_degoptFLOAT28.05–170prow: full angle between the two wings, in degrees (small = sharp prow).
field_boptRELIEFFORGE_FIELDprow: optional relief for the second wing. Without it, field is mirrored onto both wings. It keeps its own size in mm, also when its pixel size differs.

Outputs (1)

NameTypeDescription
pathSTRINGFull path of the saved .stl (panel) or .obj (prow) file.