Nodes/ComfyUI_KubaNodes/kubakub regions from cryptomatte
ComfyUI Node

kubakub regions from cryptomatte

Render a cryptomatte pass in your 3D tool (Blender, Houdini, C4D, Maya ...) and every object becomes a region with its real name from the scene (window_left_03). Objects named alike (window_left_01, _02 ...) share a group; a second cryptomatte layer (materials) adds tags for the plan rules. Also gives the render itself.

By kubakubkub·Created 15 days ago·Updated 3 days ago· 9
kubakub regions from cryptomatte
  • matrix
  • scope
  • regions
  • region_masks
  • regions_json
  • preview
  • render
  • report
◄file►
◄layerobject►
◄tag_layersmaterial►
◄exclude►
◄min_region_area64►
◄merge_small_regionstrue►
Categorykubakub/3d/from renders

Inputs (8)

NameTypeDefaultDescription
fileSTRINGYour multilayer EXR with the cryptomatte pass (32-bit): paste its path. Empty: a built-in sample EXR, so the node runs as it is.
layerSTRINGobjectWhich cryptomatte becomes the regions: object, material, asset, or the layer's full name.
tag_layersSTRINGmaterialOther cryptomatte layers whose names become tags (comma separated); e.g. material -> [tag:glass] in the plan.
excludeSTRINGObject names (wildcards) that are no regions.
min_region_areaINT640–100000000Objects smaller than this (pixels) are merged or dropped.
merge_small_regionsBOOLEANtrueOn: small objects join the neighbour with the longest border. Off: dropped.
matrixoptIMAGEYour matrix: its size is used (the render is resized) and it is the preview background.
scopeoptMASKPixels outside this mask are never part of a region (the size of the matrix, or of the render without one).

Outputs (6)

NameTypeDescription
regionsKUBA_REGIONSLabel map + region table for the kubakub region nodes.
region_masksMASKOne mask per region; batch index = region_id.
regions_jsonSTRINGThe region table as text.
previewIMAGERegions over the render (or the matrix).
renderIMAGEThe render's picture (Combined pass), sRGB.
reportSTRINGLayers found, objects, groups and tags.