Nodes/atlas-camera/Atlas Clean Plate Layer πŸ–Ό
ComfyUI Node

Atlas Clean Plate Layer πŸ–Ό

A ComfyUI node in Atlas/07 Β· Clean Plate & Inpaint with 40 inputs and 4 outputs.

By mikejamesvfxΒ·Created 2 months agoΒ·Updated about 23 hours agoΒ· 1
Atlas Clean Plate Layer πŸ–Ό
  • solve
  • depth
  • plate_image
  • plate_ref
  • exclude_mask
  • layer_matte
  • band_split
  • band_ref_mask
  • plate_depth
  • object_mask
  • solve
  • hole_mask
  • extend_mask
  • report
β—„near_m0.0β–Ί
β—„far_m0.0β–Ί
β—„near_pct0.00β–Ί
β—„far_pct0.50β–Ί
β—„namelayerβ–Ί
β—„priority0β–Ί
β—„relief_grid384β–Ί
β—„depth_edge_rel1.50β–Ί
β—„fill_occludedfalseβ–Ί
β—„embed_mattefalseβ–Ί
β—„edge_extend_px0β–Ί
β—„skirt_bevel0.00β–Ί
β—„frame_outpaint_px0β–Ί
β—„exclude_choke_cells2β–Ί
β—„band_sidemanualβ–Ί
β—„band_geometryreliefβ–Ί
β—„geometry_overrideβ–Ί
β—„band_overrideβ–Ί
β—„max_edge_factor12β–Ί
β—„normal_edge_deg0β–Ί
β—„quad_coherencetrueβ–Ί
β—„sub_quad_boundaryfalseβ–Ί
β—„silhouette_mattefalseβ–Ί
β—„soft_visibilityfalseβ–Ί
β—„transition_ribbonfalseβ–Ί
β—„ribbon_px64β–Ί
β—„ribbon_bend-0.30β–Ί
β—„ribbon_adaptivefalseβ–Ί
β—„ribbon_depth_slope2.00β–Ί
β—„ribbon_smudge_px12β–Ί
CategoryAtlas/07 Β· Clean Plate & Inpaint

Inputs (40)

NameTypeDefaultDescription
solveATLAS_SOLVEβ€”
depthATLAS_DEPTH_MAPβ€”
plate_imageIMAGEβ€”
near_moptFLOAT0.00–10000MUST match the AtlasDepthLayerMask band that produced plate_image.
far_moptFLOAT0.00–10000MUST match the AtlasDepthLayerMask band that produced plate_image.
near_pctoptFLOAT0.000–1Must resolve to the same band as the AtlasDepthLayerMask that produced plate_image (both call the shared _resolve_depth_band helper, so identical near_m/far_m/near_pct/far_pct here and there always agree). LOWER near_pct = tighter occlusion, not looser β€” see AtlasDepthLayerMask's near_pct tooltip for the worked example.
far_pctoptFLOAT0.500–1Must resolve to the same band as the AtlasDepthLayerMask that produced plate_image. 0 means no upper bound (+inf).
nameoptSTRINGlayerβ€”
priorityoptFLOAT00–100Blend priority among layers (higher wins). FARTHEST bands take the HIGHER priority (far 15 / bg 10 / mid 5 / fg 0): at a watertight seam the surfaces are depth-adjacent and this near-tie bias picks the winner, so nearest-highest renders a band's edge smear IN FRONT of the layer behind it (striped seams). Min is 0; a sky dome goes negative via AtlasSkyDomeLayer. Ordering is by depth + priority, never facing angle (clean-plate sources paint head-on AND grazing, unlike multi-angle patches).
plate_refoptATLAS_PLATE_REFOptional registered final clean-plate reference. Browser still uses image_b64 preview; exporters use this for EXR/float-safe handoff.
relief_gridoptINT38416–4096Band-clipped meshes tear at band boundaries ON TOP OF normal silhouette tearing, so per-layer meshes want more density than the generic 128 default - 384/1.5 is the empirically-calibrated band-layer setting (hangar + monument valley).
depth_edge_reloptFLOAT1.500.05–5Looser than the generic 0.5: safe WITHIN a band because the band clip already bounds the mesh's depth range.
exclude_maskoptMASKOptional external exclusion (e.g. a real sky segmentation from SAM/RMBG). When connected it REPLACES the internal sky heuristic (which otherwise eats tall geometry above the horizon) - should match whatever was passed to the AtlasDepthLayerMask call that produced plate_image, for hole_mask/band resolution to stay in lockstep.
fill_occludedoptBOOLEANfalseDiffusion-fill this band's mesh across the foreground occluder's footprint (the band clip otherwise leaves a hole exactly there) so the INPAINTED plate content lands on real geometry instead of a hole - the disocclusion 'shadow ray' mesh. Synthesized depth is a smooth interpolation of the surrounding background, reported in metadata as n_filled_cells. Excluded (sky) regions are never filled.
embed_matteoptBOOLEANfalseEmbed a full-resolution per-pixel edge matte on this layer (ProjectionSource.mask_b64) - the projection shader then cuts the TRUE band silhouette per-pixel instead of the mesh's blocky grid-resolution tear edge, and the Nuke layers export writes it into the plate's alpha. Auto-computed from this band (in-band pixels, plus the filled occluder footprint when fill_occluded is on, minus exclude_mask); wire layer_matte to override with a hand/SAM matte.
layer_matteoptMASKOptional explicit edge matte (overrides the auto-computed band matte when embed_matte is on) - e.g. a SAM segmentation of this layer's subject for a crisper edge than depth banding gives.
edge_extend_pxoptINT00–512Deterministic edge-extend for THIS layer, same trick as the sky dome's: smear the plate's colors past the matte edge by this many pixels (quarter-res neighbor propagation β€” NOT an inpaint), dilate the embedded matte to expose the extension on disocclusion, and grow the mesh's boundary skirt to receive it. The invented region is reported on the extend_mask output AND exported to Nuke/Maya as {layer}_extend_matte.png so it can be processed downstream (regrain, blur, replace). Smeared pixels are plausible only for narrow slivers β€” large reveals still want a real inpainted plate. Turns on embed_matte implicitly (an extension needs a matte edge).
skirt_beveloptFLOAT0.000–4Bevel the mesh's boundary skirt AWAY from the camera, as a slope in local cell units: 1.0 recedes one cell per extension ring (a 45Β° skirt), 0 = today's flat skirt. Physically motivated β€” an occluded surface continues away from the camera behind its silhouette, so a receding bevel is the least-wrong geometry at a tear edge. Try 1.0–2.0 with edge_extend_px: the smeared colors land on the receding skirt and the extend matte marks them for regrain.
frame_outpaint_pxoptINT00–1024Outpaint THIS layer past the FRAME edges by this many pixels β€” the same per-source widened-camera trick the sky dome uses: the plate canvas is padded edge-replicated, this source gets its OWN camera with shifted cx/cy and grown W/H (the primary solve and every other layer are untouched), and the band mesh extends past the original frustum to carry it. Closes the frame-edge reveal that 🧭 Safe Zone measurements show is the binding constraint on wide scenes (ground layers used to end exactly at the photo boundary). The ring is INVENTED pixels: it lands in extend_mask / {layer}_extend_matte.png for downstream regrain, and turns on embed_matte implicitly. 0 = off.
exclude_choke_cellsoptINT20–16Choke-and-reskirt against the exclude_mask edge: segmentation and depth edges never align exactly, leaving a ribbon of cells the mask calls rock but whose depth IS sky β€” they back-project high above the real silhouette as a jagged floating band. This erodes the layer N grid cells away from the exclusion, then the boundary skirt regrows the ring with clean neighbor depth: same coverage, geometry hugging the true surface. Raise for sloppier segmentation masks; 0 disables.
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_geometryoptCOMBOreliefHow this band's projection surface is built. relief (default) = the depth-following mesh, for anything with real 3D shape inside the band. card = ONE flat fronto-parallel plane at the band's median depth (classic DMP card) β€” for distant/flat-facing layers with negligible internal parallax (far mountains at the horizon, a hangar's back wall, a skyline backdrop); never tears, zero depth noise. ground = the exact analytic Y=0 ground plane β€” for flat horizontal surfaces the camera stands over (desert floor, water, road); zero depth-noise bumps. Both flat modes keep band membership from the REAL depth (which pixels belong) and only flatten WHERE they sit; matte/edge-extend/outpaint all still apply.
geometry_overrideoptSTRINGOptional geometry-type override STRING — wins over band_geometry when non-empty ('relief'/'card'/'ground'). Exists because ComfyUI rejects STRING→combo links: wire AtlasAssessImage's geom_far/bg/mid/fg output here so the VLM's per-layer geometry recommendation flows in (same pattern as patch_view_override). Unknown values error loudly.
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). MUST be the same string the paired AtlasDepthLayerMask received. Loses to a connected band_split. Errors loudly on garbage.
max_edge_factoroptFLOAT122–200World-space edge tear threshold (SEPARATE from depth_edge_rel). Dominant tear cause on deep / narrow-FOV / interior bands: raise to 40-80 to stop comb-tearing continuous grazing surfaces. >80 rubber-sheets real silhouettes.
normal_edge_degoptFLOAT00–1800 = off. Tears where surface NORMALS bend past this angle β€” real creases / occlusion silhouettes β€” while leaving smoothly-receding walls intact. Pair with a higher max_edge_factor: raise mef to kill spurious combs, then ~40-70 here to keep genuine edges torn.
quad_coherenceoptBOOLEANtrueReject both triangles when either half of a grid quad fails; avoids surviving diagonal UV wedges at band boundaries.
sub_quad_boundaryoptBOOLEANfalseCut a torn cell AT the depth cliff instead of deleting the whole cell. A band silhouette can otherwise only turn in whole-cell steps AND loses a cell of real surface on both sides of every cliff - measured 5.67px mean boundary error at grid 128 on a 1024px plate (step 8px), WORSE than the 4px quantization bound. Reads the cliff from the full-resolution depth and rebuilds both sides up to it, never joining them: 5.67 -> 1.43px, camera coverage 97.8 -> 100%, ~5% more vertices. Same thresholds, same cells torn.
silhouette_matteoptBOOLEANfalseCut this band's exclusion silhouette per-pixel rather than at grid resolution: grows a boundary skirt and ships a full-resolution matte the projection shader trims it back with (strip uncovered 0.083 -> 0.000, zero pixels spilled past the boundary, edge within 0.25px of truth vs 4px lattice). Skirt and matte are ONE switch - an unmatted skirt shows replicated pixels. Handles the sky/exclusion edge; depth cliffs need sub_quad_boundary.
soft_visibilityoptBOOLEANfalseSOFT LAYERING (SLIDE, ICCV 2021) - the viewport answer to sawtooth silhouettes. Instead of TEARING at a depth cliff and leaving a hole to feather, keep the surface continuous (it rubber-bands across the cliff) and fade those fragments with a per-pixel visibility A = exp(-beta*|grad disparity|^2) computed at PLATE resolution. No tear means no boundary to quantize, so there is no staircase at ANY grid - and the lattice stays intact, so planar hole patch and the CUDA repair keep working (unlike sub_quad_boundary, which this supersedes and disables). Measured on a diagonal cliff: fade to 0.039 over a 4px feather while smooth receding ground stays at 0.987. Needs something BEHIND to reveal (BG clean-plate / sky dome / clean_plate input) or the fade shows the backdrop. Export still tears - a DCC has no shader to fade with.
transition_ribbonoptBOOLEANfalseKEEP this band's tear and hang a bounded skirt off it, instead of soft_visibility's untorn rubber band whose fins run as far as the depth jump dictates. Separate topology grown from the open rim, stepping outward in IMAGE space so its apparent width is a fixed pixel count at any depth (a view-ray extrusion cannot do this - every point on a ray projects to the same pixel). UVs freeze at the silhouette texel, so it is an edge-extend CLAMP, which is what the seam doctrine asks of a layer that has bands behind it. Shares no vertex with the band surface. Mutually exclusive with soft_visibility.
ribbon_pxoptFLOAT640–400Transition-ribbon width in SCREEN pixels of the plate, measured in the recovered camera; achieved width is reported back as stats.transition_ribbon.measured_px_p50/p95. Distinct from edge_extend_px, which smears TEXTURE outward on this band; this adds GEOMETRY carrying the frozen rim texel.
ribbon_bendoptFLOAT-0.30-0.5–0.5Shape of the depth falloff toward the band behind. NEGATIVE curls away fast then levels off (the tight lip); 0 is linear; POSITIVE dwells at this band's depth then dives (a flange). Limited to +/-0.5, the range in which the ramp stays monotonic.
ribbon_adaptiveoptBOOLEANfalseScale ribbon_px by the size of the discontinuity relative to depth_edge_rel, clamped 0.5x-2x. DEFAULTS OFF: measured on a real exterior it was the only setting that broke width consistency (p95 85px for a requested 64) and clamped the most folds.
ribbon_depth_slopeoptFLOAT2.000.25–8How far the skirt may recede toward the band behind, as a multiple of its own world width. Governs what an ORBIT sees; ribbon_px alone bounds only the recovered camera. Low (0.5-1) hugs this band's silhouette, high (4-8) reaches further back at the cost of long slabs off-axis.
ribbon_smudge_pxoptFLOAT120–200Blur the skirt along this band's silhouette, in plate texels, ramped in from the rim. At 0 each column is one frozen texel and the skirt reads as flat radial streaks. Applies in the viewport and is baked into the exported GLB as vertex colour.
plate_depthoptATLAS_DEPTH_MAPAtlasDepthMap run on plate_image (MoGe, same solve wired). When connected, THIS layer's mesh is built from the clean plate's depth instead of `depth`: the terrain behind the foreground object comes from the plate that actually sees it. Its scale is registered to `depth` by median ratio over the mutually visible pixels (outside object_mask); the report carries scale + rel_mad. Same camera, so no second solve and nothing to line up.
object_maskoptMASKThe foreground object (white) in the SOURCE frame β€” excluded from the scale registration (its depth differs between the plates by definition). Recommended when the object is large.

Outputs (4)

NameTypeDescription
solveATLAS_SOLVEβ€”
hole_maskMASKβ€”
extend_maskMASKβ€”
reportSTRINGβ€”