BS-JD-303 - Terrain material layers and texture painting MVP #24

Closed
opened 2026-06-06 01:48:06 -04:00 by Rbanh · 1 comment
Owner

Summary

Add terrain material layers with compact normalized weight painting.

Delivered

  • Backward-compatible TerrainDesc support for up to four shared Material/Material Instance layers.
  • Deterministic RGBA8 weights per height sample with exact normalization and implicit layer-zero defaults.
  • Vertex-color weight transport and revision-aware blended PBR hydration through blacksite_surface.
  • Terrain inspector assignment, clear, reorder, remove, UV tiling, drag/browse targets, and sample coverage.
  • Modal Paint/Erase in the existing horizontal viewport toolbar with live footprint, exact cancel, and one history transaction per stroke.
  • Generic reflected-history replacement fix for shrinking list-backed component snapshots.
  • Deterministic two-layer terrain showcase, ADR 0040, workflow docs, tests, and native Wayland evidence.

Acceptance criteria

  • Multiple terrain material layers can be assigned.
  • User can paint layer weights with preview.
  • Weight data persists and hydrates consistently.
  • Invalid/missing material refs report clearly and retain a visible fallback.

Tests/docs

  • Layer serialization and validation tests.
  • Vertex-weight transport and material packing tests.
  • Paint/Erase normalization, footprint isolation, cancel, and single-history undo/redo tests.
  • Full source gate and live native-Wayland acceptance.
  • Terrain guide, root controls/checklist, ADR 0040, working plan, and evaluation record updated.

Integrated on main in d1a56f7. Packaged tests were intentionally skipped per current project direction.

## Summary Add terrain material layers with compact normalized weight painting. ## Delivered - Backward-compatible `TerrainDesc` support for up to four shared Material/Material Instance layers. - Deterministic RGBA8 weights per height sample with exact normalization and implicit layer-zero defaults. - Vertex-color weight transport and revision-aware blended PBR hydration through `blacksite_surface`. - Terrain inspector assignment, clear, reorder, remove, UV tiling, drag/browse targets, and sample coverage. - Modal Paint/Erase in the existing horizontal viewport toolbar with live footprint, exact cancel, and one history transaction per stroke. - Generic reflected-history replacement fix for shrinking list-backed component snapshots. - Deterministic two-layer terrain showcase, ADR 0040, workflow docs, tests, and native Wayland evidence. ## Acceptance criteria - [x] Multiple terrain material layers can be assigned. - [x] User can paint layer weights with preview. - [x] Weight data persists and hydrates consistently. - [x] Invalid/missing material refs report clearly and retain a visible fallback. ## Tests/docs - [x] Layer serialization and validation tests. - [x] Vertex-weight transport and material packing tests. - [x] Paint/Erase normalization, footprint isolation, cancel, and single-history undo/redo tests. - [x] Full source gate and live native-Wayland acceptance. - [x] Terrain guide, root controls/checklist, ADR 0040, working plan, and evaluation record updated. Integrated on `main` in `d1a56f7`. Packaged tests were intentionally skipped per current project direction.
Rbanh added this to the M3 - Terrain and physics placement milestone 2026-06-06 01:48:06 -04:00
Rbanh added the
roadmap:jackdaw
type:feature
priority:P2
area:terrain
labels 2026-06-06 01:48:06 -04:00
Author
Owner

Implemented and integrated on main in d1a56f7.

Terrain material Paint acceptance

Live native-Wayland acceptance:

  • Concrete and Surface Tint blend continuously across generated terrain chunks.
  • The Terrain inspector exposes two shared layer assignments, UV tiling, reorder/remove/clear, drag/browse targets, and coverage counts.
  • Paint/Erase stays in the existing horizontal viewport toolbar with target layer, radius, and strength.
  • A drag changed layer-two coverage from 13/25 to 16/25 samples and produced exactly one Undo: Paint Terrain Material; Ctrl+Z restored 13/25 and Ctrl+Y restored 16/25.
  • The terrain-following cyan footprint rendered and the transform gizmo stayed suppressed while Paint owned input.
  • Forward PBR compiled without GPU pipeline errors; QA also removed an invalid deferred-only prepass override from both project material extensions.

Source gate: fmt, workspace check, strict workspace clippy, full workspace tests, cargo validate-levels (60 dependencies, 5 existing non-blocking findings, 0 blockers), cargo bake-navigation (1 artifact), and diff hygiene all pass. Packaged tests remain intentionally skipped per current direction.

Implemented and integrated on `main` in `d1a56f7`. ![Terrain material Paint acceptance](https://git.spacetrainclubhouse.com/attachments/84b7b801-a7ff-42fb-a551-9b2da9d6fcb1) Live native-Wayland acceptance: - `Concrete` and `Surface Tint` blend continuously across generated terrain chunks. - The Terrain inspector exposes two shared layer assignments, UV tiling, reorder/remove/clear, drag/browse targets, and coverage counts. - Paint/Erase stays in the existing horizontal viewport toolbar with target layer, radius, and strength. - A drag changed layer-two coverage from 13/25 to 16/25 samples and produced exactly one `Undo: Paint Terrain Material`; Ctrl+Z restored 13/25 and Ctrl+Y restored 16/25. - The terrain-following cyan footprint rendered and the transform gizmo stayed suppressed while Paint owned input. - Forward PBR compiled without GPU pipeline errors; QA also removed an invalid deferred-only prepass override from both project material extensions. Source gate: fmt, workspace check, strict workspace clippy, full workspace tests, `cargo validate-levels` (60 dependencies, 5 existing non-blocking findings, 0 blockers), `cargo bake-navigation` (1 artifact), and diff hygiene all pass. Packaged tests remain intentionally skipped per current direction.
Rbanh closed this issue 2026-07-12 21:04:13 -04:00
Sign in to join this conversation.
No project
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: Falling-Metal-Interactive/Blacksite#24
No description provided.