Skip to content

Conversation

@bobnik
Copy link
Collaborator

@bobnik bobnik commented Jan 23, 2026

Layer mask and better borders (via boundary tracing and polygon machines)

Features

Mask effect: layer shape option

Lets you use one layer as the mask for another. Works with any shape, including self-intersecting patterns like Fractal Spirograph or text.

Control Description
Mask shape: layer Use another layer's shape as the mask
Source layer Dropdown to select which layer defines the mask boundary
Boundary type Auto (recommended), or manual: expand, concave, footprint, convex
image image image image

Fine tuning effect: enhanced border

Provides several improved border options.

Control Description
Border Type Auto, expand, concave, footprint, or convex
Pad (%) Expand/contract border relative to shape
Draw border only Skip the pattern, output only the border path

Implementation

1. Polygon machines

New machine types that clip patterns to arbitrary polygon boundaries:

  • PolygonMachine - Clips vertices inside a polygon boundary
  • PolygonInvertedMachine - Clips vertices outside a polygon boundary

2. Boundary tracing

Methods for extracting outer boundaries from complex shapes. When drawing a boundary, it auto-detects the optimal algorithm based on shape characteristics.

Algorithm Use Case
expand Simple closed shapes (Star, Heart, Polygon)
footprint Complex shapes (Text, Fractals, Mazes)
fillPattern Disconnected cells (Voronoi, Tessellation)
concave Uniform edge offset
convex Convex hull
image image

Use cases

Add a layer mask

  1. Create Layer 1 with a Star shape
  2. Create Layer 2 with a Spirograph pattern
  3. Add Mask effect to Layer 2
  4. Set mask shape to "layer"
  5. Select Layer 1 (Star) as source
  6. Spirograph is now clipped to the star shape

Add a border

  1. Create a layer
  2. Add Fine Tuning effect
  3. Check "Add border"
  4. Select a border type.

@bobnik bobnik changed the title Feature/polygon masks Polygon masks and better borders Jan 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants