Back to Node List

Branching Path

branching_path

Generate deterministic branching paths for cracks, lightning, roots, veins, rivers, and impact lines

Reviewed
Guide available
The node name and summary are available in English. Port, parameter, and article details are currently shown in Japanese.

Output Ports

NameTypeDescription
パス
path
Path
生成した各枝を開いたサブパスとして格納した通常のPath文書です

Parameters

NameTypeDefaultRangeDescription / Options
width
Int
641–1024

出力パスを配置するキャンバス幅(px)です

高さ
height
Int
641–1024

出力パスを配置するキャンバス高さ(px)です

伸び方
mode
Enum
Radial

全周へ広げるか、一方向の扇形へ伸ばすかを選びます

  • 放射Radial
    主枝を発生点の周囲へ均等に配置します。衝撃ひび、根、放射線向けです
  • 指定方向Directional
    主枝を指定方向の扇形へ向けます。稲妻、河川、幹、葉脈向けです
発生点X
origin_x
Int
320–1024

枝が始まるX座標(px)です。現在の幅を超える値は右端へ合わせます。

発生点Y
origin_y
Int
320–1024

枝が始まるY座標(px)です。現在の高さを超える値は下端へ合わせます。

主方向
direction
Float
2700–360 / step 1

扇形の中心方向です。0°=右、90°=下、180°=左、270°=上。放射では最初の主枝を回転します。

方向の広がり
direction_spread
Float
900–360 / step 5

指定方向の主枝が占める扇形の角度です。稲妻や幹は20〜45°、三角州や葉脈は90〜180°が目安です。

主枝の本数
main_branches
Int
51–32

発生点から直接伸びる本数です。ひびや根は3〜6本、稲妻や幹は1〜3本から試します。

主枝の長さ
main_length
Float
241–512 / step 1

境界処理前の主枝のおおよその長さ(px)です。まずキャンバス寸法の約1/3から試します。

曲がる間隔
bend_interval
Float
51–32 / step 1

向きを変え、子枝を判定する間隔(px)です。細かなひびは3〜5px、根や河川は6〜12pxが目安です。

曲がり量
bend
Float
120–90 / step 1

各間隔で左右へ曲がる最大角度です。自然な根は5〜15°、ひびや稲妻は20〜40°、直線放射は0°にします。

分岐確率
branch_chance
Float
0.30–1 / step 0.05

曲がり点ごとに子枝を1本作る確率です。疎なひびは0.15〜0.3、密な根や葉脈は0.4〜0.6が目安です。

枝分かれ角度
branch_angle
Float
455–170 / step 5

子枝が親方向から離れる角度です。根や河川は25〜45°、ひびや稲妻の分岐は45〜75°が目安です。

最大分岐世代
max_generation
Int
20–6

主枝の後に何世代まで子枝を作るかです。放射線は0、ゲーム素材のひびは1〜2、3以上は低確率か小さな上限と併用します。

子枝の長さ倍率
length_decay
Float
0.60.1–0.95 / step 0.05

子枝の長さを親の何倍にするかです。階層を読みやすくするなら0.5〜0.7、0.9付近は同じ長さの枝が密になります。

枝数の上限
max_branches
Int
1281–512

論理的な枝数の安全上限です。密な設定の調整中は32〜64へ下げ、上限で成長を止めた場合は警告します。

キャンバス境界
boundary
Enum
Stop

単体エフェクトは「端で停止」、シームレスタイルは「反対側へつなぐ」を使います。ラップ時は1本の論理枝が複数サブパスに分かれることがあります。

  • 端で停止Stop
    枝が最初に触れたキャンバス端で止めます
  • 反対側へつなぐWrap
    反対側から続け、画面中央を横切る線が出ないよう境界でサブパスを分けます
Surfaceでの役割
surface_role
Enum
Default

任意のS4役割タグです。線の太さや先細りは設定せず、見た目は後段のパスストロークやA30カーブで調整します。

  • 未指定Default
    通常の線描画や後編集向けに役割を未指定にします
  • 盛るRaise
    Surfaceのパス入力で盛り上がるチューブとして扱います
  • 彫るCarve
    ひびや河道を彫る溝として扱います
  • 稜線Ridge
    根、葉脈、盛り上がった継ぎ目向けの稜線として扱います
シード
seed
Int
1-2147483648–2147483647

曲がり、分岐位置、左右を変える番号です。同じ設定とシードなら形状とサブパス順序まで必ず同じになります。

Overview

Generates cracks, roots, impact lines, lightning, rivers, or leaf veins as ordinary paths. Because the result is not a specialized crack image, the same structure can feed line drawing, engraving, raised relief, or coordinate-map workflows. The seed fixes both the shape and generation order.

Usage tips

  • For crack line art, start with Radial, 3–6 main branches, 20–40° bend, 0.15–0.3 branch probability, and 1–2 generations, then use path_stroke at 1–2px with end taper.
  • For lightning, try Directional, 1–2 main branches, 20–45° direction spread, 25–40° bend, and 45–75° branch angle. Explore seeds, then preserve every parameter of the accepted shape.
  • For roots, veins, and rivers, try 6–12px between bends, 5–15° bend, and a child scale of 0.5–0.7. Raise branch probability before increasing generations.
  • For seamless tiles, use the boundary mode that continues on the opposite side. Logical branches are split at the edge, avoiding an unwanted line across the canvas center.
  • When feeding a Surface workflow, use cracks or channels as Carve and roots or veins as Ridge/Raise. Set width, height, and taper downstream.
  • A branch limit around 32–64 is a safe editing range. If a warning appears, lower branch probability or generations before raising the limit.

Common mistakes

  • The result becomes a black mass: halve branch probability, reduce generations by one, or increase the distance between bends.
  • Branches stop too soon: Stop at edge has reached the canvas boundary. Move the origin or direction inward, shorten the branch, or use wrapping only for tile assets.
  • Almost no child branches appear: a main branch shorter than the bend interval has no intermediate branch checks. Increase its length or reduce the interval.
  • The same seed produces a different shape: bend spacing, counts, limits, and other parameters also affect random-consumption order. Save the complete parameter set.
  • Wrapping increases the subpath count: this is intentional; edge fragments prevent a line from crossing the whole image.

Related nodes

  • path_stroke — apply width, color, and taper
  • path_smooth — reduce small bends after generation
  • path_coordinate_map — render progress, lateral distance, and subpath IDs
  • path_connect — join the generated result to a hand-drawn path
  • layers_to_surface — convert tagged branches into carved or raised detail
  • region_to_paths — extracts Region boundaries instead of growing branches from an origin
Back to Node List
Branching Path — PixPipeline Node Reference