Skip to content

Paint v2: Slice B — Textured / stamp brushes #545

Description

@fernandotonon

Parent epic: #543

Goal

Paint with an image as the brush — per-stamp images (a leaf, a scratch, a stencil shape) and tiling source textures (wood grain, brick, fabric).

Scope

  • Extend BrushEngine's footprint from { round | square } to { round | square | stampImage | tilingSource }.
  • Stamp image mode:
    • PNG/TGA with alpha; greyscale = mask.
    • Each stamp paints one instance scaled to brush radius, with brush colour or gradient (Slice A) modulating it.
    • Rotation: none | fixed angle | stroke direction | random jitter.
    • Spacing — distance between stamps along the stroke as % of radius.
    • Scatter — random perpendicular offset.
    • Size jitter, opacity jitter per stamp.
  • Tiling source mode:
    • Tileable image sampled under the footprint in UV-space.
    • Useful for wood grain, brick, fabric where the pattern is in the image, not the footprint.
    • Tiling scale, rotation, offset.
  • Bundled (CC0): 6 stamps (soft circle, hard circle, charcoal, spatter, scratch lines, foliage cluster); 4 tilings (wood, brick, fabric, concrete).
  • Stamp library panel in brush inspector: thumbnail grid, drag-and-drop import, delete, rename. Storage in <AppData>/paint/stamps/ and <AppData>/paint/tilings/.
  • Cache: stamp images pre-rasterised once per brush-relative footprint.

Acceptance Criteria

  • Stamp brushes produce visibly correct stamps with rotation, spacing, scatter, jitter.
  • Tiling source brush tiles a wood-grain texture across a stroke without visible seams.
  • User can import a custom PNG as a stamp.
  • All 10 bundled assets ship across macOS, Windows, Linux.
  • Gradient brush (Slice A) + textured stamp combine correctly.
  • Strokes undoable.
  • Sentry breadcrumb paint.brush.stamp with stamp name + mode.
  • Headless-CI tests cover stamp footprint computation and tiling sampling.

Effort

~8 days.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestpaintPaint tools (vertex, texture, projection, layers, brushes)

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions