Nodes/kubakub nodes/kubakub relief safety check
ComfyUI Node

kubakub relief safety check

Where can someone stand on this thing? relief safety check

By kubakubkub·Created about a month ago·Updated 2 days ago· 10
kubakub relief safety check
  • field
  • over_image
  • overlay
  • flagged
  • report
  • passes
◄reach_mm2500►
◄foothold_depth_mm25►
◄min_width_mm80►
◄clearance_mm150►

Every public artwork loses an argument about children climbing it. Someone from the client side walks up to the maquette, puts a finger on a ledge and says "they'll be up there in a week". That argument is much easier to win when you can show them the marked-up answer instead of arguing from taste.

This node does the argument for you. It reads the relief as a height field, works out which surfaces a person could climb, sit or lie on, and colours them on top of the picture you have. Red for a foothold within reach, orange for seat height, yellow for something deep enough to lie on.

How it decides

A foothold, in this node's terms, is where the relief steps outward by at least foothold_depth_mm relative to everything within clearance_mm above it, over a continuous horizontal run of at least min_width_mm, and sits below reach_mm from the ground. That "relative to what's above it" clause is the part that matters: a step only counts if it sticks out into open air, which is exactly the difference between a ledge you can stand on and a cornice overhang you can't.

The sitting and lying rules are fixed inside the node, not exposed as inputs: a seat is around 150 mm deep between 300 and 750 mm above the ground, and something 450 mm deep below about 700 mm counts as a lying surface. So don't go hunting for a "seat depth" field. If the orange and yellow flags feel wrong for your project, the answer is a different artwork, not a different setting.

Inputs

field is the relief to check. Note it comes from the relief field node, which is where panel_bottom_mm was set - that's how the check knows the panel's height above the ground. Change it there, not here.

reach_mm (default 2500) is how high above the ground a foothold still counts as reachable. Above that, footholds are ignored, on the basis that an unaided person can't start a climb from there. Drop it to 1800 if you're being conservative for a city submission.

foothold_depth_mm (default 25) is the smallest step outward that counts. Roughly the smallest edge a shoe can bear on, per the docs. This is the one that decides how fussy the node is.

min_width_mm (default 80) is the minimum continuous run. A 30 mm wide nub isn't a foothold, and this stops the report filling up with noise.

clearance_mm (default 150) is the band above a step it's measured against. Bigger clearance means the node is more forgiving of steps tucked under overhangs.

over_image is optional and it's the one to actually use: wire in your rendered elevation at the same pixel size and the flags are drawn on the real image rather than the grey relief. That's the picture you put in a submission.

Outputs

overlay is that coloured image. flagged is a MASK, white wherever anything at all was flagged - handy for masking a fix or for driving a condition downstream. report is JSON with the counts, the areas and which rules pass, plus the panel_bottom_mm and pixel size it worked from. passes is a BOOLEAN that's true when nothing was found, and it's the output people underuse: it's clean data you can wire into a switch or a print node so the graph itself tells you whether the panel is clear.

The workflow that sells it

Run this twice: once before relief anti perch and once after, and put the two overlays side by side. The docs call it a strong page in a submission, and they're right - "here is every surface a person could stand on, and here is the same facade after the geometry fixed it" is a much better argument than a note claiming the design is climb-proof. The honest caveat from the same docs: these are reasonable working values, not values quoted from a standard, so treat the output as a design review and have the structural engineer sign off before submission.

Installing

ComfyUI Manager → kubakub nodes → install → restart, or:

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

One hard dependency (opencv-python-headless if you don't have OpenCV already) and ComfyUI 0.37.0+. No Blender, no models.

Two traps

over_image has to match the relief's pixel dimensions exactly. If it doesn't, the node quietly falls back to drawing on the grey relief - no error, just an overlay you didn't expect. Resize before you wire it in.

And if the flags don't line up with what you see in the render, suspect the depth map rather than the checker. A depth model that smoothed a 60 mm sill into a 10 mm ramp can't be flagged as a foothold, because geometrically there isn't one - the node only knows the field it's given.

Categorykubakub/3d/fabricate/relief

Inputs (6)

NameTypeDefaultDescription
fieldRELIEFFORGE_FIELDThe relief to check (its panel_bottom_mm sets the height above ground).
reach_mmFLOAT2500500–6000Height above the ground, in mm, up to which a foothold counts as reachable. Footholds higher up are ignored.
foothold_depth_mmFLOAT255–300A step outward at least this deep, in mm, counts as a foothold.
min_width_mmFLOAT8010–1000A foothold must run at least this wide, in mm, to count.
clearance_mmFLOAT15020–1000Band above a step, in mm, that it is measured against: the step must stick out beyond everything in this band.
over_imageoptIMAGEOptional picture to draw the flags on (same size as the relief). Without it the grey relief is used.

Outputs (4)

NameTypeDescription
overlayIMAGEThe relief (or over_image) with the flagged areas coloured.
flaggedMASKWhite where anything was flagged.
reportSTRINGCounts, areas and which rules pass (json).
passesBOOLEANTrue when no foothold, seat or lying surface was found.