Studio Yotsuba
Back to Node List

Layer Depth Map

layer_depth_map

Builds a depth proxy map from layer stacking order — nearer layers become brighter

Reviewed
Guide available

Input Ports

NameTypeDescription
Layers
layers
List<Image>
Required
Layer images from back (index 0) to front

Output Ports

NameTypeDescription
Depth Map
map
Image
Grayscale depth proxy. Nearer layers are brighter, empty areas are black

Parameters

NameTypeDefaultRangeDescription / Options
Background
background
Float
00–1 / step 0.01

Depth value used where no layer is opaque

Overview

Creates a simple depth map from layer order, with foreground layers shown brighter. Supplying a layer list gives you a base for atmospheric perspective, where distant areas are dark and hazy while the foreground remains clear.

Usage tips

  • A go-to depth-fog chain is depth map → gradient_map (distant = dark blue) → blend (Multiply). It adds atmosphere to layered backgrounds.
  • Order the input list from back to front. Reversing the order reverses the depth.
  • The output is a Map (value field), so treat it as graduated values rather than a mask.

Related nodes

  • layer_occlusion_map / contact_shadow_from_order — related nodes in the same lane
  • gradient_map / blend — consume the map
  • list_create — bundles the layer list

Technical details

  • At each pixel, the order of the frontmost opaque (alpha ≥ 0.5) layer is normalized as (index+1)/number of layers.
  • The output is a Map (value field) as defined in §2.7. Do not confuse it with a Mask.

Examples

  1. Depth fog: depth map → Gradient Map (distant = dark blue, foreground = colorless) → Blend(Multiply)
  2. Depth-based desaturation: use the depth map as the mask for Blend By Mask, mixing with a desaturated version
Back to Node List