Nodes/atlas-camera/Atlas Depth Layer Mask 🎭
ComfyUI Node

Atlas Depth Layer Mask 🎭

A ComfyUI node in Atlas/03 Β· Depth with 17 inputs and 4 outputs.

By mikejamesvfxΒ·Created 2 months agoΒ·Updated about 23 hours agoΒ· 1
Atlas Depth Layer Mask 🎭
  • solve
  • depth
  • exclude_mask
  • band_split
  • band_ref_mask
  • layer_mask
  • occlusion_mask
  • hole_mask
  • report
β—„near_m0.0β–Ί
β—„far_m0.0β–Ί
β—„near_pct0.00β–Ί
β—„far_pct0.50β–Ί
β—„feather_px4β–Ί
β—„compute_hole_maskfalseβ–Ί
β—„relief_grid384β–Ί
β—„depth_edge_rel1.50β–Ί
β—„fill_occludedfalseβ–Ί
β—„band_sidemanualβ–Ί
β—„band_overrideβ–Ί
β—„quad_coherencetrueβ–Ί
CategoryAtlas/03 Β· Depth

Inputs (17)

NameTypeDefaultDescription
solveATLAS_SOLVEβ€”
depthATLAS_DEPTH_MAPβ€”
near_moptFLOAT0.00–10000Band near edge in metres. 0 = auto (use near_pct).
far_moptFLOAT0.00–10000Band far edge in metres. 0 = auto (use far_pct).
near_pctoptFLOAT0.000–1Used when near_m==0: POSITION ALONG THE SCENE'S LOG-DEPTH RANGE, not a pixel percentile (depth is skewed β€” pixel percentiles wasted 0-0.9 on the foreground; 0.5 here = the geometric mean of the scene's depth range, perceptually mid-scene). LOWER = closer near threshold = tighter occlusion. Try 0.2-0.4 for a typical foreground object.
far_pctoptFLOAT0.500–1Used when far_m==0: position along the scene's LOG-depth range (see near_pct). 0 means no upper bound (+inf); values at or above ~1.0 also mean no cap.
feather_pxoptINT40–64Dilate occlusion_mask's edge by this many pixels β€” a small safety margin on top of whatever grow INPAINT_ExpandMask applies downstream.
compute_hole_maskoptBOOLEANfalseBuild this band's own relief mesh (same as AtlasCleanPlateLayer will do later) to derive hole_mask - the mesh's real tear/sky hole data, not a depth-band heuristic. Off by default: this is a real (duplicate) mesh build, not free like the other two masks.
relief_gridoptINT38416–4096Only used when compute_hole_mask=True. MUST match the AtlasCleanPlateLayer call downstream for hole_mask to reflect the actual final mesh (default 384 = the band-layer calibration).
depth_edge_reloptFLOAT1.500.05–5Only used when compute_hole_mask=True. MUST match the AtlasCleanPlateLayer call downstream for hole_mask to reflect the actual final mesh (default 1.5 = the band-layer calibration).
exclude_maskoptMASKOptional external exclusion (e.g. a real sky segmentation from SAM/RMBG) which REPLACES the internal sky heuristic - so it must cover EVERYTHING you want gone. Affects layer_mask/occlusion_mask (excluded pixels can't belong to any band) AND hole_mask when compute_hole_mask=True. Any resolution - resized to match depth.
fill_occludedoptBOOLEANfalseOnly used when compute_hole_mask=True. MUST match the AtlasCleanPlateLayer setting downstream for hole_mask to reflect the actual final mesh - when the layer will diffusion-fill the occluder footprint, that footprint is no longer a hole here either.
band_sideoptCOMBOmanualWith band_split connected: foreground = [0, split), background = [split, +inf) β€” the node's own near/far widgets are ignored. manual = use this node's own near/far settings.
band_splitoptATLAS_BAND_SPLITWire ONE AtlasDepthBandSplit into every band node (with band_side set) so the fg/bg boundary lives in exactly one widget and the layers can never drift apart.
band_ref_maskoptMASKExclusion used ONLY for resolving near/far percentages to metres. When exclude_mask carries per-layer scoping (🎯 scope rows), each layer's depth population differs and the shared band edges DRIFT apart (metric gaps between adjacent bands β€” debug-report finding). Wire the plain SKY mask here on every band node so all layers resolve identical edges. Unwired = legacy behavior (band edges from exclude_mask's population).
band_overrideoptSTRINGOptional band override STRING ('near_pct=<f> far_pct=<f>') β€” wins over this node's near/far widgets when non-empty. Wire AtlasAssessImage's band_far/bg/mid/fg output here so the VLM's subject-aware band boundaries flow in (jointly derived, so adjacent bands always share edges exactly). Loses to a connected band_split. Errors loudly on garbage.
quad_coherenceoptBOOLEANtrueOnly used when compute_hole_mask=True. Match AtlasCleanPlateLayer to keep hole QA identical to the final mesh.

Outputs (4)

NameTypeDescription
layer_maskMASKβ€”
occlusion_maskMASKβ€”
hole_maskMASKβ€”
reportSTRINGβ€”