Compare commits

..

16 Commits

Author SHA1 Message Date
sindoring 0327e4862d test(M00): complete animation and sky evidence
Work-Package: M00-QAR-ANIMATION-SKY-EVIDENCE-001
Agent: sindo-main-codex
Tests: 14-pair visual audit; manifest/self-test; coordination/documentation gates
Fidelity: sky evidence paired approximately; Gryphon animation observed but placement-unpaired
2026-07-13 10:01:19 +04:00
sindoring 239cb2432e Merge pull request 'test(M00): record final paired evidence' (#13) from work/sindo-main-codex/m00-final-paired-evidence into master
Reviewed-on: #13
2026-07-12 02:28:00 +03:00
sindoring b5ddc86c92 test(M00): record final paired evidence 2026-07-12 03:21:39 +04:00
sindoring 3d90c6d79a Merge pull request 'test(M00): add landmark-region visual diff' (#12) from work/sindo-main-codex/m00-landmark-region-diff into master
Reviewed-on: #12
2026-07-12 02:07:30 +03:00
sindoring a10206b797 test(M00): add landmark-region visual diff 2026-07-12 03:03:59 +04:00
sindoring 3172f41ee5 Merge pull request 'test(M00): refine Goldshire camera framing' (#11) from work/sindo-main-codex/m00-camera-framing-refinement into master
Reviewed-on: #11
2026-07-12 01:51:08 +03:00
sindoring 5a957d2ebb test(M00): refine Goldshire camera framing 2026-07-12 02:49:19 +04:00
sindoring 5092995d0c Merge pull request 'test(M00): require WMO-ready pose captures' (#10) from work/sindo-main-codex/m00-wmo-readiness into master
Reviewed-on: #10
2026-07-12 01:36:02 +03:00
sindoring 4908eb2e31 test(M00): require WMO-ready pose captures 2026-07-12 02:16:09 +04:00
sindoring eca76c5ed1 Merge pull request 'test(M00): record Goldshire pose evidence' (#9) from work/sindo-main-codex/m00-camera-pose-evidence into master
Reviewed-on: #9
2026-07-12 01:00:40 +03:00
sindoring 03891edeb2 test(M00): record Goldshire pose evidence 2026-07-12 01:59:42 +04:00
sindoring 657a1d888a Merge pull request 'test(M00): add camera pose sweep' (#8) from work/sindo-main-codex/m00-camera-pose-sweep into master
Reviewed-on: #8
2026-07-12 00:47:17 +03:00
sindoring b48195d08d test(M00): add camera pose sweep 2026-07-12 01:46:02 +04:00
sindoring 8d4641a43b Merge pull request 'fix(renderer): drain threaded loads on shutdown' (#7) from work/sindo-main-codex/m00-capture-shutdown into master
Reviewed-on: #7
2026-07-12 00:39:21 +03:00
sindoring ad9ba7af4e fix(renderer): drain threaded loads on shutdown 2026-07-12 01:28:26 +04:00
sindoring f54850718a Merge pull request 'test(M00): add empirical checkpoint FOV sweep' (#6) from work/sindo-main-codex/m00-fov-sweep into master
Reviewed-on: #6
2026-07-11 23:57:40 +03:00
16 changed files with 1031 additions and 20 deletions
@@ -0,0 +1,78 @@
# M00-QAR-ANIMATION-SKY-EVIDENCE-001 — Animation and sky evidence
<!-- OPENWC_CLAIM:M00-QAR-ANIMATION-SKY-EVIDENCE-001:sindo-main-codex:2026-07-15 -->
## Ownership
- Target: M00
- Program: QAR
- Owner/Agent ID: sindo-main-codex
- Branch: `work/sindo-main-codex/m00-animation-sky-evidence`
- Lease expires UTC: 2026-07-15
- Integrator: milestone integrator
## Outcome
Add private build 12340 evidence for the remaining sky-transition and native animated-M2 coverage, rerun all paired comparisons, and hand the resulting audit to the milestone integrator.
## Non-goals
- Committing proprietary screenshots or extracted assets.
- Claiming renderer parity from mismatched world placement or animation phase.
- Marking M00 DONE; only the milestone integrator may change target status or Evidence.
## Paths
- Exclusive: this claim and animation/sky evidence documentation
- Shared/hotspots: `docs/M00_FINAL_PAIRED_EVIDENCE.md`, `docs/modules/world-renderer.md`
- Generated/ignored: normalized private references under `sources/OpenWCReferenceCheckpoints`; captures and reports under `user://`
## Contracts and data
- Public API/events: unchanged
- Schema/format version: unchanged
- Migration/compatibility: existing five-reference comparison remains valid
- Consumers: M00 milestone integrator
## Dependencies
- Requires: user-captured build 12340 screenshots at 19:00 and two real `GryphonRoost01` animation phases
- Blocks: final integrator decision on M00 completion
- External state: private screenshots remain outside Git
## Verification
- Commands: private-reference preparation, full baseline runner, comparator self-test, coordination and documentation gates
- Fixtures: seven private build 12340 checkpoint references plus a second animation-phase provenance frame
- Fidelity evidence: sky-transition screenshot and observed wing pose change over three seconds
- Performance budget: existing M00 capture budgets
## Documentation deliverables
- Inline public API docs: unchanged
- Module specification: paired coverage and remaining limitations
- Data-flow diagram: unchanged
- Sequence/state/dependency diagrams: unchanged
- Source map/status updates: final paired evidence audit
## Simplicity and naming
- Important names introduced: none
- Simplest considered solution: normalize private captures outside Git and reuse the existing comparator
- Rejected complexity/abstractions: adding a video comparator or committing an asset corpus
- Unavoidable complexity and justification: animation phase and synthetic placement require human evidence classification alongside pixel metrics
- Measured optimization evidence: not applicable
## Status
- State: ready-for-review
- Done: exact-size private references registered; real ADT placement verified; canonical and visual captures completed; fourteen comparisons audited
- Next: milestone integrator reviews synthetic/real placement classification and GUI RID risk
- Blocked by:
## Handoff
- Commit: this work-package commit
- Results: `compared=14`, `failed=14`, `missing=0`; mean error `0.066893..0.176955`; original-client Gryphon wing phase changed over three seconds
- Remaining risks: synthetic probe placement differs from the original-client world placement; GUI RID/resource diagnostics remain separate
- Documentation updated: `docs/M00_FINAL_PAIRED_EVIDENCE.md`, `docs/modules/world-renderer.md`
@@ -0,0 +1,78 @@
# M00-QAR-CAMERA-FRAMING-REFINEMENT-001 — Goldshire pitch/FOV refinement
<!-- OPENWC_CLAIM:M00-QAR-CAMERA-FRAMING-REFINEMENT-001:sindo-main-codex:2026-07-14 -->
## Ownership
- Target: M00
- Program: QAR
- Owner/Agent ID: sindo-main-codex
- Branch: `work/sindo-main-codex/m00-camera-framing-refinement`
- Lease expires UTC: 2026-07-14
- Integrator: milestone integrator
## Outcome
Jointly refine Goldshire checkpoint pitch and FOV against a WMO-ready build 12340 reference.
## Non-goals
- Changing runtime player camera defaults.
- Changing manifest values without an interior optimum and human approval.
- Optimizing yaw beyond the ready-scene coarse result.
## Paths
- Exclusive: joint FOV option in camera-pose sweep and framing evidence
- Shared/hotspots: camera-pose operational documentation and renderer module findings
- Generated/ignored: candidate PNGs and ranking JSON under `user://`
## Contracts and data
- Public API/events: additive `-CameraFovValues`; scalar `-CameraFov` remains compatible
- Schema/format version: ranking schema remains version 1 with existing per-candidate FOV field
- Migration/compatibility: scalar sweeps retain existing candidate paths
- Consumers: M00 fidelity workflow
## Dependencies
- Requires: WMO-ready 8-second capture contract
- Blocks: Goldshire manifest framing decision
- External state: private build 12340 reference remains outside Git
## Verification
- Commands: joint-grid plan regression, real ready-scene sweep, comparator self-test, repository gates
- Fixtures: private Goldshire Inn reference
- Fidelity evidence: joint pitch/FOV ranking and human inspection
- Performance budget: offline diagnostic
## Documentation deliverables
- Inline public API docs: PowerShell parameter
- Module specification: framing finding
- Data-flow diagram: FOV joins pose grid
- Sequence/state/dependency diagrams: unchanged
- Source map/status updates: operational guide
## Simplicity and naming
- Important names introduced: `CameraFovValues`, `effectiveCameraFovValues`
- Simplest considered solution: one additional loop around the existing grid
- Rejected complexity/abstractions: generic optimizer
- Unavoidable complexity and justification: projection and pitch jointly affect framing
- Measured optimization evidence: bounded 1x5x3 grid
## Status
- State: ready-for-review
- Done: additive joint FOV grid, compatibility-preserving paths, plan regression, ready-scene 15-candidate ranking and human inspection
- Next: add approved landmark/region scoring before any manifest camera calibration
- Blocked by:
## Handoff
- Commit: this work-package commit
- Results: numeric best FOV 62/yaw 10/pitch -25 at mean 0.078843 and ratio 0.667721 was visually rejected as grass-dominated; FOV 38/yaw 10/pitch -10 better matched building scale at mean 0.084220
- Remaining risks: full-frame metric does not preserve landmark framing; no manifest values were changed
- Documentation updated: `docs/CAMERA_POSE_SWEEP.md`, `docs/modules/world-renderer.md`
@@ -0,0 +1,78 @@
# M00-QAR-CAMERA-POSE-EVIDENCE-001 — Goldshire camera pose evidence
<!-- OPENWC_CLAIM:M00-QAR-CAMERA-POSE-EVIDENCE-001:sindo-main-codex:2026-07-14 -->
## Ownership
- Target: M00
- Program: QAR
- Owner/Agent ID: sindo-main-codex
- Branch: `work/sindo-main-codex/m00-camera-pose-evidence`
- Lease expires UTC: 2026-07-14
- Integrator: milestone integrator
## Outcome
Produce coarse-to-fine yaw/pitch evidence for the build 12340 Goldshire Inn reference and classify whether framing dominates the paired-image gap.
## Non-goals
- Changing manifest camera defaults before human approval.
- Treating minimum perceptual error as proof of exact camera parity.
- Committing proprietary reference images or generated candidates.
## Paths
- Exclusive: camera-pose evidence record
- Shared/hotspots: renderer baseline and module fidelity findings
- Generated/ignored: all sweep PNGs and JSON under `user://`
## Contracts and data
- Public API/events: none
- Schema/format version: unchanged
- Migration/compatibility: none
- Consumers: M00 fidelity review
## Dependencies
- Requires: merged camera-pose sweep and local build 12340 reference
- Blocks: classification of the Goldshire WMO paired gap
- External state: `sources/OpenWCReferenceCheckpoints/goldshire_inn_large_wmo.jpg`
## Verification
- Commands: coarse and fine real sweeps, ranking inspection, repository gates
- Fixtures: private Goldshire Inn build 12340 screenshot
- Fidelity evidence: ranked mean perceptual error and changed-pixel ratio
- Performance budget: offline diagnostic only
## Documentation deliverables
- Inline public API docs: unchanged
- Module specification: fidelity finding and remaining risk
- Data-flow diagram: unchanged
- Sequence/state/dependency diagrams: unchanged
- Source map/status updates: baseline evidence
## Simplicity and naming
- Important names introduced: none
- Simplest considered solution: use the merged bounded grid runner
- Rejected complexity/abstractions: optimizer or renderer changes
- Unavoidable complexity and justification: real images must be rendered for each candidate
- Measured optimization evidence: single pass per candidate
## Status
- State: ready-for-review
- Done: private reference dimensions verified; coarse, extended and limit sweeps completed; representative candidates inspected; runner failure handling hardened
- Next: investigate Goldshire Inn spatial/placement composition separately; do not change manifest yaw/pitch from this metric
- Blocked by:
## Handoff
- Commit: this work-package commit
- Results: zero offset mean error 0.099632; coarse best (-10,-20) 0.077575; metric decreased monotonically to (0,-60) 0.063574/changed ratio 0.549556, while visual inspection showed only grass and no inn
- Remaining risks: full-frame color error cannot register a missing landmark; WMO placement/streaming at this checkpoint remains unresolved
- Documentation updated: `docs/CAMERA_POSE_SWEEP.md`, `docs/modules/world-renderer.md`
@@ -0,0 +1,78 @@
# M00-QAR-CAMERA-POSE-SWEEP-001 — Empirical camera pose sweep
<!-- OPENWC_CLAIM:M00-QAR-CAMERA-POSE-SWEEP-001:sindo-main-codex:2026-07-14 -->
## Ownership
- Target: M00
- Program: QAR
- Owner/Agent ID: sindo-main-codex
- Branch: `work/sindo-main-codex/m00-camera-pose-sweep`
- Lease expires UTC: 2026-07-14
- Integrator: milestone integrator
## Outcome
Recover reproducible checkpoint framing by sweeping bounded yaw/pitch offsets and ranking paired-image error.
## Non-goals
- Changing runtime player camera defaults.
- Claiming an exact original-client camera pose from perceptual score alone.
- Adding computer-vision registration or image warping.
## Paths
- Exclusive: camera-pose CLI and sweep orchestration
- Shared/hotspots: renderer baseline documentation
- Generated/ignored: local candidate PNGs and JSON reports
## Contracts and data
- Public API/events: additive camera yaw/pitch offset and single-pass capture options; new PowerShell sweep command
- Schema/format version: capture report schema remains version 1 with additive camera-offset fields
- Migration/compatibility: existing capture commands retain zero offsets and two passes
- Consumers: M00 paired-fidelity workflow
## Dependencies
- Requires: build 12340 reference image, capture tool, paired-image comparator
- Blocks: reproducible manual-reference framing
- External state: original screenshots remain outside Git
## Verification
- Commands: capture dry-run offset regression, comparator self-test, bounded local sweep when a display/reference is available, repository gates
- Fixtures: one named M00 checkpoint
- Fidelity evidence: ranked yaw/pitch candidates with explicit human-approval requirement
- Performance budget: offline diagnostic; single-pass mode avoids redundant warm capture
## Documentation deliverables
- Inline public API docs: capture and sweep usage
- Module specification: camera-pose data flow, verification and source map
- Data-flow diagram: updated pose-sweep flow
- Sequence/state/dependency diagrams: unchanged
- Source map/status updates: baseline workflow and findings
## Simplicity and naming
- Important names introduced: `camera_yaw_offset_degrees`, `camera_pitch_offset_degrees`, `single_pass`
- Simplest considered solution: bounded grid over existing capture/comparator tools
- Rejected complexity/abstractions: feature matching, optimizer framework, image transforms
- Unavoidable complexity and justification: original-client camera angles are not exposed by tested APIs
- Measured optimization evidence: single-pass mode halves captures per candidate
## Status
- State: ready-for-review
- Done: additive capture offsets, single-pass calibration mode, bounded grid runner, ranked JSON contract, grid-plan regression and documentation
- Next: run a coarse-to-fine real sweep with the private build 12340 reference directory, then obtain human framing approval
- Blocked by:
## Handoff
- Commit: this work-package commit
- Results: dry-run reported yaw 12.50/pitch -7.50; comparator self-test passed; a 3x2 plan produced six unique candidates; full seven-checkpoint M00 dry-run passed with default zero offsets
- Remaining risks: no private reference directory was available in this worktree, so real perceptual ranking and human approval remain external evidence
- Documentation updated: `docs/CAMERA_POSE_SWEEP.md`; renderer module verification, risk and source map
@@ -0,0 +1,78 @@
# M00-QAR-CAPTURE-SHUTDOWN-001 — Capture shutdown drain
<!-- OPENWC_CLAIM:M00-QAR-CAPTURE-SHUTDOWN-001:sindo-main-codex:2026-07-14 -->
## Ownership
- Target: M00
- Program: QAR
- Owner/Agent ID: sindo-main-codex
- Branch: `work/sindo-main-codex/m00-capture-shutdown`
- Lease expires UTC: 2026-07-14
- Integrator: milestone integrator
## Outcome
Eliminate the reproducible capture-tool ObjectDB leak by completing owned threaded resource requests and draining deferred scene deletion before process exit.
## Non-goals
- Refactoring renderer resource ownership.
- Hiding genuine RID or worker-task leaks.
- Changing capture images, metrics, or streaming behavior.
## Paths
- Exclusive: capture tool shutdown sequence
- Shared/hotspots: renderer baseline documentation
- Generated/ignored: verbose Godot logs
## Contracts and data
- Public API/events: none
- Schema/format version: unchanged
- Migration/compatibility: none
- Consumers: M00 baseline runner
## Dependencies
- Requires: reproducible verbose leak diagnostic
- Blocks: clean M00 capture shutdown evidence
- External state: none
## Verification
- Commands: identical verbose dry-run before/after, M00 dry-run, repository gates
- Fixtures: ADT-boundary filtered capture
- Fidelity evidence: no visual behavior change
- Performance budget: blocking resource completion is restricted to shutdown; two SceneTree drain frames only
## Documentation deliverables
- Inline public API docs: shutdown rationale comment
- Module specification: recovery/known-risk update
- Data-flow diagram: unchanged
- Sequence/state/dependency diagrams: shutdown sequence documented in baseline
- Source map/status updates: baseline evidence
## Simplicity and naming
- Important names introduced: none
- Simplest considered solution: await two SceneTree frames after `queue_free` and finish registered in-flight ResourceLoader requests during loader shutdown
- Rejected complexity/abstractions: resource registry or manual child traversal
- Unavoidable complexity and justification: deferred deletion requires frame drain
- Measured optimization evidence: not applicable
## Status
- State: ready-for-review
- Done: one leaked RefCounted reproduced; isolation attributed it to `StreamingWorldLoader`; active threaded tile request was confirmed as the retained object; all owned threaded resource registries now finish in-progress requests before clearing; two identical verbose ADT-boundary runs and the full M00 dry-run completed without ObjectDB leak diagnostics
- Next: integrator review and merge
- Blocked by:
## Handoff
- Commit: this work-package commit
- Results: verbose filtered capture returned one report and zero `Leaked instance`/`ObjectDB instances leaked` lines on two consecutive runs; `run_render_baseline.ps1 -DryRun` passed all gates and seven checkpoints
- Remaining risks:
- Documentation updated: `docs/modules/world-renderer.md` shutdown sequence, ownership contract, recovery table and known-risk status
@@ -0,0 +1,78 @@
# M00-QAR-FINAL-PAIRED-EVIDENCE-001 — Final paired evidence audit
<!-- OPENWC_CLAIM:M00-QAR-FINAL-PAIRED-EVIDENCE-001:sindo-main-codex:2026-07-14 -->
## Ownership
- Target: M00
- Program: QAR
- Owner/Agent ID: sindo-main-codex
- Branch: `work/sindo-main-codex/m00-final-paired-evidence`
- Lease expires UTC: 2026-07-14
- Integrator: milestone integrator
## Outcome
Produce one final WMO-ready paired report for all available build 12340 references and reconcile the remaining M00 acceptance gaps.
## Non-goals
- Achieving renderer parity inside M00.
- Calibrating unknown manual camera parameters.
- Marking the target DONE; only the milestone integrator may do so.
## Paths
- Exclusive: paired-run exit handling and final evidence record
- Shared/hotspots: renderer baseline/module findings
- Generated/ignored: final captures and reports under `user://`
## Contracts and data
- Public API/events: visual comparison exit 0/1 both count as completed report generation
- Schema/format version: unchanged
- Migration/compatibility: comparator infrastructure errors remain fatal
- Consumers: M00 integrator
## Dependencies
- Requires: merged region diagnostic and five private reference images
- Blocks: integrator decision on M00 completion
- External state: private images remain outside Git
## Verification
- Commands: complete paired baseline run, report audit, repository gates
- Fixtures: five build 12340 references
- Fidelity evidence: cold/warm comparison metrics and human gap classification
- Performance budget: existing M00 capture budgets
## Documentation deliverables
- Inline public API docs: PowerShell comparison step semantics
- Module specification: final evidence status
- Data-flow diagram: unchanged
- Sequence/state/dependency diagrams: unchanged
- Source map/status updates: baseline acceptance summary
## Simplicity and naming
- Important names introduced: `Invoke-GodotComparisonStep`
- Simplest considered solution: allow only comparator exit codes 0 and 1
- Rejected complexity/abstractions: suppressing all process failures
- Unavoidable complexity and justification: threshold exceedance is evidence, not infrastructure failure
- Measured optimization evidence: not applicable
## Status
- State: ready-for-review
- Done: paired-run exit contract fixed; full baseline and visual capture completed; ten pairs audited; final acceptance document written
- Next: integrator decides animated/sky reference policy and GUI RID-risk disposition
- Blocked by:
## Handoff
- Commit: this work-package commit
- Results: compared=10, failed=10, missing=0; mean error 0.066892..0.176952; cold/warm gaps stable; full workflow returned success with threshold evidence preserved
- Remaining risks: no build 12340 animated-M2 or sky-transition reference; GUI renderer RID/resources still reported at exit
- Documentation updated: `docs/M00_FINAL_PAIRED_EVIDENCE.md`, `docs/modules/world-renderer.md`
@@ -0,0 +1,78 @@
# M00-QAR-LANDMARK-REGION-DIFF-001 — Landmark-region visual diff
<!-- OPENWC_CLAIM:M00-QAR-LANDMARK-REGION-DIFF-001:sindo-main-codex:2026-07-14 -->
## Ownership
- Target: M00
- Program: QAR
- Owner/Agent ID: sindo-main-codex
- Branch: `work/sindo-main-codex/m00-landmark-region-diff`
- Lease expires UTC: 2026-07-14
- Integrator: milestone integrator
## Outcome
Rank camera candidates inside an approved common screen region so unrelated grass/sky coverage cannot dominate landmark framing.
## Non-goals
- Automatic feature detection or image warping.
- Different crops for reference and candidate.
- Changing manifest camera values without human approval.
## Paths
- Exclusive: comparator common-region option and sweep pass-through
- Shared/hotspots: camera-pose documentation and renderer fidelity findings
- Generated/ignored: local ROI sweep images/reports
## Contracts and data
- Public API/events: additive comparator `--region x,y,width,height` and sweep `-ComparisonRegion`
- Schema/format version: report/ranking schema remains version 1 with additive region metadata
- Migration/compatibility: omitted region preserves full-frame behavior
- Consumers: M00 paired camera calibration
## Dependencies
- Requires: ready-scene joint pitch/FOV sweep
- Blocks: landmark-weighted Goldshire framing decision
- External state: private build 12340 reference
## Verification
- Commands: comparator synthetic ROI regression, invalid-bound regression, sweep plan, bounded real ROI sweep, repository gates
- Fixtures: synthetic 2x2 images and private Goldshire reference
- Fidelity evidence: facade-region ranking plus human inspection
- Performance budget: region comparison visits only selected pixels
## Documentation deliverables
- Inline public API docs: comparator usage and PowerShell parameter
- Module specification: ROI finding
- Data-flow diagram: approved region into comparator
- Sequence/state/dependency diagrams: unchanged
- Source map/status updates: camera-pose guide
## Simplicity and naming
- Important names introduced: `ComparisonRegion`, `comparison_region`
- Simplest considered solution: one common integer rectangle
- Rejected complexity/abstractions: masks, feature detectors, separate movable crops
- Unavoidable complexity and justification: full-frame color error is biased by large terrain regions
- Measured optimization evidence: bounded pixel loop
## Status
- State: ready-for-review
- Done: common ROI parser/validation/reporting, synthetic inclusion/exclusion regression, sweep pass-through, 15-candidate Goldshire rescoring and human inspection
- Next: define explicit approved landmark coordinates or mask; do not calibrate manifest from the common rectangle alone
- Blocked by:
## Handoff
- Commit: this work-package commit
- Results: ROI [300,100,1400,650] ranked FOV 38/yaw 10/pitch -15 first at mean 0.081777 and ratio 0.697185; visually the facade remains oversized and cropped
- Remaining risks: rectangle includes non-semantic road/terrain pixels and cannot prove landmark alignment
- Documentation updated: `docs/CAMERA_POSE_SWEEP.md`, `docs/modules/world-renderer.md`
@@ -0,0 +1,78 @@
# M00-QAR-WMO-READINESS-001 — Goldshire WMO readiness
<!-- OPENWC_CLAIM:M00-QAR-WMO-READINESS-001:sindo-main-codex:2026-07-14 -->
## Ownership
- Target: M00
- Program: QAR
- Owner/Agent ID: sindo-main-codex
- Branch: `work/sindo-main-codex/m00-wmo-readiness`
- Lease expires UTC: 2026-07-14
- Integrator: milestone integrator
## Outcome
Prevent pose calibration against an under-loaded WMO scene and replace invalid Goldshire evidence with a baseline-ready comparison.
## Non-goals
- Changing runtime streaming budgets.
- Claiming all WMO queues must globally drain before a checkpoint.
- Changing manifest camera pose without valid paired evidence.
## Paths
- Exclusive: pose-sweep readiness default and Goldshire timing evidence
- Shared/hotspots: renderer baseline/module fidelity findings
- Generated/ignored: timing and sweep images under `user://`
## Contracts and data
- Public API/events: pose sweep default wait becomes 8 seconds, matching the M00 manifest
- Schema/format version: unchanged
- Migration/compatibility: explicit `-WaitSeconds` remains supported
- Consumers: M00 paired-fidelity workflow
## Dependencies
- Requires: Goldshire pose evidence and private build 12340 reference
- Blocks: valid Goldshire camera-pose ranking
- External state: private reference and generated captures remain outside Git
## Verification
- Commands: 2/8/15 second timing audit, ready-scene 3x3 pose sweep, baseline dry-run, repository gates
- Fixtures: private Goldshire Inn screenshot
- Fidelity evidence: visual WMO presence plus streaming snapshot and paired metrics
- Performance budget: offline diagnostic
## Documentation deliverables
- Inline public API docs: PowerShell default
- Module specification: corrected readiness/fidelity finding
- Data-flow diagram: readiness precondition
- Sequence/state/dependency diagrams: unchanged
- Source map/status updates: camera-pose operational guide
## Simplicity and naming
- Important names introduced: none
- Simplest considered solution: reuse the manifest's measured 8-second stabilization default
- Rejected complexity/abstractions: global queue barrier that would include unrelated distant work
- Unavoidable complexity and justification: WMO publication is asynchronous
- Measured optimization evidence: 2/8/15 second snapshots
## Status
- State: ready-for-review
- Done: timing audit invalidated the 2-second evidence; sweep default now matches the 8-second manifest; ready-scene 3x3 grid and human inspection completed
- Next: jointly refine negative pitch and FOV around the ready-scene Goldshire candidate
- Blocked by:
## Handoff
- Commit: this work-package commit
- Results: WMO instances 9/113/328 at 2/8/15 seconds; inn absent at 2 and visible at 8/15; ready grid improved mean error from 0.101402 at (0,0) to 0.087952 at (10,-10)
- Remaining risks: global WMO queues still contain unrelated work; best pitch is at the tested boundary and building scale indicates unresolved FOV/framing
- Documentation updated: `docs/CAMERA_POSE_SWEEP.md`, `docs/modules/world-renderer.md`
+63
View File
@@ -0,0 +1,63 @@
# Renderer Camera Pose Sweep
This offline M00 diagnostic recovers reproducible checkpoint framing when an original-client screenshot has no recorded camera yaw or pitch. It ranks a bounded grid; it does not change renderer or player-camera defaults and does not prove the exact build 12340 camera pose without human approval.
## Camera contract
`capture_render_checkpoints.gd` accepts additive `--camera-yaw-offset` and `--camera-pitch-offset` values in degrees. Yaw rotates the no-roll checkpoint basis around Godot world `Vector3.UP`; pitch then rotates around the camera-local right axis. Zero offsets preserve the manifest target exactly. `--single-pass` captures only `cold_process` and is intended for pose calibration, not performance baselines.
## Workflow
```powershell
.\tools\sweep_render_checkpoint_camera_pose.ps1 `
-ReferenceDirectory 'D:\private-fixtures\wow-3.3.5a-checkpoints' `
-Checkpoint elwynn_adt_boundary `
-YawOffsets -15,-10,-5,0,5,10,15 `
-PitchOffsets -10,-5,0,5,10 `
-CameraFovValues 38,50,62 `
-ViewportWidth 1280 -ViewportHeight 960 `
-WaitSeconds 8
```
Each candidate receives its own output directory and comparison report. `-CameraFovValues` adds FOV as another bounded grid dimension; omit it to retain the scalar `-CameraFov` workflow and legacy candidate paths. The viewport must exactly match the reference image dimensions; the runner fails on `size_mismatch` instead of inventing a score. The default 8-second wait matches the M00 manifest and is a readiness precondition: lowering it requires evidence that the checkpoint's WMO/M2 content has already appeared. `ranking.json` sorts candidates by mean perceptual error and then changed-pixel ratio. Use `-PlanOnly` to validate the Cartesian grid and output paths without rendering. Run a coarse grid first, then a finer grid around the best candidate.
```mermaid
flowchart LR
Y[Yaw offsets in degrees] --> G[Bounded Cartesian grid]
P[Pitch offsets in degrees] --> G
G --> C[Single-pass checkpoint captures]
R[Original-client reference] --> D[Perceptual comparator]
C --> D
D --> J[ranking.json]
J --> H[Human framing approval]
```
## Interpretation and recovery
The smallest error is a candidate, not automatic fidelity approval. Geometry, materials, lighting and FOV can move the perceptual optimum away from the true original-client pose. Inspect the best images manually and retain the original reference outside Git. A missing matching reference or candidate is a hard error; correct the checkpoint filter or filenames and rerun. Generated PNG and JSON outputs are disposable local evidence.
## Verification
The headless capture dry-run must report requested yaw and pitch offsets. Comparator `--self-test` covers paired metrics. Sweep `-PlanOnly` covers deterministic grid expansion and output naming without requiring a display. A real ranked sweep requires a display and a private build 12340 reference image.
## Goldshire Inn evidence — 2026-07-12
The private `2560x1440` build 12340 `goldshire_inn_large_wmo` reference was evaluated at FOV 62 degrees. A coarse 5x5 grid over yaw/pitch `[-20, -10, 0, 10, 20]` reduced mean error from `0.099632` at `(0, 0)` to `0.077575` at `(-10, -20)`. Extending pitch produced `0.070901` at `(0, -40)` and `0.063574` at `(0, -60)` with changed-pixel ratio `0.549556`.
These values are invalid camera-pose evidence because the sweep used a 2-second wait. A subsequent readiness audit showed 9 WMO instances and no inn after 2 seconds, 113 instances with the inn visible after 8 seconds, and 328 instances after 15 seconds. The apparent monotonic improvement rewarded grass while the landmark was still absent; it does not demonstrate a spatial/placement defect. The manifest pose remains unchanged pending a ready-scene rerun.
The ready-scene 3x3 rerun at FOV 62 degrees ranked `(yaw=10, pitch=-10)` first with mean error `0.087952` and changed-pixel ratio `0.665527`, compared with `0.101402`/`0.702489` at zero offsets. Human inspection confirms that the inn is present and the direction is plausible. Pitch remains on the tested boundary and the building scale differs from the reference, so these offsets are coarse evidence only; a joint pitch/FOV refinement is required before changing manifest camera values.
## Goldshire joint pitch/FOV refinement — 2026-07-12
A WMO-ready joint grid fixed yaw at 10 degrees and evaluated pitch `[-25, -20, -15, -10, -5]` across FOV `[38, 50, 62]`. Full-frame error ranked FOV 62/pitch -25 first at `0.078843` with changed-pixel ratio `0.667721`. Human inspection rejects it as a manifest calibration: the view is dominated by grass and crops the inn. FOV 38/pitch -10 is closer to the reference building scale but ranks only `0.084220`, and horizontal landmark alignment remains different.
The grid therefore has no approved joint optimum. Full-frame color error continues to trade landmark framing against large terrain regions. The manifest remains unchanged. The next registration method must score an approved inn/road/tree landmark region or explicit landmark coordinates rather than the entire image.
## Common landmark region — 2026-07-12
The comparator accepts an optional common screen rectangle through `--region x,y,width,height`; the sweep runner exposes it as `-ComparisonRegion x,y,width,height`. Coordinates are integer pixels in the shared reference/candidate image space. Both images must have identical dimensions and the rectangle must be fully inside them. Omitting the option preserves full-frame behavior.
The existing 15 WMO-ready Goldshire candidates were rescored inside `[300,100,1400,650]`, covering the reference facade/chimney and nearby trees. ROI error ranked FOV 38/yaw 10/pitch -15 first at `0.081777` with changed-pixel ratio `0.697185`. This is an interior pitch candidate and improves on the full-frame grass preference, but human inspection still rejects manifest calibration: the facade is too large, its upper part is cropped, and the rectangle retains substantial road/terrain pixels. A common rectangle is useful diagnostic weighting, not semantic landmark registration. Explicit approved landmark coordinates or a mask remain necessary.
During this run the sweep orchestration was hardened in two ways: expected comparator exit code `1` is now collected through an explicit child process, and viewport dimensions are explicit. A reference/candidate `size_mismatch` now fails before ranking instead of producing an empty metric.
+74
View File
@@ -0,0 +1,74 @@
# M00 Final Paired Evidence — 2026-07-13
## Scope and result
The final local M00 audit used Godot 4.6.1, the existing cache state, the manifest-standard 8-second readiness wait, and `2560x1440` visual candidates. Seven private WoW 3.3.5a build 12340 references produced fourteen cold/warm comparisons with no missing pair. Private images and generated reports remain outside Git.
Every pair exceeded the strict regression tolerance. Comparator exit code `1` means a valid report with measured visual gaps; only codes outside `0/1` are infrastructure failures. This evidence establishes coverage and current differences, not renderer parity.
```powershell
.\tools\run_render_baseline.ps1 `
-Output user://render_baseline_m00_complete_2026-07-13 `
-CacheState existing `
-WaitSeconds 8 `
-MeasureSeconds 0.5 `
-ReferenceCheckpointDirectory .\sources\OpenWCReferenceCheckpoints `
-VisualComparisonReport user://render_baseline_m00_complete_2026-07-13/visual_comparison.json `
-VisualComparisonWidth 2560 `
-VisualComparisonHeight 1440
```
The initial shell timeout detached the canonical capture process after it started. The process completed all fourteen canonical captures and wrote `report.json`; the documented visual-capture and comparator stages were then invoked separately with the same arguments. The final output directory contains both complete reports.
## Paired metrics
| Checkpoint | Pass | Mean perceptual error | Changed-pixel ratio | Classification |
|---|---|---:|---:|---|
| `elwynn_adt_boundary` | cold | 0.087258 | 0.634580 | Composition plus terrain/vegetation/material gaps |
| `elwynn_adt_boundary` | warm | 0.087255 | 0.634598 | Stable against revisit |
| `elwynn_sky_dusk` | cold | 0.094778 | 0.575956 | Approximate paired camera; sky color, lighting and scene-composition gaps |
| `elwynn_sky_dusk` | warm | 0.094757 | 0.575898 | Stable against revisit |
| `elwynn_terrain_overview` | cold | 0.174137 | 0.851791 | Largest composition/framing gap |
| `elwynn_terrain_overview` | warm | 0.176955 | 0.861271 | Stable gap, not a cold-load artifact |
| `elwynn_waterfall_liquid` | cold | 0.088629 | 0.706522 | Framing, terrain, liquid and lighting gaps |
| `elwynn_waterfall_liquid` | warm | 0.087398 | 0.693690 | Stable against revisit |
| `goldshire_dense_m2` | cold | 0.066893 | 0.575257 | Smallest available paired gap; vegetation/material differences remain |
| `goldshire_dense_m2` | warm | 0.066927 | 0.575592 | Stable against revisit |
| `goldshire_inn_large_wmo` | cold | 0.101224 | 0.701835 | WMO is ready; manual framing and presentation gaps remain |
| `goldshire_inn_large_wmo` | warm | 0.101206 | 0.701855 | Stable against revisit |
| `gryphon_roost_native_animation` | cold | 0.119467 | 0.882073 | Same build-12340 asset, different real/synthetic placement and uncontrolled animation phase |
| `gryphon_roost_native_animation` | warm | 0.119471 | 0.882076 | Full-frame metric is diagnostic only; animation observation is human evidence |
Cold and warm values are close for all seven references. The measured gaps are therefore not explained by first-visit cache readiness. Goldshire timing evidence separately demonstrated that the 8-second wait is necessary for WMO publication.
## Animation and sky provenance
The private source corpus preserves exact screenshot bytes; no resize, crop or generated content was used:
| Evidence | SHA-256 | Interpretation |
|---|---|---|
| `elwynn_sky_dusk.jpg` | `1fb06836cacae714c76eaf9b8bf7c292fd5e2f2df33eef821bfe4c4a6bd97072` | Build 12340, Elwynn camera position, server time approximately 19:00, UI hidden |
| `gryphon_roost_native_animation.jpg` | `d3488c741cb8dfe7212198e48332842631a951862a4388b67045338f37357447` | Build 12340 real-world `GryphonRoost01` placement, first visible wing phase |
| diagnostic animation phase B | `1025572c7ab9fa0d2e500ff026be46eb9c1e6e5447116dbdc3675dd5f44574ab` | Same camera three seconds later; visibly raised wing phase |
| diagnostic placement context | `b12c0b713a7d75123ed30f5a316b33537331442cd56615aea69214c7cc4e7a42` | Two real Lakeshire placements and surrounding build-12340 scene |
An ADT scan found no `GryphonRoost01` placement in Goldshire. The M00 checkpoint deliberately injects the model there as a synthetic probe. The original-client observation therefore uses two real Lakeshire placements. The three-second pose change establishes `Observed` native animation behavior, but the full-frame comparison cannot establish spatial or animation-phase parity.
## Fidelity interpretation
M00 now has private build 12340 evidence for every required coverage category: terrain, ADT boundary, dense M2, large WMO, liquid, animated M2 and sky transition. The sky reference is approximately paired by map position/time and manually approved composition. Animated-M2 evidence is asset-paired but placement-unpaired because the OpenWC probe is synthetic.
The reports demonstrate current differences and do not claim `1:1`. Camera calibration experiments also show that unknown manual yaw/pitch/FOV cannot be recovered reliably from full-frame color error alone. Region scoring reduces terrain bias but still requires semantic landmark approval.
## Operational risks
The full GUI visual capture completed and wrote its report, but Godot still emitted renderer RID/resource leak diagnostics at exit, including leaked material, shader, texture, instance and rendering-device RIDs. The earlier anonymous headless `RefCounted` leak is fixed; these GUI renderer allocations are a distinct known risk. They do not invalidate the written images or metrics, but must remain recorded rather than hidden.
## Integrator decision checklist
- Seven required reference checkpoints: cold/warm report complete, `compared=14`, `missing=0`.
- Animated M2: build-12340 native motion observed in two phases; synthetic/real placement mismatch explicitly classified.
- Sky transition: build-12340 19:00 evidence present with approximate paired camera and human-approved composition.
- Renderer visual differences: registered as gaps, not parity claims.
- GUI renderer RID/resource diagnostics: accepted as a tracked risk or assigned a follow-up blocker.
- Target status, target Evidence and `OPENWC_TARGET_DONE` marker: integrator-only actions.
+17 -5
View File
@@ -141,6 +141,9 @@ sequenceDiagram
Stream->>Budget: enqueue finalize operations
Budget->>Render: attach bounded terrain/M2/WMO/liquid work
Stream->>Render: evict outside retention range
Stream->>Worker: shutdown: wait for WorkerThreadPool tasks
Stream->>Stream: shutdown: finish registered ResourceLoader requests
Stream->>Render: clear queues, nodes, caches and RIDs
```
## Ownership, threading and resources
@@ -149,7 +152,7 @@ sequenceDiagram
- Worker tasks не должны менять SceneTree и shared Resource concurrently.
- Parsed/grouped results передаются обратно через guarded result queues.
- Mesh/material/node/RID finalization выполняется main thread и ограничивается exported budgets.
- Shutdown/map switch обязан отменить/дождаться jobs и освободить RIDs; M00 всё ещё фиксирует leaked-resource risk.
- Shutdown/map switch обязан дождаться WorkerThreadPool jobs и зарегистрированных threaded ResourceLoader requests до очистки очередей, nodes, caches и RIDs.
- Cache resources считаются immutable после публикации.
## Errors, cancellation and recovery
@@ -162,7 +165,7 @@ sequenceDiagram
| Main-thread hitch | Named section timing | Frame spike, work remains queued | `HITCH` log | Lower budget/fix finalize path |
| D3D12 descriptor exhaustion | Rendering backend error | Render failure/fallback backend | Godot error + baseline report | Dedup resources/fix settings |
| Teleport/map change | Focus/session transition | Old jobs become stale | Target/session generation | Cancel/drop stale results |
| Shutdown leak | Godot leak/RID diagnostics | Resource retained | Shutdown report | Ownership cleanup before DONE |
| Shutdown leak | Godot leak/RID diagnostics | Resource retained | Verbose shutdown report | Drain owned worker and resource requests before clearing registries |
## Configuration and capabilities
@@ -192,9 +195,9 @@ Exact exported settings and cache versions remain documented in [`../../RENDER.m
## Verification
- Unit/contract tests: material mapping, unique-ID dedupe, placement probes, baseline manifest, five-point coordinate calibration, synthetic perceptual checkpoint diff.
- Unit/contract tests: material mapping, unique-ID dedupe, placement probes, baseline manifest, five-point coordinate calibration, synthetic perceptual checkpoint diff, camera-pose grid plan.
- Integration/E2E: Eastern Kingdoms/Kalimdor streaming scenes and seven cold/warm checkpoints.
- Fidelity evidence: пять локальных build 12340 reference JPG откалибровали terrain/ADT/M2/WMO/liquid viewpoints; automated paired-image metrics exist, но synthetic animation/dusk и полный human approval ещё не закрыты.
- Fidelity evidence: семь локальных build 12340 reference JPG покрывают terrain/ADT/M2/WMO/liquid/sky и реальный `GryphonRoost01`; automated cold/warm metrics имеют `compared=14`, `missing=0`. Sky использует приблизительно paired camera, а animated-M2 остаётся asset-paired/placement-unpaired из-за synthetic probe.
- Performance budgets: M00 report records cold/warm p95 and max hitch; no final acceptance threshold yet.
- Manual diagnostics: [`../RENDER_BASELINE.md`](../RENDER_BASELINE.md) and [`../../RENDER.md`](../../RENDER.md).
@@ -226,7 +229,13 @@ Exact exported settings and cache versions remain documented in [`../../RENDER.m
- Terrain-height probe исключил under-terrain состояние для всех пяти точек; waterfall exact-XZ miss классифицирован как TriangleMesh seam/edge и подтверждён nearby sample в 2 units.
- Camera-occluder probe не нашёл camera containment в пяти точках; paired mismatch локализован прежде всего в manual look direction/target/FOV calibration, с явным ограничением по RID-only geometry.
- Empirical FOV sweep выявил, что checkpoint camera должна явно вызывать `make_current()`; после исправления projection ranking остаётся inconclusive из-за неизвестного manual yaw/pitch/framing reference.
- D3D12 descriptor and shutdown RID/resource issues remain.
- Camera-pose sweep can now rank bounded yaw/pitch grids without changing manifest defaults; perceptual ranking remains diagnostic and requires human framing approval.
- The first Goldshire pose grid was invalidated by WMO readiness: the inn is absent after 2 seconds but visible after the manifest-standard 8-second wait. Pose comparisons must stabilize asynchronous checkpoint content first.
- A ready-scene Goldshire 3x3 grid improved mean error from `0.101402` at zero offsets to `0.087952` at yaw `10`/pitch `-10`; pitch/FOV refinement remains required before manifest calibration.
- Joint Goldshire pitch/FOV refinement had no human-approved optimum: full-frame error preferred grass-heavy FOV 62/pitch -25, while FOV 38/pitch -10 better matched building scale. Landmark/region scoring is required before calibration.
- Common-region scoring `[300,100,1400,650]` moved Goldshire's numeric optimum to FOV 38/yaw 10/pitch -15, but human inspection still found an oversized/cropped facade; semantic landmarks or masks remain required.
- Final paired audit compared fourteen cold/warm images for seven private build 12340 references with zero missing pairs; mean error ranges `0.066893..0.176955`. Animated-M2 native motion is observed across two original-client phases, but its real Lakeshire placement differs from the synthetic Goldshire probe. Sky-transition evidence uses the checkpoint map position/time with manually approved approximate framing.
- D3D12 descriptor issues remain; the capture-path anonymous `RefCounted` shutdown leak is regression-covered by a clean verbose dry-run, while other RID/resource diagnostics still require independent evidence.
- M2/WMO/material/particle/ribbon/portal parity incomplete.
- Public API is mostly exported configuration rather than stable contracts.
@@ -245,6 +254,7 @@ Exact exported settings and cache versions remain documented in [`../../RENDER.m
| `tools/run_render_baseline.ps1` | Unified M00 baseline runner |
| `src/tools/compare_render_checkpoints.gd` | Offline JPG/PNG paired-image perceptual metrics and JSON pass/fail report |
| `src/tools/capture_render_checkpoints.gd` | Deterministic no-roll checkpoint camera, performance and visual capture |
| `tools/sweep_render_checkpoint_camera_pose.ps1` | Offline yaw/pitch capture grid and paired-error ranking |
| `src/tools/verify_render_coordinate_calibration.gd` | Build 12340 camera-coordinate golden point round-trip diagnostic |
| `src/tools/probe_render_terrain_height.gd` | Offline active-mesh terrain height and camera-clearance report |
| `src/tools/probe_render_camera_occluders.gd` | Scene-tree placement containment and camera-to-target AABB intersection report |
@@ -253,5 +263,7 @@ Exact exported settings and cache versions remain documented in [`../../RENDER.m
- [`../../RENDER.md`](../../RENDER.md)
- [`../RENDER_BASELINE.md`](../RENDER_BASELINE.md)
- [`../CAMERA_POSE_SWEEP.md`](../CAMERA_POSE_SWEEP.md)
- [`../M00_FINAL_PAIRED_EVIDENCE.md`](../M00_FINAL_PAIRED_EVIDENCE.md)
- [`../../targets/roadmap/02-rendering-and-graphics.md`](../../targets/roadmap/02-rendering-and-graphics.md)
- [`../GODOT_BEST_PRACTICES.md`](../GODOT_BEST_PRACTICES.md)
@@ -2073,7 +2073,7 @@ func _wait_for_tile_tasks() -> void:
var path: String = String(pending.get("path", ""))
if not path.is_empty():
var status := ResourceLoader.load_threaded_get_status(path)
if status == ResourceLoader.THREAD_LOAD_LOADED:
if status == ResourceLoader.THREAD_LOAD_IN_PROGRESS or status == ResourceLoader.THREAD_LOAD_LOADED:
ResourceLoader.load_threaded_get(path)
_tile_loading_tasks.clear()
@@ -2094,7 +2094,7 @@ func _wait_for_tile_tasks() -> void:
if path.is_empty():
continue
var status := ResourceLoader.load_threaded_get_status(path)
if status == ResourceLoader.THREAD_LOAD_LOADED:
if status == ResourceLoader.THREAD_LOAD_IN_PROGRESS or status == ResourceLoader.THREAD_LOAD_LOADED:
ResourceLoader.load_threaded_get(path)
_m2_mesh_load_requests.clear()
_m2_mesh_finalize_queue.clear()
@@ -2105,7 +2105,7 @@ func _wait_for_tile_tasks() -> void:
if path.is_empty():
continue
var status := ResourceLoader.load_threaded_get_status(path)
if status == ResourceLoader.THREAD_LOAD_LOADED:
if status == ResourceLoader.THREAD_LOAD_IN_PROGRESS or status == ResourceLoader.THREAD_LOAD_LOADED:
ResourceLoader.load_threaded_get(path)
_m2_animation_load_requests.clear()
_m2_animation_finalize_queue.clear()
@@ -2115,7 +2115,7 @@ func _wait_for_tile_tasks() -> void:
if path.is_empty():
continue
var status := ResourceLoader.load_threaded_get_status(path)
if status == ResourceLoader.THREAD_LOAD_LOADED:
if status == ResourceLoader.THREAD_LOAD_IN_PROGRESS or status == ResourceLoader.THREAD_LOAD_LOADED:
ResourceLoader.load_threaded_get(path)
_wmo_scene_load_requests.clear()
@@ -2124,7 +2124,7 @@ func _wait_for_tile_tasks() -> void:
if path.is_empty():
continue
var status := ResourceLoader.load_threaded_get_status(path)
if status == ResourceLoader.THREAD_LOAD_LOADED:
if status == ResourceLoader.THREAD_LOAD_IN_PROGRESS or status == ResourceLoader.THREAD_LOAD_LOADED:
ResourceLoader.load_threaded_get(path)
_wmo_render_load_requests.clear()
_wmo_render_missing_cache.clear()
@@ -2137,7 +2137,7 @@ func _wait_for_tile_tasks() -> void:
if path.is_empty():
continue
var status := ResourceLoader.load_threaded_get_status(path)
if status == ResourceLoader.THREAD_LOAD_LOADED:
if status == ResourceLoader.THREAD_LOAD_IN_PROGRESS or status == ResourceLoader.THREAD_LOAD_LOADED:
ResourceLoader.load_threaded_get(path)
_terrain_upgrade_tasks.clear()
@@ -2148,7 +2148,7 @@ func _wait_for_tile_tasks() -> void:
if path.is_empty():
continue
var status := ResourceLoader.load_threaded_get_status(path)
if status == ResourceLoader.THREAD_LOAD_LOADED:
if status == ResourceLoader.THREAD_LOAD_IN_PROGRESS or status == ResourceLoader.THREAD_LOAD_LOADED:
ResourceLoader.load_threaded_get(path)
_terrain_control_splat_cache_tasks.clear()
@@ -2162,7 +2162,7 @@ func _wait_for_tile_tasks() -> void:
if path.is_empty():
continue
var status := ResourceLoader.load_threaded_get_status(path)
if status == ResourceLoader.THREAD_LOAD_LOADED:
if status == ResourceLoader.THREAD_LOAD_IN_PROGRESS or status == ResourceLoader.THREAD_LOAD_LOADED:
ResourceLoader.load_threaded_get(path)
_terrain_splat_cache_tasks.clear()
_terrain_splat_result_mutex.lock()
+21 -1
View File
@@ -2,6 +2,7 @@ extends SceneTree
const DEFAULT_MANIFEST_PATH := "res://src/tools/render_baseline_manifest.json"
const M2_NATIVE_ANIMATED_BUILDER := preload("res://addons/mpq_extractor/loaders/m2_native_animated_builder.gd")
const SHUTDOWN_DRAIN_FRAMES := 2
func _initialize() -> void:
@@ -23,6 +24,9 @@ func _capture_async() -> void:
var revision := _arg(args, "--revision", "worktree")
var cache_state := _arg(args, "--cache-state", "existing")
var camera_fov_override := float(_arg(args, "--camera-fov", str(manifest.get("camera_fov", 62.0))))
var camera_yaw_offset_degrees := float(_arg(args, "--camera-yaw-offset", "0.0"))
var camera_pitch_offset_degrees := float(_arg(args, "--camera-pitch-offset", "0.0"))
var single_pass := args.has("--single-pass")
var headless := DisplayServer.get_name().to_lower() == "headless"
var dry_run := args.has("--dry-run") or headless
var viewport: Array = manifest.get("viewport", [1280, 900])
@@ -85,6 +89,8 @@ func _capture_async() -> void:
"dry_run": dry_run,
"cache_state": cache_state,
"camera_fov": camera_fov_override,
"camera_yaw_offset_degrees": camera_yaw_offset_degrees,
"camera_pitch_offset_degrees": camera_pitch_offset_degrees,
"environment": _environment_metadata(),
"comparison_budgets": manifest.get("comparison_budgets", {}),
"cache_contract": manifest.get("cache_contract", {}),
@@ -93,6 +99,8 @@ func _capture_async() -> void:
}
var captured := 0
var passes := ["cold_process", "warm_revisit"]
if single_pass:
passes = ["cold_process"]
if dry_run:
passes = ["dry_run"]
@@ -113,6 +121,7 @@ func _capture_async() -> void:
camera.global_position = _vector3(checkpoint.get("camera", [0.0, 0.0, 0.0]))
_orient_camera_without_roll(camera, _vector3(checkpoint.get("target", [0.0, 0.0, 0.0])))
_apply_camera_pose_offsets(camera, camera_yaw_offset_degrees, camera_pitch_offset_degrees)
camera.make_current()
if player != null:
player.global_position = _vector3(checkpoint.get("player", checkpoint.get("target", [0.0, 0.0, 0.0])))
@@ -121,11 +130,13 @@ func _capture_async() -> void:
world.call("_refresh_streaming_targets_at", camera.global_position, true)
if dry_run:
print("RENDER_CHECKPOINT dry_run name=%s coverage=%s camera=%s target=%s time=%.2f" % [
print("RENDER_CHECKPOINT dry_run name=%s coverage=%s camera=%s target=%s yaw_offset=%.2f pitch_offset=%.2f time=%.2f" % [
checkpoint_name,
str(checkpoint.get("coverage", [])),
camera.global_position,
_vector3(checkpoint.get("target", [0.0, 0.0, 0.0])),
camera_yaw_offset_degrees,
camera_pitch_offset_degrees,
float(checkpoint.get("time_hours", 13.0)),
])
(report["results"] as Array).append(_result_record(checkpoint, pass_name, 0.0, {}, ""))
@@ -167,6 +178,10 @@ func _capture_async() -> void:
print("RENDER_BASELINE report=%s results=%d" % [report_path, captured])
world.queue_free()
# SceneTree deletion is deferred. Allow the world and its queued children
# to run their shutdown paths before engine teardown.
for unused_frame in SHUTDOWN_DRAIN_FRAMES:
await process_frame
if captured <= 0:
push_error("No checkpoints selected. --only filter was: %s" % only)
quit(1)
@@ -210,6 +225,11 @@ func _orient_camera_without_roll(camera: Camera3D, target_position: Vector3) ->
camera.global_basis = Basis(right, corrected_up, -forward)
func _apply_camera_pose_offsets(camera: Camera3D, yaw_offset_degrees: float, pitch_offset_degrees: float) -> void:
camera.global_rotate(Vector3.UP, deg_to_rad(yaw_offset_degrees))
camera.rotate_object_local(Vector3.RIGHT, deg_to_rad(pitch_offset_degrees))
func _result_record(checkpoint: Dictionary, pass_name: String, load_time_ms: float, metrics: Dictionary, sha256: String) -> Dictionary:
return {
"name": checkpoint.get("name", "checkpoint"),
+63 -5
View File
@@ -3,6 +3,7 @@ extends SceneTree
## Compares original-client JPG/PNG references with OpenWC checkpoint PNGs.
## Usage: godot --headless --path . --script res://src/tools/compare_render_checkpoints.gd --
## --reference <directory> --candidate <directory> [--output <report.json>]
## [--region x,y,width,height]
## [--pixel-threshold 0.04] [--mean-threshold 0.015] [--changed-ratio-threshold 0.01]
## Use --self-test for a synthetic regression check that writes only under user://.
@@ -56,13 +57,18 @@ func _parse_arguments(raw_arguments: PackedStringArray) -> Dictionary:
parsed.self_test = true
index += 1
continue
if argument not in ["--reference", "--candidate", "--output", "--only", "--pixel-threshold", "--mean-threshold", "--changed-ratio-threshold"]:
if argument not in ["--reference", "--candidate", "--output", "--only", "--region", "--pixel-threshold", "--mean-threshold", "--changed-ratio-threshold"]:
return {"error": "unknown argument: %s" % argument}
if index + 1 >= raw_arguments.size():
return {"error": "missing value for %s" % argument}
var key := argument.trim_prefix("--").replace("-", "_")
var value := raw_arguments[index + 1]
if key.ends_with("threshold"):
if key == "region":
var region_parse_result := _parse_comparison_region(value)
if region_parse_result.has("error"):
return region_parse_result
parsed[key] = region_parse_result.region
elif key.ends_with("threshold"):
if not value.is_valid_float():
return {"error": "%s requires a number" % argument}
parsed[key] = float(value)
@@ -72,6 +78,24 @@ func _parse_arguments(raw_arguments: PackedStringArray) -> Dictionary:
return parsed
func _parse_comparison_region(value: String) -> Dictionary:
var components := value.split(",", false)
if components.size() != 4:
return {"error": "--region requires x,y,width,height"}
for component in components:
if not component.strip_edges().is_valid_int():
return {"error": "--region components must be integers"}
var region := Rect2i(
int(components[0]),
int(components[1]),
int(components[2]),
int(components[3])
)
if region.position.x < 0 or region.position.y < 0 or region.size.x <= 0 or region.size.y <= 0:
return {"error": "--region requires non-negative x/y and positive width/height"}
return {"region": region}
func _compare_directories(reference_directory: String, candidate_directory: String, options: Dictionary) -> Dictionary:
reference_directory = ProjectSettings.globalize_path(reference_directory)
candidate_directory = ProjectSettings.globalize_path(candidate_directory)
@@ -108,6 +132,7 @@ func _compare_directories(reference_directory: String, candidate_directory: Stri
"pixel_threshold": options.pixel_threshold,
"mean_threshold": options.mean_threshold,
"changed_ratio_threshold": options.changed_ratio_threshold,
"comparison_region": _region_array(options.get("region", Rect2i())),
"compared_count": results.size() - missing_count,
"failed_count": failed_count,
"missing_count": missing_count,
@@ -127,12 +152,22 @@ func _compare_images(reference_path: String, candidate_path: String, options: Di
"reference_size": [reference_image.get_width(), reference_image.get_height()],
"candidate_size": [candidate_image.get_width(), candidate_image.get_height()],
}
var comparison_region: Rect2i = options.get("region", Rect2i(Vector2i.ZERO, reference_image.get_size()))
if comparison_region == Rect2i():
comparison_region = Rect2i(Vector2i.ZERO, reference_image.get_size())
var image_region := Rect2i(Vector2i.ZERO, reference_image.get_size())
if not image_region.encloses(comparison_region):
return {
"status": "region_out_of_bounds",
"region": _region_array(comparison_region),
"image_size": [reference_image.get_width(), reference_image.get_height()],
}
var error_sum := 0.0
var changed_pixel_count := 0
var pixel_count := reference_image.get_width() * reference_image.get_height()
for y in reference_image.get_height():
for x in reference_image.get_width():
var pixel_count := comparison_region.size.x * comparison_region.size.y
for y in range(comparison_region.position.y, comparison_region.end.y):
for x in range(comparison_region.position.x, comparison_region.end.x):
var perceptual_error := _perceptual_color_error(reference_image.get_pixel(x, y), candidate_image.get_pixel(x, y))
error_sum += perceptual_error
if perceptual_error > float(options.pixel_threshold):
@@ -144,11 +179,18 @@ func _compare_images(reference_path: String, candidate_path: String, options: Di
"status": "passed" if passed else "threshold_exceeded",
"width": reference_image.get_width(),
"height": reference_image.get_height(),
"region": _region_array(comparison_region),
"mean_perceptual_error": mean_perceptual_error,
"changed_pixel_ratio": changed_pixel_ratio,
}
func _region_array(region: Rect2i) -> Array[int]:
if region == Rect2i():
return []
return [region.position.x, region.position.y, region.size.x, region.size.y]
func _perceptual_color_error(reference_color: Color, candidate_color: Color) -> float:
var reference_linear := reference_color.srgb_to_linear()
var candidate_linear := candidate_color.srgb_to_linear()
@@ -229,6 +271,22 @@ func _run_self_test() -> int:
if not identical_report.passed or changed_report.passed:
push_error("RENDER_CHECKPOINT_DIFF SELF_TEST: expected identical pass and changed failure")
return 1
var region_options := options.duplicate()
region_options["region"] = Rect2i(1, 1, 1, 1)
var excluded_change_report := _compare_directories(reference_directory, changed_directory, region_options)
if not excluded_change_report.passed or excluded_change_report.comparison_region != [1, 1, 1, 1]:
push_error("RENDER_CHECKPOINT_DIFF SELF_TEST: region must exclude pixels outside the rectangle")
return 1
var out_of_bounds_options := options.duplicate()
out_of_bounds_options["region"] = Rect2i(1, 1, 2, 2)
var out_of_bounds_result := _compare_images(
reference_directory.path_join("synthetic.jpg"),
changed_directory.path_join("synthetic__cold_process.png"),
out_of_bounds_options
)
if out_of_bounds_result.status != "region_out_of_bounds":
push_error("RENDER_CHECKPOINT_DIFF SELF_TEST: out-of-bounds region must fail")
return 1
if reference_image.save_jpg(reference_directory.path_join("ignored.jpg"), 1.0) != OK:
return 1
var filtered_options := options.duplicate()
+10 -1
View File
@@ -40,6 +40,15 @@ function Invoke-GodotStep {
}
}
function Invoke-GodotComparisonStep {
param([string]$Name, [string[]]$Arguments)
Write-Host "[$Name] $GodotPath $($Arguments -join ' ')"
$process = Start-Process -FilePath $GodotPath -ArgumentList $Arguments -NoNewWindow -Wait -PassThru
if ($process.ExitCode -notin @(0, 1)) {
throw "$Name failed with exit code $($process.ExitCode)"
}
}
Push-Location $repoRoot
try {
Invoke-GodotStep "project-load" @("--headless", "--path", ".", "--quit")
@@ -80,7 +89,7 @@ try {
"--viewport-height", $VisualComparisonHeight.ToString()
)
Invoke-GodotStep "visual-capture" $visualCaptureArgs
Invoke-GodotStep "visual-comparison" @(
Invoke-GodotComparisonStep "visual-comparison" @(
"--headless", "--path", ".",
"--script", "res://src/tools/compare_render_checkpoints.gd",
"--",
@@ -0,0 +1,151 @@
[CmdletBinding()]
param(
[Parameter(Mandatory = $true)]
[string]$ReferenceDirectory,
[Parameter(Mandatory = $true)]
[string]$Checkpoint,
[string]$GodotPath,
[string]$Output = "user://render_camera_pose_sweep",
[double[]]$YawOffsets = @(-10.0, 0.0, 10.0),
[double[]]$PitchOffsets = @(-10.0, 0.0, 10.0),
[double]$CameraFov = 62.0,
[double[]]$CameraFovValues = @(),
[int]$ViewportWidth = 1280,
[int]$ViewportHeight = 900,
[int[]]$ComparisonRegion = @(),
[double]$WaitSeconds = 8.0,
[double]$MeasureSeconds = 0.1,
[switch]$PlanOnly
)
$ErrorActionPreference = "Stop"
$repoRoot = Split-Path -Parent $PSScriptRoot
if (-not $GodotPath) {
$godotCommand = Get-Command godot -ErrorAction SilentlyContinue
if ($godotCommand) {
$GodotPath = $godotCommand.Source
} else {
$GodotPath = Join-Path $env:TEMP "godot-4.6.1-openwc\Godot_v4.6.1-stable_win64.exe"
}
}
if (-not (Test-Path -LiteralPath $GodotPath)) {
throw "Godot executable not found: $GodotPath"
}
if (-not (Test-Path -LiteralPath $ReferenceDirectory)) {
throw "Reference directory not found: $ReferenceDirectory"
}
if ($ComparisonRegion.Count -notin @(0, 4)) {
throw "ComparisonRegion requires x,y,width,height"
}
$invariantCulture = [Globalization.CultureInfo]::InvariantCulture
$isJointFovSweep = $CameraFovValues.Count -gt 0
$effectiveCameraFovValues = if ($isJointFovSweep) { $CameraFovValues } else { @($CameraFov) }
$waitSecondsText = $WaitSeconds.ToString($invariantCulture)
$measureSecondsText = $MeasureSeconds.ToString($invariantCulture)
$absoluteOutput = if ($Output.StartsWith("user://")) {
Join-Path $env:APPDATA "Godot\app_userdata\OpenWC\$($Output.Substring(7))"
} else {
[IO.Path]::GetFullPath((Join-Path $repoRoot $Output))
}
$ranking = [Collections.Generic.List[object]]::new()
Push-Location $repoRoot
try {
foreach ($cameraFovValue in $effectiveCameraFovValues) {
foreach ($yawOffset in $YawOffsets) {
foreach ($pitchOffset in $PitchOffsets) {
$cameraFovText = $cameraFovValue.ToString("0.###", $invariantCulture)
$yawText = $yawOffset.ToString("0.###", $invariantCulture)
$pitchText = $pitchOffset.ToString("0.###", $invariantCulture)
$candidateName = "yaw_$($yawText.Replace('-', 'n').Replace('.', '_'))__pitch_$($pitchText.Replace('-', 'n').Replace('.', '_'))"
if ($isJointFovSweep) {
$candidateName = "fov_$($cameraFovText.Replace('.', '_'))__$candidateName"
}
$candidateOutput = "$Output/$candidateName"
$comparisonReport = Join-Path $absoluteOutput "$candidateName.json"
if ($PlanOnly) {
$ranking.Add([pscustomobject]@{
yaw_offset_degrees = $yawOffset
pitch_offset_degrees = $pitchOffset
camera_fov_degrees = $cameraFovValue
candidate_directory = $candidateOutput
})
continue
}
$captureArguments = @(
"--path", ".", "--script", "res://src/tools/capture_render_checkpoints.gd", "--",
"--output", $candidateOutput, "--only", $Checkpoint, "--single-pass",
"--camera-fov", $cameraFovText,
"--camera-yaw-offset", $yawText, "--camera-pitch-offset", $pitchText,
"--viewport-width", $ViewportWidth, "--viewport-height", $ViewportHeight,
"--wait", $waitSecondsText, "--measure", $measureSecondsText
)
$captureProcess = Start-Process -FilePath $GodotPath -ArgumentList $captureArguments -Wait -PassThru
if ($captureProcess.ExitCode -ne 0) {
throw "Capture failed for yaw=$yawText pitch=$pitchText"
}
$comparisonArguments = @(
"--headless", "--path", ".", "--script", "res://src/tools/compare_render_checkpoints.gd", "--",
"--reference", $ReferenceDirectory, "--candidate", $candidateOutput,
"--only", $Checkpoint, "--output", $comparisonReport
)
if ($ComparisonRegion.Count -eq 4) {
$comparisonArguments += @("--region", ($ComparisonRegion -join ","))
}
$comparisonProcess = Start-Process -FilePath $GodotPath -ArgumentList $comparisonArguments -Wait -PassThru -NoNewWindow
if ($comparisonProcess.ExitCode -notin @(0, 1)) {
throw "Comparison failed for yaw=$yawText pitch=$pitchText"
}
$comparison = Get-Content -Raw -LiteralPath $comparisonReport | ConvertFrom-Json
if ($comparison.compared_count -lt 1) {
throw "No paired image was compared for yaw=$yawText pitch=$pitchText"
}
$metricResults = @($comparison.results | Where-Object { $null -ne $_.mean_perceptual_error })
if ($metricResults.Count -ne $comparison.compared_count) {
$statuses = ($comparison.results.status | Sort-Object -Unique) -join ","
throw "Comparison produced no numeric metric for yaw=$yawText pitch=$pitchText statuses=$statuses"
}
$meanError = ($metricResults | Measure-Object -Property mean_perceptual_error -Average).Average
$changedRatio = ($metricResults | Measure-Object -Property changed_pixel_ratio -Average).Average
$ranking.Add([pscustomobject]@{
yaw_offset_degrees = $yawOffset
pitch_offset_degrees = $pitchOffset
camera_fov_degrees = $cameraFovValue
mean_perceptual_error = $meanError
changed_pixel_ratio = $changedRatio
candidate_directory = $candidateOutput
comparison_report = $comparisonReport
})
}
}
}
$rankedCandidates = if ($PlanOnly) {
@($ranking)
} else {
@($ranking | Sort-Object mean_perceptual_error, changed_pixel_ratio)
}
$rankingPath = Join-Path $absoluteOutput "ranking.json"
$rankingDocument = [ordered]@{
schema_version = 1
checkpoint = $Checkpoint
reference_directory = [IO.Path]::GetFullPath($ReferenceDirectory)
viewport = @($ViewportWidth, $ViewportHeight)
wait_seconds = $WaitSeconds
measure_seconds = $MeasureSeconds
comparison_region = @($ComparisonRegion)
candidates = $rankedCandidates
}
New-Item -ItemType Directory -Force -Path $absoluteOutput | Out-Null
$rankingDocument | ConvertTo-Json -Depth 6 | Set-Content -Encoding UTF8 -LiteralPath $rankingPath
$rankedCandidates | Format-Table camera_fov_degrees, yaw_offset_degrees, pitch_offset_degrees, mean_perceptual_error, changed_pixel_ratio
$completionKind = if ($PlanOnly) { "plan" } else { "ranking" }
Write-Output "Camera pose sweep $completionKind completed: $rankingPath"
} finally {
Pop-Location
}