test(M00): refine Goldshire camera framing

This commit is contained in:
2026-07-12 02:49:19 +04:00
parent 5092995d0c
commit 5a957d2ebb
4 changed files with 101 additions and 7 deletions
@@ -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`
+8 -1
View File
@@ -14,11 +14,12 @@ This offline M00 diagnostic recovers reproducible checkpoint framing when an ori
-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. 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.
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
@@ -47,4 +48,10 @@ These values are invalid camera-pose evidence because the sweep used a 2-second
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.
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.
+1
View File
@@ -232,6 +232,7 @@ Exact exported settings and cache versions remain documented in [`../../RENDER.m
- 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.
- 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.
+14 -6
View File
@@ -9,6 +9,7 @@ param(
[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,
[double]$WaitSeconds = 8.0,
@@ -34,7 +35,8 @@ if (-not (Test-Path -LiteralPath $ReferenceDirectory)) {
}
$invariantCulture = [Globalization.CultureInfo]::InvariantCulture
$cameraFovText = $CameraFov.ToString($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://")) {
@@ -46,11 +48,16 @@ $ranking = [Collections.Generic.List[object]]::new()
Push-Location $repoRoot
try {
foreach ($yawOffset in $YawOffsets) {
foreach ($pitchOffset in $PitchOffsets) {
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"
@@ -58,7 +65,7 @@ try {
$ranking.Add([pscustomobject]@{
yaw_offset_degrees = $yawOffset
pitch_offset_degrees = $pitchOffset
camera_fov_degrees = $CameraFov
camera_fov_degrees = $cameraFovValue
candidate_directory = $candidateOutput
})
continue
@@ -101,12 +108,13 @@ try {
$ranking.Add([pscustomobject]@{
yaw_offset_degrees = $yawOffset
pitch_offset_degrees = $pitchOffset
camera_fov_degrees = $CameraFov
camera_fov_degrees = $cameraFovValue
mean_perceptual_error = $meanError
changed_pixel_ratio = $changedRatio
candidate_directory = $candidateOutput
comparison_report = $comparisonReport
})
}
}
}
@@ -127,7 +135,7 @@ try {
}
New-Item -ItemType Directory -Force -Path $absoluteOutput | Out-Null
$rankingDocument | ConvertTo-Json -Depth 6 | Set-Content -Encoding UTF8 -LiteralPath $rankingPath
$rankedCandidates | Format-Table yaw_offset_degrees, pitch_offset_degrees, mean_perceptual_error, changed_pixel_ratio
$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 {