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_closedinpath_strokedoes 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
surfaceoutput plussurface_heightsends 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_patheditor. - 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_maskplusmask_booleanwhen holes or multiple contours require EvenOdd/NonZero behavior.
Related nodes
path_stroke— the line operation; fill_closed can draw line and fill togetherpath_mask— filling specialized for masksbezier_path/multi_path_editor— supply the shape to fillshape_generate— avoid drawing standard primitives
Algorithm
- Generate outline coordinates with the same
rasterize_subpathpipeline aspath_stroke, with PP correction disabled.- Corner-pixel restoration at
.5,.5segment joins is also applied automatically.
- Corner-pixel restoration at
- Calculate the minimum and maximum x on every outline row (y line).
- Fill every pixel from min_x to max_x on each row, including the outline.
Open subpaths are skipped; only subpaths with
closed: trueare 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,.5anchor points is handled automatically insiderasterize_subpath, producing consistent fill for squares, triangles, and similar shapes.