BS-JD-105 - Per-face material and UV controls #14

Closed
opened 2026-06-06 01:46:40 -04:00 by Rbanh · 5 comments
Owner

Summary

Allow brush faces to reference textures/materials and edit UV offset, scale, and rotation.

Why

Blockout needs quick visual readability and early material planning without leaving the editor.

Implementation notes

  • Add per-face material refs and UV transform data to brush schema.
  • Expose face material/UV controls in inspector or contextual panel.
  • Support drag/drop material assignment onto selected faces.
  • Preserve data through CSG/edit operations where practical.

Acceptance criteria

  • Each face can reference a material or texture.
  • UV offset/scale/rotation edits preview and persist.
  • Drag/drop assignment works for brush faces.
  • Saved scene remains authoring-data only.

Tests/docs

Serialization and hydration tests for material/UV data. Update brush/material docs.

## Summary Allow brush faces to reference textures/materials and edit UV offset, scale, and rotation. ## Why Blockout needs quick visual readability and early material planning without leaving the editor. ## Implementation notes - Add per-face material refs and UV transform data to brush schema. - Expose face material/UV controls in inspector or contextual panel. - Support drag/drop material assignment onto selected faces. - Preserve data through CSG/edit operations where practical. ## Acceptance criteria - [ ] Each face can reference a material or texture. - [ ] UV offset/scale/rotation edits preview and persist. - [ ] Drag/drop assignment works for brush faces. - [ ] Saved scene remains authoring-data only. ## Tests/docs Serialization and hydration tests for material/UV data. Update brush/material docs.
Rbanh added this to the M1 - Brush-based blockout milestone 2026-06-06 01:46:40 -04:00
Rbanh added the
roadmap:jackdaw
type:feature
priority:P1
area:brushes
labels 2026-06-06 01:46:40 -04:00
Author
Owner

Starting implementation for BS-JD-105 - Per-face material and UV controls.

Initial scope:

  • In Face mode, show selected face controls in the Brush inspector card.
  • Edit per-face UV offset, UV scale, UV rotation, material ref, and texture ref using existing BrushFaceDesc data.
  • Route changes through undoable SetBrush history.
  • Add docs/tests for per-face field mutation.

Hydrating distinct per-face material sections may require restructuring brush mesh generation into material batches; I will implement the inspector/data path first and then assess the hydration impact.

Starting implementation for `BS-JD-105 - Per-face material and UV controls`. Initial scope: - In Face mode, show selected face controls in the Brush inspector card. - Edit per-face UV offset, UV scale, UV rotation, material ref, and texture ref using existing `BrushFaceDesc` data. - Route changes through undoable `SetBrush` history. - Add docs/tests for per-face field mutation. Hydrating distinct per-face material sections may require restructuring brush mesh generation into material batches; I will implement the inspector/data path first and then assess the hydration impact.
Author
Owner

Progress checkpoint committed as d847706 Add brush face controls.

Implemented:

  • Brush inspector now shows selected-face controls when the current actor owns selected Face-mode elements.
  • Per selected face: UV offset, UV scale, UV rotation, material ref, and texture ref fields edit persisted BrushFaceDesc data.
  • Changes route through existing SetBrush history.
  • Updated docs/editor/brushes.md with current behavior and limitations.

Verification:

  • cargo fmt --check
  • cargo check -p editor --all-targets
  • cargo check --workspace --all-targets --all-features

Leaving this issue open for:

  • Asset Browser picker/drop UI for face material/texture refs.
  • Per-face material batching in brush hydration.
  • Undo/redo tests around multi-face material/UV edits.
Progress checkpoint committed as `d847706 Add brush face controls`. Implemented: - Brush inspector now shows selected-face controls when the current actor owns selected Face-mode elements. - Per selected face: UV offset, UV scale, UV rotation, material ref, and texture ref fields edit persisted `BrushFaceDesc` data. - Changes route through existing `SetBrush` history. - Updated `docs/editor/brushes.md` with current behavior and limitations. Verification: - `cargo fmt --check` - `cargo check -p editor --all-targets` - `cargo check --workspace --all-targets --all-features` Leaving this issue open for: - Asset Browser picker/drop UI for face material/texture refs. - Per-face material batching in brush hydration. - Undo/redo tests around multi-face material/UV edits.
Author
Owner

Checkpoint pushed: 015ae6d Add brush face asset pickers.

Implemented:

  • Replaced the raw selected-face EditorAssetRef text fields with Asset Browser-aware picker rows for Brush face Material and Texture refs.
  • Face Material rows can browse/locate/clear imported source-material subassets and top-level material assets.
  • Face Texture rows can browse/locate/clear top-level texture assets and request thumbnails for the selector preview path.
  • Compatible Asset Browser drags now highlight face Material/Texture rows and assign on release.
  • Embedded model material/texture subasset drags are converted to stable EditorAssetRef values when registry data is available.
  • Updated docs/editor/brushes.md.

Verification:

  • cargo fmt --check
  • cargo check -p editor --all-targets
  • cargo check --workspace --all-targets
  • cargo check --workspace --all-targets --all-features

Remaining follow-up for the full ticket: generated brush hydration still uses a single material batch, so face material/texture refs persist and can be authored but do not yet render as per-face material sections.

Checkpoint pushed: `015ae6d Add brush face asset pickers`. Implemented: - Replaced the raw selected-face `EditorAssetRef` text fields with Asset Browser-aware picker rows for Brush face Material and Texture refs. - Face Material rows can browse/locate/clear imported source-material subassets and top-level material assets. - Face Texture rows can browse/locate/clear top-level texture assets and request thumbnails for the selector preview path. - Compatible Asset Browser drags now highlight face Material/Texture rows and assign on release. - Embedded model material/texture subasset drags are converted to stable `EditorAssetRef` values when registry data is available. - Updated `docs/editor/brushes.md`. Verification: - `cargo fmt --check` - `cargo check -p editor --all-targets` - `cargo check --workspace --all-targets` - `cargo check --workspace --all-targets --all-features` Remaining follow-up for the full ticket: generated brush hydration still uses a single material batch, so face material/texture refs persist and can be authored but do not yet render as per-face material sections.
Author
Owner

Checkpoint pushed: dc59397 Hydrate brush face materials.

Implemented:

  • Added backward-compatible optional EditorAssetRef.source_path cache for loadable runtime hydration paths.
  • Brush face material/texture picker/drop candidates now cache source paths where shared hydration can load them.
  • Brush hydration groups faces by cached material/texture path and spawns separate generated mesh children per batch.
  • Top-level MaterialAsset refs with source paths load through MaterialAsset::load_from_path.
  • Face texture refs with source paths override the generated material base-color texture.
  • Added grouping coverage in shared brush hydration tests.
  • Updated brush docs.

Verification:

  • cargo fmt --check
  • cargo test -p shared brush
  • cargo check -p editor --all-targets
  • cargo check --workspace --all-targets
  • cargo check --workspace --all-targets --all-features

Known limitation: imported model source-material subasset refs still persist for future material-preserving CSG, but they do not yet resolve through shared brush hydration unless they have a loadable source path.

Checkpoint pushed: `dc59397 Hydrate brush face materials`. Implemented: - Added backward-compatible optional `EditorAssetRef.source_path` cache for loadable runtime hydration paths. - Brush face material/texture picker/drop candidates now cache source paths where shared hydration can load them. - Brush hydration groups faces by cached material/texture path and spawns separate generated mesh children per batch. - Top-level `MaterialAsset` refs with source paths load through `MaterialAsset::load_from_path`. - Face texture refs with source paths override the generated material base-color texture. - Added grouping coverage in shared brush hydration tests. - Updated brush docs. Verification: - `cargo fmt --check` - `cargo test -p shared brush` - `cargo check -p editor --all-targets` - `cargo check --workspace --all-targets` - `cargo check --workspace --all-targets --all-features` Known limitation: imported model source-material subasset refs still persist for future material-preserving CSG, but they do not yet resolve through shared brush hydration unless they have a loadable source path.
Rbanh closed this issue 2026-06-06 06:36:01 -04:00
Author
Owner

QA checklist audit completed; no additional local code changes made for this pass.

Evidence reviewed:

  • Face-mode inspector controls edit selected BrushFaceDesc UV offset, UV scale, UV rotation, material ref, and texture ref through undoable brush updates.
  • Material/texture face rows use Asset Browser-aware picker/drop assignment and cache source paths where available.
  • Shared brush hydration groups faces by cached material/texture source paths and has regression coverage for grouping.
  • Docs already describe the current behavior and known source-path limitation.

Verification rerun:

  • cargo test -p shared brush
  • cargo check -p editor --all-targets

Leaving #37 checklist unchecked until interactive QA confirms face picker/drop, UV preview, and save/reload persistence.

QA checklist audit completed; no additional local code changes made for this pass. Evidence reviewed: - Face-mode inspector controls edit selected `BrushFaceDesc` UV offset, UV scale, UV rotation, material ref, and texture ref through undoable brush updates. - Material/texture face rows use Asset Browser-aware picker/drop assignment and cache source paths where available. - Shared brush hydration groups faces by cached material/texture source paths and has regression coverage for grouping. - Docs already describe the current behavior and known source-path limitation. Verification rerun: - `cargo test -p shared brush` - `cargo check -p editor --all-targets` Leaving #37 checklist unchecked until interactive QA confirms face picker/drop, UV preview, and save/reload persistence.
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#14
No description provided.