Studio Yotsuba
Back to Node List

Path Fill

path_fill

Fill the interior of a closed bezier path as an image and surface

Reviewed
Guide available

Input Ports

NameTypeDescription
Path
path
Path
Required
Bezier path to fill
Color
color
Color
Fill color (overrides parameter if connected)

Output Ports

NameTypeDescription
Image
output
Image
Filled path image
Surface
surface
Surface
Filled path as a Surface with height, material ID, and face ID.

Parameters

NameTypeDefaultRangeDescription / Options
Width
width
Int
641–1024

Canvas width in pixels

Height
height
Int
641–1024

Canvas height in pixels

Color
color
Color
[1,1,1,1]—

Fill color (used when input port is not connected)

Material ID
material_id
Text
core:default—

Material assigned to filled pixels in the Surface output.

Face ID
face_id
Text
surface:path-fill—

Face label assigned to filled pixels in the Surface output.

Surface Height
surface_height
Float
0.550–1 / step 0.01

Height value written where the filled path exists.

AO
surface_ao
Float
0.960–1 / step 0.01

Ambient shadow value for the filled shape. Lower values look darker.

Roughness
surface_roughness
Float
0.750–1 / step 0.01

How matte the filled shape is when lit. Higher values reduce sharp shine.

Overview

A rasterizer that fills the inside of a closed path with a solid color. If path_stroke is the line operation, this is the fill operation. It directly creates silhouettes, base shapes, and mask shapes from drawn paths.

  • Version: 1
  • Generator: yes (is_generator: true)

Usage tips

  • If you only need a finished outline + fill, fill_closed in path_stroke does both in one node. Use this node to separate line and fill when they need independent processing, such as blurring only the fill.
  • Fill with white to use it directly as a mask, equivalent to path_mask.
  • The surface output plus surface_height sends the filled shape into lighting as a raised surface.

Common pitfalls

  • Nothing fills: the path is open; open subpaths are intentionally skipped. Close it with 🔒 in the bezier_path editor.
  • A complex self-intersecting path fills incorrectly: because filling spans min to max on each row, a C-shape or donut can fill through its hollow area. Split the shape or build it with path_mask/mask_boolean.
  • This node intentionally remains a fast simple min-to-max fill. Use path_mask plus mask_boolean when holes or multiple contours require EvenOdd/NonZero behavior.

Related nodes

  • path_stroke — the line operation; fill_closed can draw line and fill together
  • path_mask — filling specialized for masks
  • bezier_path / multi_path_editor — supply the shape to fill
  • shape_generate — avoid drawing standard primitives

Algorithm

  1. Generate outline coordinates with the same rasterize_subpath pipeline as path_stroke, with PP correction disabled.
    • Corner-pixel restoration at .5,.5 segment joins is also applied automatically.
  2. Calculate the minimum and maximum x on every outline row (y line).
  3. Fill every pixel from min_x to max_x on each row, including the outline.

Open subpaths are skipped; only subpaths with closed: true are filled.

Examples

Basic fill

[BezierPath] → path → [PathFill] → output → [Preview]

Compositing stroke and fill

[BezierPath] → path → [PathFill]   → output → [Blend] → [Preview]
              → path → [PathStroke] → output ↗

Using it as a Surface

[BezierPath] → path → [PathFill] → surface → [Surface Light Preview]

Change material_id to stone or metal to treat the same filled shape as a Surface with that material ID.

Notes

  • A path with fewer than three outline points returns an empty image.
  • An unconnected path returns an empty image and empty Surface.
  • Surface parameters are collapsed under "Surface" in the inspector.
  • Corner-pixel restoration for .5,.5 anchor points is handled automatically inside rasterize_subpath, producing consistent fill for squares, triangles, and similar shapes.
Back to Node List