Skip to content

UV: Slice F — Packing, texel density, overlap/stretch overlays #464

Description

@fernandotonon

Parent epic: #458
Depends on: Slice C, #400 (xatlas auto-unwrap)

Goal

Production-quality island management: pack islands into 0–1, equalize texel density, visualize overlaps and stretch.

Scope

  • Pack islands: re-pack selected (or all) islands into 0–1 with configurable margin and rotation. Wrap xatlas's packer to operate on existing UVs (no re-unwrap). Single UVEditCommand for undo.
  • Texel density tools:
    • Show current min/avg/max texel density of selection in px/m against the active texture's resolution.
    • "Average density across selection" — uniformly scale each selected island to the mean.
    • "Set density to N px/m" — uniformly scale each selected island to a target value.
  • UDIM: shift selected islands by integer U/V offsets to author multi-tile layouts. Display-only in v1 (the writer side is exporter work and is out of scope here).
  • Overlap overlay: shade overlapping triangles in red in the UV panel. Configurable on/off.
  • Stretch overlay: color triangles by U/V distortion (compress=blue, stretch=red). Configurable on/off.

Acceptance Criteria

  • Packing produces a non-overlapping layout fitting in 0–1 with the requested margin on a multi-island fixture mesh.
  • Texel-density readout matches a hand-computed value on a known reference mesh + texture.
  • Average / set-density operations scale islands uniformly without distortion.
  • Overlap overlay correctly identifies a deliberately overlapped fixture.
  • Stretch overlay color matches expected distortion direction on a stretched test island.
  • All edits are undoable.

Effort

~6–7 days.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestuv-editorUV map editor and editing tools

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions