diff --git a/Aetheria.State.Daemon.Smoke/Program.cs b/Aetheria.State.Daemon.Smoke/Program.cs index 68d107800..da4b4d60d 100644 --- a/Aetheria.State.Daemon.Smoke/Program.cs +++ b/Aetheria.State.Daemon.Smoke/Program.cs @@ -220,6 +220,7 @@ internal sealed class AetheriaDaemonYmirSmokeChecks new AetheriaRuntimeDaemonHealthDocument(), AetheriaRuntimeDaemonCommandBoundaryDocument.Create("daemon")); var volume = Flatten(surface.Surface.Root).Single(node => node.Kind == "field.volume3d"); + var gravityField = Flatten(surface.Surface.Root).Single(node => node.Kind == "field.surface2d"); Require(volume.Props.Values.All(value => value == null || !value.Contains("_Nebula", StringComparison.Ordinal)) && volume.Props["layerBindings"].Contains("fog.surface_height=surfaceHeight", StringComparison.Ordinal) && volume.Props["layerTargetDescriptors"].Contains("fog.surface_height=2,2,false,bilinear", StringComparison.Ordinal) && @@ -228,6 +229,12 @@ internal sealed class AetheriaDaemonYmirSmokeChecks volume.Props["documentFloatBindings"] == "simulationTimeSeconds=flowScroll,0.025,0" && !volume.Props.ContainsKey("vectorParameters"), "portable Eve volume surfaces must name logical ports rather than Unity shader properties"); + Require(gravityField.Props["minX"] == "-1000" && + gravityField.Props["minY"] == "-1000" && + gravityField.Props["maxX"] == "1000" && + gravityField.Props["maxY"] == "1000" && + volume.Props["documentRef"] == gravityField.Props["renderSplatsDocumentId"], + "flight fog rasterization and native sampling must share the fossil 2000-square splat-camera viewport"); var shader = AetheriaRuntimeAssets.ProjectManifest(null).Assets.Single(asset => asset.Ref.AssetKey == "shader.environment.gravity-fog"); @@ -717,11 +724,11 @@ internal sealed class AetheriaDaemonYmirSmokeChecks world.Props["cameraDistance"] == "30" && world.Props["cameraVerticalFieldOfViewDegrees"] == "60" && world.Props["cameraTargetScreenX"] == "0.64" && - world.Props["cameraTargetScreenY"] == "0.81" && + world.Props["cameraTargetScreenY"] == "0.19" && world.Props["cameraPositionDamping"] == "0" && world.Props["cameraNearClipPlane"] == "1" && world.Props["cameraFarClipPlane"] == "4096", - "undocked world must preserve the authored ARPG Third Person Rig rather than the distinct Docked Rig"); + "undocked world must translate the authored ARPG Third Person Rig into bottom-origin Eve viewport coordinates"); Require(world.Props["skyboxAssetRef"] == "material.environment.skybox" && world.Props["reflectionAssetRef"] == "texture.environment.reflection" && world.Props["postProcessProfileAssetRef"] == "profile.environment.flight" && diff --git a/Packages/org.gamecult.aetheria.state/Runtime/AetheriaRuntimeDaemonGameSurfaceBuilder.cs b/Packages/org.gamecult.aetheria.state/Runtime/AetheriaRuntimeDaemonGameSurfaceBuilder.cs index dfff47874..da42db180 100644 --- a/Packages/org.gamecult.aetheria.state/Runtime/AetheriaRuntimeDaemonGameSurfaceBuilder.cs +++ b/Packages/org.gamecult.aetheria.state/Runtime/AetheriaRuntimeDaemonGameSurfaceBuilder.cs @@ -612,7 +612,9 @@ namespace GameCult.Aetheria.State.Verse ["cameraDistance"] = isDocked ? "70" : "30", ["cameraVerticalFieldOfViewDegrees"] = "60", ["cameraTargetScreenX"] = isDocked ? "0.66" : "0.64", - ["cameraTargetScreenY"] = isDocked ? "0.55" : "0.81", + // Cinemachine serializes screen Y from the top edge; Eve camera + // surfaces use Unity viewport coordinates measured from the bottom. + ["cameraTargetScreenY"] = isDocked ? "0.45" : "0.19", ["cameraPositionDamping"] = isDocked ? "2" : "0", ["cameraNearClipPlane"] = isDocked ? "0.3" : "1", ["cameraFarClipPlane"] = isDocked ? "2048" : "4096", @@ -1269,11 +1271,14 @@ namespace GameCult.Aetheria.State.Verse private static AetheriaRuntimeViewportBounds DefaultViewport() { + // The canonical flight scene renders every splat layer through an + // orthographic-size-1000 camera. The 3000-unit Zone Brushes mesh is + // deliberately oversized and is brush data, not the sampling viewport. return new AetheriaRuntimeViewportBounds { - MinX = -1500, + MinX = -1000, MinY = -1000, - MaxX = 1500, + MaxX = 1000, MaxY = 1000 }; } diff --git a/docs/aetheria-perfect-machine-map.md b/docs/aetheria-perfect-machine-map.md index 119aad249..e664abe05 100644 --- a/docs/aetheria-perfect-machine-map.md +++ b/docs/aetheria-perfect-machine-map.md @@ -876,6 +876,11 @@ legacy catalog cache, and legacy UI paths should be migration-only or deleted. - Outputs: undocked flight uses `perspective.entity-forward-follow.v1` with the fossil `Third Person Rig` values and `aim.convergence-point.v1` look-at. Docked presentation remains a distinct mode and cannot lend its framing to flight. +- Coordinate boundary: Cinemachine serializes target screen Y from the top of + the frame, while Eve's canonical viewport follows Unity viewport coordinates + from the bottom. Aetheria translates fossil flight `0.81` to Eve `0.19` and + docked `0.55` to Eve `0.45` before publication. EveUnity receives only the + canonical value and has no Cinemachine compatibility branch. - Derived state: Unity camera position, rotation, matrices, culling mask, and temporal fog history are presentation state. - Forbidden writers: Unity cameras cannot choose dock state, alter entity look @@ -950,6 +955,9 @@ legacy catalog cache, and legacy UI paths should be migration-only or deleted. extent by multiplying by `0.5`, not `5`. Canonical `ARPG.unity` scales the gameplay `Zone Brushes` parent to `3000`, making its global half extent `1500`; `TestScene`'s smaller `1024` value is not gameplay authority. + The splat cameras independently use orthographic size `1000`, so the canonical + field viewport is a 2000-by-2000 square. Brush coverage and sampling extent + are separate provider-owned facts; the generic lowerer does not infer either. Constant offsets are separate constant splats. No provider texture reference is introduced: the fossil materials carry a stale `_MainTex`, but their shaders sample procedural functions and never read it. @@ -982,11 +990,13 @@ legacy catalog cache, and legacy UI paths should be migration-only or deleted. shader ABI is advertised outside the portable surface. Released package `0.3.49` proves target topology, authoritative flow time, explicit camera transforms, float32 packed-output diagnostics, and both camera-channel masks. - The live warm capture remains visually failing: the fossil vertical-noise - displacement drives raymarch density to `1` within roughly three metres. - A controlled zero-amplitude run restores a fog horizon, isolating the open - parity defect to the noise/daemon-height interaction rather than transport, - pass ordering, camera pose, or missing field textures. + The released warm capture proves a live fog horizon using the original + `-36.17` vertical-noise amplitude. The earlier opaque slab was caused by + publishing Cinemachine's top-origin `0.81` as Eve bottom-origin `0.81`, which + placed the camera below the fog surface. The controlled zero-noise run was a + diagnostic, not the adopted rendering contract. Blue tint, luminance, patch + structure, gravity-wave readability, and world geometry remain open visual + parity work. ### Daemon Asset Content Delivery diff --git a/docs/original-game-migration-matrix.md b/docs/original-game-migration-matrix.md index aeb35da4d..a1d0133c3 100644 --- a/docs/original-game-migration-matrix.md +++ b/docs/original-game-migration-matrix.md @@ -31,10 +31,10 @@ validation proves contract shape, not wiring, exclusivity, lowering, or parity. | Inventory/equipment | inventory panels + ServerShared | daemon | inventory/equipment surfaces | generic UI | owner-exists; wired/projected in fragments; not proven | all transfer directions and rejection | | Trade | trade UI/economy | daemon | stock, quote, purchase commands | generic UI | daemon derives station, stock row, catalog item, current price, quantity, credits, target capacity, and hull-vs-cargo result; Eve advertises only currently available stock actions; generic Unity live witness receives an authoritative purchase receipt while paused | sell flow, quote expiry, contested stock, and full trade surface parity | | Action bar/input | input shell and rebinding UI | daemon advertises actions; client owns bindings | input capability and action descriptors | universal binding UI | contracts wired; cargo actions are catalog-filtered to consumables the current actor can actually activate, including suppression of active non-stackable items | dynamic equipment behavior validity and runtime action-bar quantity/fill proof | -| Pilot camera | ARPG follow/dock cameras | Eve view semantics + runtime | camera rig and semantic view id | EveUnity camera rig | daemon dock state selects distinct contracts instead of collapsing both fossil cameras: undocked flight advertises the entity-forward `Third Person Rig` framing (distance 30, screen 0.64/0.81, FOV 60, lens 1-4096) and the shared `aim.presentation` convergence point as its look-at; EveUnity solves native pose while preserving both optical aim and advertised entity framing, without provider types; the retained dock projection remains separate | reproduce the dock camera's separate follow/look-at subjects, blend timeline, noise, and reconnect state | -| Render channels | Unity layers/culling masks | provider surface policy + runtime asset variant | semantic channel exclusions | EveUnity native layer mapping | wired, exclusive, and lowered: the pilot surface excludes the semantic `map` channel; the Unity asset variant maps `map` to its authored native layer; EveUnity subtracts that layer from the configured camera mask; portable state contains no Unity layer or mask; package tests and the clean-client dependency verifier pass | live pilot capture proving no map glyphs while the map camera retains them | +| Pilot camera | ARPG follow/dock cameras | Eve view semantics + runtime | camera rig and semantic view id | EveUnity camera rig | daemon dock state selects distinct contracts instead of collapsing both fossil cameras: undocked flight advertises the entity-forward `Third Person Rig` framing (distance 30, screen 0.64/0.19, FOV 60, lens 1-4096) and the shared `aim.presentation` convergence point as its look-at; Aetheria translates the fossil Cinemachine top-origin screen Y of `0.81` to Eve's bottom-origin viewport Y of `0.19`; EveUnity solves native pose while preserving both optical aim and advertised entity framing, without provider types; the retained dock projection remains separate | reproduce the dock camera's separate follow/look-at subjects, blend timeline, noise, and reconnect state | +| Render channels | Unity layers/culling masks | provider surface policy + runtime asset variant | semantic channel exclusions | EveUnity native layer mapping | wired, exclusive, and lowered: the pilot surface excludes the semantic `map` channel; the Unity asset variant maps `map` to its authored native layer; EveUnity subtracts that layer from the configured camera mask; portable state contains no Unity layer or mask; the released warm witness proves the pilot camera excludes map glyphs while the map camera retains them | preserve the channel proof while world presentation and transport continue to evolve | | Minimap/tactical map | `ZoneRenderer`, map cameras | daemon world facts | explicit map projections | Unity and Electron | facts fragmented; generic lowerers absent | same state in both runtimes | -| Fields/fog/gravity | zone renderer and shaders | daemon/plugin semantics | Fields plugin documents | EveUnity fields lowerer | daemon publishes canonical gravity/fog splat layers through `field.volume3d`; Eve Fields `0.2.3` owns portable `PowerPulse` and `AnimatedRadialCosine` semantics; Aetheria emits the fossil global animated simplex/cellular/ambient stack, body-owned radial waves, and separate negative gameplay `gravity.height` and positive visual `fog.surface_height`; daemon entities follow fossil terrain height plus hull grid offset after Ymir XZ motion; released EveUnity `0.3.49` lowers the authored 2048/256/512 layer topology, provider shader ABI, pre-postprocess URP pass, authoritative flow time, explicit camera matrix, and float32 packed-output diagnostics without provider code; both camera-channel assertions pass. The warm capture remains an opaque brown slab because fossil vertical noise saturates ray density to `1`; a controlled zero-amplitude run restores the expected fog horizon and isolates the remaining mismatch to noise versus daemon-generated heights | establish a measured parity rule for the fossil noise displacement against daemon height gradients, then restore blue tint, patch structure, and gravity-wave visual parity; keep the zero-noise result diagnostic-only and visual parity explicitly open | +| Fields/fog/gravity | zone renderer and shaders | daemon/plugin semantics | Fields plugin documents | EveUnity fields lowerer | daemon publishes canonical gravity/fog splat layers through `field.volume3d`; Eve Fields `0.2.3` owns portable `PowerPulse` and `AnimatedRadialCosine` semantics; Aetheria emits the fossil global animated simplex/cellular/ambient stack, body-owned radial waves, and separate negative gameplay `gravity.height` and positive visual `fog.surface_height`; the field viewport matches the fossil splat cameras' 2000-by-2000 orthographic footprint while the larger 3000-scale brush parent remains brush coverage, not sampling extent; daemon entities follow fossil terrain height plus hull grid offset after Ymir XZ motion; released EveUnity `0.3.49` lowers the authored 2048/256/512 layer topology, provider shader ABI, pre-postprocess URP pass, authoritative flow time, explicit camera matrix, and float32 packed-output diagnostics without provider code. Translating the fossil camera's top-origin screen Y into Eve's bottom-origin convention places the camera above the field and restores a live fog horizon with the original `-36.17` noise amplitude; both camera-channel screenshots pass | restore the old blue tint, luminance, patch structure, gravity-wave readability, and surrounding world geometry; visual parity remains explicitly open | | HUD/schematic | ARPG HUD and `SchematicDisplay` | Eve composition from daemon facts | semantic status/components | EveUnity UI | provider-authored transparent cockpit is wired, projected, and lowered through generic UI Toolkit panes, metrics, and progress components for hull, shield, capacitor, temperature, cargo, weapon cooldown/groups, selected target, target lock, target shield, and target hull; the original armor/equipment schematic and transient warning choreography remain reference-only | schematic topology, warning timelines, dynamic action state, and composited live capture | | Hit/lock/warnings | `ActionGameManager` feedback | daemon event facts | transient feedback stream | VFX/UI/audio | bounded deduplicated game-event ledger and Eve `feedback.stream` wired for pickup outcomes, projectile launch/impact, entity damage, alive-to-dead destruction, authoritative weapon reload chronology, and episode-deduplicated `weapon.fire.refused` facts for insufficient energy or missing ammunition; refusal identity, authored weapon, target, reason, and remaining magazine state are runtime-independent cockpit inputs | add lock transitions, thermal and docking event families, negative transaction fixtures, and runtime effect consumption | | Assets | `Assets/Resources` | Aetheria provider | asset catalog + CultMesh CDN | runtime cache/load | provider manifests name deterministic bundle-internal paths; the authoring build derives presentation-only prefabs, strips missing and non-Eve `MonoBehaviour` components, verifies both saved prefabs and the loaded bundle, and publishes the immutable bundle through CultMesh; released-client warm-cache loading, content verification, and rendered provider identity are proven, while cold transfer still times out because the 46.1 MB body travels through batched snapshot records | mapped/network body transport followed by empty-cache download, atomic promotion, and cache reuse proof |