BS-JD-208 - Runtime material property blocks and promote-to-instance #53

Closed
opened 2026-07-12 22:56:28 -04:00 by Rbanh · 2 comments
Owner

Summary

Make MaterialPropertyBlocks a real runtime per-renderer/per-slot override path and add an explicit editor action that promotes a block into a reusable direct-base Material Instance.

Why

The shared type exists and is correctly excluded from persistence, but it is not currently consumed by renderer material binding. The #51 foundation therefore cannot honestly claim the property-block workflow yet.

Scope

  • Apply per-slot parameter and texture overrides after the effective shared Material/Instance resolves.
  • Support Standard and custom Surface materials without mutating shared handles.
  • Rebuild only the affected draw material; do not respawn geometry, joints, animation state, or BLAS.
  • Keep blocks runtime-only and absent from scene/prefab saves and upgrades.
  • Add an editor action that previews a target path, writes one direct-base Material Instance transactionally, registers it, assigns it to the slot, and clears the promoted runtime block only after success.
  • Reject missing base materials, orphaned slots, nested instances, invalid schema properties, and external file conflicts with actionable recovery.

Acceptance criteria

  • Runtime parameter/texture blocks visibly affect only their owner and exact stable slot.
  • Two actors sharing a Material remain independent when one has a block.
  • Standard and custom Surface paths use the same override values.
  • Block edits do not reload static/skinned geometry or animation pose.
  • Promote creates a valid sparse direct-base Material Instance and one undoable slot assignment.
  • Cancel/failure leaves the block, shared asset, registry, scene, and history unchanged.
  • Scene/prefab serialization and project upgrades exclude property blocks.
  • Focused runtime, persistence, promotion, conflict, history, and live editor tests pass.
  • ADR 0035, material docs, README, and committed evidence are updated.

Dependency

Builds on the renderer/material/Surface foundation completed in #51.

## Summary Make `MaterialPropertyBlocks` a real runtime per-renderer/per-slot override path and add an explicit editor action that promotes a block into a reusable direct-base Material Instance. ## Why The shared type exists and is correctly excluded from persistence, but it is not currently consumed by renderer material binding. The #51 foundation therefore cannot honestly claim the property-block workflow yet. ## Scope - Apply per-slot parameter and texture overrides after the effective shared Material/Instance resolves. - Support Standard and custom Surface materials without mutating shared handles. - Rebuild only the affected draw material; do not respawn geometry, joints, animation state, or BLAS. - Keep blocks runtime-only and absent from scene/prefab saves and upgrades. - Add an editor action that previews a target path, writes one direct-base Material Instance transactionally, registers it, assigns it to the slot, and clears the promoted runtime block only after success. - Reject missing base materials, orphaned slots, nested instances, invalid schema properties, and external file conflicts with actionable recovery. ## Acceptance criteria - [ ] Runtime parameter/texture blocks visibly affect only their owner and exact stable slot. - [ ] Two actors sharing a Material remain independent when one has a block. - [ ] Standard and custom Surface paths use the same override values. - [ ] Block edits do not reload static/skinned geometry or animation pose. - [ ] Promote creates a valid sparse direct-base Material Instance and one undoable slot assignment. - [ ] Cancel/failure leaves the block, shared asset, registry, scene, and history unchanged. - [ ] Scene/prefab serialization and project upgrades exclude property blocks. - [ ] Focused runtime, persistence, promotion, conflict, history, and live editor tests pass. - [ ] ADR 0035, material docs, README, and committed evidence are updated. ## Dependency Builds on the renderer/material/Surface foundation completed in #51.
Rbanh added this to the M2 - Content workspace and asset pipeline milestone 2026-07-12 22:56:28 -04:00
Author
Owner

M2 completion decision: #53 remains in M2 and is now an explicit child of epic #59. It lands after the effective-material resolver/model-default work (#64/#66) and before final signoff #65; DefaultGrid itself is not a valid promotion base.

M2 completion decision: #53 remains in M2 and is now an explicit child of epic #59. It lands after the effective-material resolver/model-default work (#64/#66) and before final signoff #65; DefaultGrid itself is not a valid promotion base.
Author
Owner

Closed against M2 candidate cf6eaba

MaterialPropertyBlocks resolve above the live base material with cached per-owner/slot Standard and Surface handles. Invalid blocks preserve the base with diagnostics; reviewed promotion creates one direct-base Material Instance, assigns the exact scene slot, and clears the block only after transactional success. Runtime and native promotion evidence pass.

Consolidated code, deterministic, native, and package evidence: M2 evaluation record. Candidate gates passed in full and the commit is published on codex/m2-content-workspace.

## Closed against M2 candidate `cf6eaba` MaterialPropertyBlocks resolve above the live base material with cached per-owner/slot Standard and Surface handles. Invalid blocks preserve the base with diagnostics; reviewed promotion creates one direct-base Material Instance, assigns the exact scene slot, and clears the block only after transactional success. Runtime and native promotion evidence pass. Consolidated code, deterministic, native, and package evidence: [M2 evaluation record](https://git.spacetrainclubhouse.com/Falling-Metal-Interactive/Blacksite/src/commit/cf6eaba53473d2825d0109f5a18f44794af5bd48/docs/editor/evaluations/content-workspace-m2/README.md). Candidate gates passed in full and the commit is published on `codex/m2-content-workspace`.
Rbanh closed this issue 2026-07-17 23:46:44 -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#53
No description provided.