Studio Yotsuba
Back to Node List

Layers to Surface

layers_to_surface

Builds a lit-ready Surface from layered images. Each layer is inflated independently, stacking order adds contact occlusion, and layer ids are stored as face ids.

Reviewed
Guide available

Input Ports

NameTypeDescription
Layers
layers
List<Image>
Layer images from back (index 0) to front. Connect the Layers output of Pixel Canvas.
Paths
paths
Path
Bezier path whose sub-paths become parts (S4). Closed sub-paths are filled silhouettes; open sub-paths become tubes with the tagged radius. Role tags (raise/carve/ridge/frame/hole) come from Multi Path layers.
Regions
regions
RegionMap
Region map whose regions become parts (ascending id). Useful for procedural sources like cobblestones.
Layer Names
layer_names
List<Text>
Optional layer names in the same order as Layers. Connect the Layer Names output of Pixel Canvas so the per-layer settings show names.

Output Ports

NameTypeDescription
Surface
surface
Surface
Surface with per-layer height, contact-occlusion AO, and layer face ids. Connect to Surface Light Preview.
Preview
preview
Image
Flattened albedo image.
Height
height
Image
Combined per-layer height map, for inspection or custom pipelines.
AO
ao
Image
Contact-occlusion map built from stacking order. White = no occlusion.

Parameters

NameTypeDefaultRangeDescription / Options
Volume Shape
profile
Enum
Round—

How each layer swells from its outline.

  • RoundRound
    Rounded like a balloon. Good for characters and soft objects.
  • SharpSharp
    Rises straight like a cone. Good for crystals and spikes.
  • FlatFlat
    Flat top with rounded edges. Good for bricks and boxes.
Layer Profiles
layer_profiles
Text
——

Comma-separated per-layer overrides of Volume Shape, back to front (Round / Sharp / Flat / Curve / CylinderV / CylinderH / Relief / Engrave / Decal / Emission). Blank entries use the shared Volume Shape. Flat suits ground layers; CylinderV/H round only across the axis (barrels, logs); Relief bumps up from the layer below; Engrave carves into it and darkens the cavity (mouths, grooves); Decal is color-only detail; Emission is color-only that also glows via the emission map (lantern glass, windows).

Layer Profile Curves
layer_profile_curves
CustomData
——

Per-layer custom profile curves edited from the inspector rows (JSON, used by layers set to Curve). Maps normalized distance from the edge (t) to height.

Layer Height Offsets
layer_height_offsets
Text
——

Comma-separated per-layer height, back to front (e.g. "0, 0.5"). For structural layers it lifts the whole layer; for Relief / Engrave it sets the bump thickness or carve depth (0 = automatic from part size).

Layer Tilt Directions
layer_tilt_angles
Text
——

Comma-separated per-layer tilt directions in degrees, back to front (0 = rises to the right, 90 = rises upward). Edited from the inspector rows.

Layer Tilt Strengths
layer_tilt_amounts
Text
——

Comma-separated per-layer tilt strengths 0-1, back to front. 0 = no tilt, 1 = the low end drops to height 0. The gradient spans the layer's own extent along the direction.

Layer Sculpt Data
layer_sculpt_data
CustomData
——

Per-layer brush strokes managed by the builder editor (JSON, keyed by layer index). Applied to each layer's height field before composition, so edits never bleed into other layers and contact occlusion follows.

Path Widths
path_widths
Text
——

Comma-separated tube radii (px) per path sub-path, overriding the source tags. Empty entries keep the tagged or default radius.

Path Pixel Perfect
path_pixel_perfect
Bool
false—

Rasterize path-part edges with deliberate pixel-art stairs (no double corner pixels), like the Outline node's pixel-perfect option. Heights keep using exact distances, so shading is unchanged — only the mask edge pixels are re-picked. Off keeps the default distance-based edges.

Contact Shadow Strength
contact_strength
Float
0.50–1 / step 0.01

How dark the occlusion gets right next to a front layer. 0 disables contact shadows. Automatically fades as a layer is lifted by its height offset.

Contact Shadow Radius
contact_radius
Int
20–16

How many pixels the contact occlusion reaches from a front layer.

Overview

A node where layer separation becomes the 3D decomposition. quick_shade inflates the whole picture as one silhouette, so complex shapes break down; this node inflates each layered image (arm, body, head, ...) independently and then assembles them, so body parts never melt together. Stacking order automatically produces contact occlusion — the darkening where a front layer meets a back layer.

Usage tips

  • The standard chain: pixel_canvas (Layers output) → layers_to_surface → surface_light_preview. Just draw each body part on its own layer in Pixel Canvas and you get robust automatic shading input.
  • In Pixel Canvas, a folder counts as one image. If you keep line art and fill on separate layers, group them into one folder per body part.
  • Double-click (or the inspector's "Edit with Preview" button) opens the builder editor: tune per-layer settings while watching the lit stepped preview and the 3D relief side by side. It edits the same values as the inspector (always in sync); the light knobs are a working light only.
  • Per-layer sculpting inside the editor: click a row to pick the target layer, then raise / carve / smooth / level brushes edit only that layer. Strokes apply to the layer's own height field before composition, so other layers are never affected and contact occlusion follows the sculpted shape. Division of labor: sculpt here to shape a part (per-layer); use the downstream surface_sculpt to fix the final composed surface (plus AO painting).
  • Per-layer settings have a row UI: the inspector edits one row per layer (name / shape / height +). With the Pixel Canvas Layers output connected directly, layer names show up automatically - no extra wire. Only when other nodes sit in between, connect Layer Names to the Layer Names input. The stored format stays CSV, so headless and AI-generated graphs keep working with plain text.
  • To raise a front layer above another (e.g. the near arm), enter a value in that row's Height + (e.g. 0.5). 0 keeps the shared height range.
  • When mixing in a ground or backdrop layer, set just that layer's row to Flat so it stops ballooning.
  • Use Custom curve (Curve) to design the swell freely: a cross-section curve opens under the row (X: edge to center, Y: height). Drag its points to get gentle slopes, steep walls, wide flat tops, or terraces. Starting from the presets (Round / Sharp / Flat top / Bell) is fastest.
  • The Tilt line under a row slants the whole mound: set a direction (degrees; 0 = rises to the right, 90 = rises upward) and a strength (0-1) and the layer's height gets a low-end-to-high-end gradient. No start/end points to place — the span is derived automatically from the layer's own extent along that direction. Combine with any shape: Flat + tilt makes a ramp, Round + tilt a leaning dome (not available for Color only / Relief / Engrave).
  • Barrels, posts and horizontal logs want Cylinder (vertical/horizontal): flat along the axis, semicircular across it. Round would also dome along the axis and drift toward a sphere.
  • Lantern glass and lit windows want Emission: the color rides on top and is also written into the emission map, so it stays lit regardless of the light direction. Tune with the downstream light's emission_strength (0.3-0.5 is a good range; 1.0 tends to blow out).
  • Set few-pixel detail layers (eyes, patterns) to Color only (Decal): the underlying layer's curvature continues through and the detail rides on top as paint.
  • Mouths, grooves, and dents want Engrave: it carves into the surface below and the cavity darkens naturally via AO (shadow inside the mouth). For raised details (buttons, a nose) use Relief. Both take their thickness or depth from the row's Height + (0 = auto from part size).
  • Contact occlusion is light-independent "gap darkness" written into the AO map. Directional shadows are the job of surface_light_preview (cast shadows) downstream. Contact shadows fade automatically for layers lifted by Layer Height Offsets — use cast shadows for floating objects.
  • The surface output stores layer ids as face ids (layer:0, layer:1, ...); use surface_id_mask to extract per-layer masks.
  • Not to be confused with part_composer, which places reusable part images onto a screen — this node uses the split inside one drawing for volume estimation.

Common pitfalls

  • Everything inflates like one balloon: the art is drawn on a single layer. Split body parts into layers (or folders) so they inflate independently.
  • Height offsets misaligned after reordering layers: Layer Height Offsets follows list order (back to front). Reorder the numbers when you reorder layers.
  • Mosaic-like noise around small details: few-pixel layers also inflate into full-size domes, punching craters into the height below and piling contact shadows and highlights along the boundary. Set that layer's shape to Color only (or Relief) to fix it.

Related nodes

  • pixel_canvas — its layers output feeds this node
  • surface_light_preview — lights the assembled surface
  • quick_shade — the single-image shortcut when there is no layer split
  • contact_shadow_from_order — when you want the contact shadow as an image
  • surface_id_mask — extract masks from layer face ids
Back to Node List