Skip to content

VertexPaint: Slice D — Selection-driven fills (Fill face / island / material / selection — flat-aware) #635

@fernandotonon

Description

@fernandotonon

Parent epic: #631
Depends on: Slice A (#632), Slice B (#633).

Goal

Fill operations that complement freehand brush painting. The everyday workflow for low-poly vertex-coloured assets is "select these faces, fill with this colour", not stroke-by-stroke.

Scope

  • Fill face — fills the face under the cursor. Respects shading mode:
    • Flat face → set the face's flat colour to the active brush colour.
    • Smooth face → set every corner of the face to the brush colour (the face renders solid because all corners agree, but other faces sharing those corners may now mismatch — vertex-split kicks in to preserve them).
  • Fill island — flood-fills connected coplanar (or shading-mode-compatible) faces under the cursor. Uses HalfEdgeMesh adjacency.
    • "Stop at shading-mode boundary" toggle (default ON): the fill stops where Smooth meets Flat. So filling a flat-shaded "wall" doesn't bleed into the smooth-shaded "ceiling".
    • "Stop at material boundary" toggle (default ON): the fill stops where the active submesh's material changes.
    • "Stop at sharp edge" toggle: fill stops at edges whose dihedral angle exceeds a configurable threshold (default 30°).
  • Fill by material — fills every face on a submesh sharing the selected material with the active colour.
  • Fill by current selection — fills the user's current face selection (from Edit Mode) with the active colour. Respects shading mode per-face.
  • Fill by random palette — fills the selection with random colours sampled from a user-chosen palette. Useful for blocking-in distinct face groups visually before refining.
  • Fill with gradient — applies a linear / radial gradient ramp across the selection, indexed by face centroid distance from a clicked anchor point.
  • Fill toolbar / context menu:
    • Right-click in the viewport with a face hovered → "Fill face / Fill island / Fill by material / Fill by sharp edges".
    • Edit Mode toolbar with a selection → "Fill selection / Fill with palette / Fill with gradient".

Acceptance Criteria

  • Fill face works on both Flat and Smooth faces with correct shading-mode behaviour.
  • Fill island stops at shading-mode / material / sharp-edge boundaries when those toggles are on.
  • Fill by material correctly colours every face on the matching submesh.
  • Fill by current selection correctly handles a mixed-mode selection (flat faces get face colour, smooth faces get corner colours).
  • Fill by random palette produces reproducible results given the same seed.
  • Fill with gradient produces a smooth ramp across the selection.
  • All fills are undoable as a single command.
  • Sentry breadcrumbs paint.vertex.fill.* with the fill mode.
  • Headless-CI tests: each fill mode on a fixture mesh with a known structure.

Effort

~5 days.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestvertex-paintVertex colour authoring: shading modes, per-face/per-vertex interpolation

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions