Yotsuba Games
Back to Node List

Path Trim

path_trim

Trim a selected section of a bezier sub-path

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
ใƒ‘ใ‚น
path
Path
Required
ๅˆ‡ใ‚Šๅ‡บใ™ใƒ™ใ‚ธใ‚งใƒ‘ใ‚น

Output Ports

NameTypeDescription
ใƒ‘ใ‚น
path
Path
ๅˆ‡ใ‚Šๅ‡บใ•ใ‚ŒใŸใƒ‘ใ‚นๅŒบ้–“

Parameters

NameTypeDefaultRangeDescription / Options
ใ‚ตใƒ–ใƒ‘ใ‚น
sub_path_index
Int
00โ€“255

ๅˆ‡ใ‚Šๅ‡บใ—ๅฏพ่ฑกใฎใ‚ตใƒ–ใƒ‘ใ‚น็•ชๅท๏ผˆ0 = ๆœ€ๅˆ๏ผ‰

้–‹ๅง‹
start_t
Float
00โ€“1 / step 0.01

ใƒ‘ใ‚นไธŠใฎ้–‹ๅง‹ไฝ็ฝฎ๏ผˆ0 = ๅง‹็‚นใ€1 = ็ต‚็‚น๏ผ‰

็ต‚ไบ†
end_t
Float
10โ€“1 / step 0.01

ใƒ‘ใ‚นไธŠใฎ็ต‚ไบ†ไฝ็ฝฎ๏ผˆ0 = ๅง‹็‚นใ€1 = ็ต‚็‚น๏ผ‰

Overview

Extracts only part of a path (from start_t to end_t). Its showcase use is a line-drawing effect: simply animate end_t from 0 to 1 to draw a line as it traces the path.

Usage tips

  • The go-to drawing animation is: promote end_t to an input pin ๐Ÿ“Œ โ†’ time_source + ease_in_out โ†’ draw with path_stroke โ†’ animation_render. It creates drawing effects for magic circles, signatures, or lightning in one setup.
  • It is useful statically too: take part of a circular path for an arc, or use only the middle of a long path.
  • A closed path can extract an interval across the starting point (start 0.75 โ†’ end 0.25).

Related nodes

  • path_stroke โ€” draw the extracted line

  • ease_in_out / time_source โ€” drive end_t

  • path_reverse โ€” reverse the growth direction

  • reveal โ€” a similar image-based effect that does not require a path

  • Version: 1

Behavior

  • Extracts the interval from start_t to end_t as a Path.
  • On an open path with start_t > end_t, the values are automatically reordered from smaller to larger.
  • On a closed path with start_t > end_t, the interval wraps forward across the end point.
  • A zero-length interval returns an empty path.

Examples

Draw a growing line

[Bezier Path] โ†’ [Path Trim] โ†’ [Path Stroke] โ†’ [Preview]
                   โ†‘start_t
                   โ†‘end_t

Keep start_t=0.0 and animate end_t from 0 to 1 to make the line grow.

Place stamps on only part of a path

[Bezier Path] โ†’ [Path Trim] โ†’ [Path Array] โ†’ [Preview]

Extract an interval across the start of a closed path

[Multi Path] โ†’ [Path Trim(start_t:0.75, end_t:0.25)] โ†’ [Path Stroke]

On a closed path, an interval across the starting point is extracted forward as-is.

Notes

  • One operation trims one subpath.
  • Combine it with PathSplit to handle multiple subpaths individually.
  • The trimmed result is open unless the entire interval is retained.
Back to Node List
Path Trim โ€” PixPipeline Node Reference