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
The node name and summary are available in English. Port, parameter, and article details are currently shown in Japanese.

Input Ports

NameTypeDescription
レイヤー
layers
List<Image>
レイヤー画像のリストです(先頭が最背面、末尾が最前面)。ピクセルキャンバスの「レイヤー」出力をそのままつなげます。
パス
paths
Path
サブパスがそのままパーツになるベジェパスです(S4)。閉パスはシルエット充填、開パスは断面半径つきのチューブになります。役割タグ(盛る/彫る/稜線/枠/穴)はマルチパスのレイヤーで付けられます。
領域
regions
RegionMap
各領域がパーツになるリージョンマップです(ID昇順)。石畳などプロシージャルな供給源に使います。
レイヤー名
layer_names
List<Text>
「レイヤー」と同じ並びのレイヤー名リストです(任意)。ピクセルキャンバスの「レイヤー名」出力をつなぐと、インスペクタのレイヤー別設定が名前で表示されます。

Output Ports

NameTypeDescription
サーフェース
surface
Surface
レイヤーごとの高さ・接触影(AO)・レイヤー面IDを持ったサーフェースです。「サーフェース光プレビュー」につなげます。
プレビュー
preview
Image
レイヤーを合成した見た目のプレビューです。
高さ
height
Image
レイヤーごとに推定した高さマップです。確認や独自パイプラインに使えます。
接触影
ao
Image
重なり順から作った接触影マップです。白が影なし、暗いほど影です。

Parameters

NameTypeDefaultRangeDescription / Options
立体の形
profile
Enum
Round

各レイヤーをシルエットからどんな立体として推定するかです。

  • 丸いRound
    風船のように丸く膨らんだ立体として扱います。キャラクターや柔らかい物に向きます。
  • とがるSharp
    円錐のように直線的にとがった立体として扱います。結晶やトゲに向きます。
  • 平らな天面Flat
    縁は丸く、中心は平らな立体として扱います。レンガや箱に向きます。
レイヤー別の立体の形
layer_profiles
Text

「立体の形」をレイヤーごとに上書きします(先頭が最背面。Round / Sharp / Flat / Curve / CylinderV / CylinderH / Relief / Engrave / Decal / Emission をカンマ区切り)。空欄は共通の「立体の形」。Curve は行のカーブ編集で自由設計、CylinderV/H は軸方向に平らで直交方向だけ丸い円柱(樽・柱・横丸太)、Relief は浮き彫り、Engrave は彫り込み(口・溝)、Decal は色だけ、Emission は色だけ+発光(ランタンのガラス・窓明かり)です。

レイヤー別プロファイルカーブ
layer_profile_curves
CustomData

レイヤー別設定の行から編集するカスタムプロファイルカーブです(JSON。形が Curve のレイヤーで使用)。縁からの正規化距離 t → 高さの対応を持ちます。

レイヤー別の高さ追加
layer_height_offsets
Text

レイヤーごとの高さ指定です(先頭が最背面。例: "0, 0.5")。構造レイヤー(丸い/とがる/平ら)ではレイヤー全体の底上げ、Relief / Engrave では盛り上がりの厚み・彫り込みの深さになります(0=パーツの太さから自動)。

レイヤー別の傾き方向
layer_tilt_angles
Text

レイヤーごとの傾き方向(度)をカンマ区切りで指定します(先頭が最背面。0=右へ向かって高く、90=上へ向かって高く)。インスペクタの行から編集します。

レイヤー別の傾き強さ
layer_tilt_amounts
Text

レイヤーごとの傾き強さ(0〜1)をカンマ区切りで指定します(先頭が最背面)。0=傾きなし、1=低い側の端が高さ0まで落ちます。グラデーションの範囲はレイヤー自身の幅から自動で決まります。

レイヤー別彫刻データ
layer_sculpt_data
CustomData

ビルダーエディタが管理するレイヤー別ブラシストロークです(JSON、レイヤーindexごと)。合成前に各レイヤーの高さ場へ適用されるため、他のレイヤーへ影響せず、接触影も彫った後の形で再計算されます。

パス断面半径
path_widths
Text

パスのサブパスごとのチューブ断面半径(px)のカンマ区切りです。ソース側タグの半径を上書きします。空欄はタグの値(無ければ既定2px)を使います。

パスのピクセルパーフェクト
path_pixel_perfect
Bool
false

パスパーツの輪郭を、ドット絵らしい「設計された階段」(角の2重ピクセルなし)でラスタ化します(outline ノードの pixel_perfect と同じ規約)。高さは従来どおり正確距離から作るため陰影は変わらず、マスクの縁ピクセルの選び方だけが変わります。オフ(既定)は距離ベースの縁のままです。

接触影の濃さ
contact_strength
Float
0.50–1 / step 0.01

手前レイヤーのすぐ隣をどれだけ暗くするかです。0にすると接触影を作りません。「レイヤー別の高さ追加」で持ち上げたぶんは自動で弱まります。

接触影の広さ
contact_radius
Int
20–16

接触影が手前レイヤーから何ピクセルまで届くかです。

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
Layers to Surface — PixPipeline Node Reference