ComfyUI Node
Depth Rasterize Layers
Turn an image and depth map into layered paper-cut pieces with flat color styles, depth shadows, optional outlines, and parallax offsets.
Depth Rasterize Layers
- image
- depth_map
- region_mask
- background
- layered_images
- layer_masks
- depth_quantized
- composited_image
- debug_preview
◄rasterization_levels12►
◄output_modecomposite►
◄selected_layer0►
◄invert_depthfalse►
◄normalization_modeper_frame►
◄depth_min0.000►
◄depth_max1.000►
◄depth_gamma1.00►
◄depth_blur1.0►
◄temporal_smoothing0.00►
◄layer_smoothing1.0►
◄mask_feather0.50►
◄layer_color_modecolor_zones►
◄color_zones_per_layer4►
◄color_brightness0.00►
◄color_contrast1.00►
◄color_saturation1.00►
◄black_white_threshold0.50►
◄enable_shadowtrue►
◄shadow_distance8►
◄shadow_angle135►
◄shadow_blur6►
◄shadow_opacity0.35►
◄shadow_color_r0.00►
◄shadow_color_g0.00►
◄shadow_color_b0.00►
◄depth_scaled_shadowtrue►
◄enable_outlinefalse►
◄outline_width2►
◄outline_opacity0.50►
◄outline_color_r0.00►
◄outline_color_g0.00►
◄outline_color_b0.00►
◄enable_layer_offsetfalse►
◄offset_x0►
◄offset_y0►
Categorydepth/layers
Inputs (40)
| Name | Type | Default | Description |
|---|---|---|---|
| image | IMAGE | RGB input image or video frame batch to turn into depth-cut paper layers. | |
| depth_map | IMAGE | Aligned grayscale depth map from a depth node such as Depth Anything. | |
| rasterization_levels | INT | 122–48 | Number of depth slices to cut from the image. More slices add depth detail. |
| output_mode | COMBO | composite | Return all cut layers, one selected layer, the final composite, masks, or a debug depth preview. |
| region_maskopt | MASK | Optional mask limiting where the paper-cut effect is applied. | |
| backgroundopt | IMAGE | Optional bottom plate for the composite output. | |
| selected_layeropt | INT | 00–47 | Layer index for single_layer or masks_only output. 0 is the nearest layer after depth normalization. |
| invert_depthopt | BOOLEAN | false | Swap near and far if your depth map is reversed. |
| normalization_modeopt | COMBO | per_frame | per_frame adapts each image, whole_sequence stabilizes video batches, manual uses depth_min/depth_max. |
| depth_minopt | FLOAT | 0.000-1000000–1000000 | Manual minimum depth. Used only when normalization_mode is manual. |
| depth_maxopt | FLOAT | 1.000-1000000–1000000 | Manual maximum depth. Used only when normalization_mode is manual. |
| depth_gammaopt | FLOAT | 1.000.1–4 | Curve the normalized depth before slicing. Higher values move more pixels toward near layers. |
| depth_bluropt | FLOAT | 1.00–24 | Blur the raw depth map before slicing to reduce noisy cut boundaries. |
| temporal_smoothingopt | FLOAT | 0.000–0.99 | Blend video depth with the previous frame to reduce flicker. |
| layer_smoothingopt | FLOAT | 1.00–24 | Smooth tiny depth islands after normalization for cleaner paper shapes. |
| mask_featheropt | FLOAT | 0.500–8 | Soft edge width at layer boundaries. Set 0 for crisp hard cuts. |
| layer_color_modeopt | COMBO | color_zones | Paper fill style: original RGB, one average color per layer, color zones, grayscale, or black/white. |
| color_zones_per_layeropt | INT | 42–24 | Number of flat color patches inside each depth slice when using color_zones. |
| color_brightnessopt | FLOAT | 0.00-1–1 | Brightness adjustment applied after the layer fill mode. |
| color_contrastopt | FLOAT | 1.000–3 | Contrast multiplier applied after the layer fill mode. |
| color_saturationopt | FLOAT | 1.000–3 | Saturation multiplier applied after the layer fill mode. |
| black_white_thresholdopt | FLOAT | 0.500–1 | Luminance cutoff for black_white mode. |
| enable_shadowopt | BOOLEAN | true | Drop a blurred offset shadow behind each paper layer in composite mode. |
| shadow_distanceopt | FLOAT | 80–96 | Shadow offset distance in pixels. |
| shadow_angleopt | FLOAT | 1350–360 | Shadow direction in degrees. 135 casts toward the lower-left. |
| shadow_bluropt | FLOAT | 60–48 | Gaussian blur radius for the shadow mask. |
| shadow_opacityopt | FLOAT | 0.350–1 | Shadow opacity. |
| shadow_color_ropt | FLOAT | 0.000–1 | Shadow red channel from 0 to 1. |
| shadow_color_gopt | FLOAT | 0.000–1 | Shadow green channel from 0 to 1. |
| shadow_color_bopt | FLOAT | 0.000–1 | Shadow blue channel from 0 to 1. |
| depth_scaled_shadowopt | BOOLEAN | true | Scale shadow offset by layer depth for a stronger stacked-paper feel. |
| enable_outlineopt | BOOLEAN | false | Draw a colored edge around each paper layer. |
| outline_widthopt | INT | 21–16 | Outline thickness in pixels. |
| outline_opacityopt | FLOAT | 0.500–1 | Outline blend strength. |
| outline_color_ropt | FLOAT | 0.000–1 | Outline red channel from 0 to 1. |
| outline_color_gopt | FLOAT | 0.000–1 | Outline green channel from 0 to 1. |
| outline_color_bopt | FLOAT | 0.000–1 | Outline blue channel from 0 to 1. |
| enable_layer_offsetopt | BOOLEAN | false | Shift layers by depth for a subtle parallax cutout effect. |
| offset_xopt | FLOAT | 0-128–128 | Horizontal parallax strength in pixels. |
| offset_yopt | FLOAT | 0-128–128 | Vertical parallax strength in pixels. |
Outputs (5)
| Name | Type | Description |
|---|---|---|
| layered_images | IMAGE | Layer images: one batch entry per frame x layer, or the selected/debug image depending on output_mode. |
| layer_masks | MASK | Layer masks: alpha masks matching layered_images. |
| depth_quantized | IMAGE | Posterized grayscale depth map showing the cut depth bands. |
| composited_image | IMAGE | Final stacked paper-cut composite when output_mode is composite. |
| debug_preview | IMAGE | False-color debug view of depth layer IDs. |