Aetheria gravity map: B32-B34 (slope jitter from stepped ride height, half-float patch gravity copy, fog snapping) and fog-precision-and-jitter in the cut sequence
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
37e0cb113d
commit
5ec9363ac4
1 changed files with 4 additions and 1 deletions
|
|
@ -69,6 +69,9 @@ All read at c6519383 in the detached worktree `C:\aeth-wt\ag2-docs` on 2026-10-1
|
|||
- **B28. Bodies, depth and precision at the branch's curves** (`p1.py`, `p3.py` over `docs/research/2026-10-13-orbit-probe/data/bodies.csv`; c = 45.08·m^0.2, core 3·m^0.25, K = 10, reference at Pack.Radius, random phases). Bodies per zone (1500 zones): p10 8, p50 17, p90 28, p99 57, max 80. Over 200 zones (4000 random points plus 20 per body inside three core radii): float32 against float64 of h = Σ(φ_i(r_i) - φ_i(Z))/K differs by at most 9e-4 u (p50 1.9e-4); deepest h p50 -476, minimum -1865 (a sun's centre in a large zone; B25's -675 is the median zone's cone). R32's step at 1865 is 1.2e-4 u, so the height target loses nothing to precision; resolution limits it instead (a planetoid's 7 u core is under two Surface Displacement texels). The texture's central difference over two 4 u texels points within 1.0° (median zone) and 2.9° (worst zone) of GetForce at the 99.9th percentile, away from 16 u of any body's centre.
|
||||
- **B29. Dead gravity brushes and leftovers.** `Assets/Content/Prefabs/Stations/PlanetOutpost.prefab` (a Gravity Well child, lines 84-164, on PlanetObject.GravityWell) is referenced by no GUID in the repo and its name is in no script or in `GameData/Aetheria.cc`, so it is never instantiated; `Assets/Prefabs/RTS/Planet.prefab` (a Gravity Well child bound to an RTS script's `GravityMesh`, not on layer 9) is likewise unreferenced. Materials no live object uses once the wormhole children go: Wormhole Gravity 1, Wormhole Gravity 2 (already unused), Wormhole Gravity, Wormhole Waves, and Gravity Waves (unused since gravity-subtract); `WormholeBrush.shader` and `RadialWaveBrush.shader` have no other material. `PowerBrush.shader` stays: thirteen other materials use it. `ZoneRenderer.WormholeInstances`' `gravity` member is the whole wormhole instance, not its brush. Main Menu.unity has its own Surface Displacement (9, 10) with a Boundary bowl on layer 9 and no zone.
|
||||
- **B30. How the renderer lowers the law: one pass over a body buffer, not a brush per body** (decided for grid-lowering from B27-B28). Candidates: (a) the Gravity Well quad per body with the one-well law, each covering every camera's view, blended One One; (b) a CPU-baked texture; (c) one quad on layer 9 whose fragment sums every well from a buffer the renderer fills each frame from `Zone.PlanetInstances`. (b) cannot follow moving bodies at 2048² and four windows. (a) and (c) evaluate the same N wells per texel (Surface Displacement: 4.2M texels x N, N = 17 median, 80 max), but (a) also reads and writes the R32 target once per body: 34 MB per body per frame on Surface Displacement alone, 0.57 GB at the median zone and 2.7 GB at the largest, where (c) writes it once. (c) sums in the sim's order (each well minus its reference, then divided by K) from the sim's own per-body reference, so the parity error is B28's float32 floor plus the GPU's log; and the four cameras need no rewiring, because they already cull layer 9. It follows the flow's precedent: the law lives in ServerShared, a shader include lowers it, and a batchmode verify renders it and compares with the C# (`FlowFieldParityVerify`). Body count sets the cost, so the buffer is a StructuredBuffer (no cap to truncate at), which needs shader target 4.5; the project already runs compute (Stardust, Slime).
|
||||
- **B32. The ship is drawn ahead in xz but not in y** (source read at 8f491fd3, 2026-10-15, after the operator's flight: "the new jitter is showing up when moving up a steep slope, not necessarily on those texel boundaries"). The sim steps at a fixed 60 steps per real second (`ActionGameManager.Clock = new SimClock(1f / 60f)`, ActionGameManager.cs:251; `Clock.Advance` runs whole steps, :1378). `Entity.Update` sets `Position.y = Zone.GetHeight(Position.xz) + hullData.GridOffset` once per step (Entity.cs:1893). Presenters draw `Lead` sim seconds past the last step (SimClock.Lead, 0 <= Lead < Step); `DrawAhead.Position(Entity, lead)` (DrawAhead.cs:17-20) adds `Velocity * lead` to x and z and leaves y at the last step's height, and `EntityInstance` writes that to its transform every frame (EntityInstance.cs:405-406). The follow camera's `Follow` is that transform and its `LookAt` is `LookAtPoint`, placed from the same transform (ActionGameManager.cs:1071-1072, EntityInstance.cs:396; CinemachineBrain update method 2, LateUpdate, ARPG.unity:30782). So on a slope the drawn ship and both camera targets move smoothly across and in steps up: each step's y jump is slope x speed x Step, and a frame that runs 0, 1 or 2 steps shows 0, 1 or 2 jumps. At 100 u/s on a drawn slope of 0.5 that is 0.83 u per step against a 70 u camera distance; at K = 4.098 every slope outside the cores is 2.44x what it was at K = 10 (B31), so the steps are 2.44x taller. `SimClockTests.DrawAheadIsTheStateAtZeroLead` pins the defect (`Assert.Equal(player.Position.y, ahead.y)`, SimClockTests.cs:267), vacuously true in its flat duel arena. Everything else on screen (grid, nebula, stardust, planets) is drawn at the last step's state, so it is the camera that steps, which is why the whole view jitters; why planets look worst is not established by source read (candidates: the LookAt composer turns the camera with each step and planets are the large sharp-edged objects far below; or their own heights). Not reproduced in Unity.
|
||||
- **B33. The nebula patch draws gravity a second time, in half floats at 32 u.** Patch Displacement (ARPG.unity camera 507065483, `m_Bits: 5632` = layers 9, 10, 12, line 8040) renders the Gravity Field quad (layer 9) into `Fog Patch Displacement.renderTexture`, 256² `m_ColorFormat: 45` (R16_SFloat), over the same 2·ViewDistance window as Surface Displacement, so 32 u texels. Its one reader is `cloudDensity` (Volumetric.cginc:95-104): `patchDensity = saturate((-abs(pos.y + patchDisp - _NebulaFloorOffset) + patch) / _NebulaPatchBlend) * _NebulaPatchDensity`, with `PatchBlend: 25` in the default environment (Settings.asset:378). A half float's step is 0.5 u from depth 512, 1 u from 1024, 2 u from 2048 and 4 u from 4096; at K = 4.098 the median cone is about -1160 and the worst about -4500 (B31), so the patch surface is terraced in 1-4 u steps, 4-16% of the 25 u blend, where at K = 10 (median -476, B28) the steps were 0.25-0.5 u. The patch's caller already holds the full-precision gravity height: `density` samples `_NebulaSurfaceHeight` (R32, 4 u) at the same uv and passes it in as `surfaceDisp` (Volumetric.cginc:174, 224). No other code reads `_NebulaPatchHeight` (`Stardust.cs:31` holds the texture and never binds it). Shader precision model is platform default (ProjectSettings.asset:263), so `half4(uv, ...)` is full float on desktop and not a cause. Not confirmed in Unity that the operator's bands are these terraces rather than the 32 u bilinear facets of the same texture; the cut below removes both.
|
||||
- **B34. The fog cameras are already texel-snapped.** `FogRenderers` (parent of Surface Displacement, Patch Displacement and Patch) carries `CopyTransform` with `PixelSnapCamera` = the Patch camera (512²) and `PixelSnapIncrement 4`, so it follows Main Camera in xz snapped to `orthographicSize * 4 / 512` = 32 u (CopyTransform.cs, ARPG.unity FogRenderers), a whole number of texels of every fog target (8 of Surface Displacement, 1 of Patch Displacement, 2 of Fog Patch). Execution order ZoneRenderer 50, CopyTransform 51, VolumeSampling 52 (their .cs.meta), so `_GridTransform` is set after the snap in the same frame. The texel-boundary jitter the operator saw is older and separate: "I have felt that grid texel jitter before, that only showed up for me when I brought back the liquid grid shader (CatmullGrid object in ARPG scene), couldn't figure out how to get that to match, even when reading the same offsets the marcher uses and applying the translation in-shader." No CatmullGrid object exists in ARPG.unity at 8f491fd3; it is follow-up `catmullgrid-texel-jitter`.
|
||||
|
||||
## Model page
|
||||
|
||||
|
|
@ -110,7 +113,7 @@ Cells not filled, plainly: whether a per-body multiplier on c or the core is eve
|
|||
|
||||
## Cut sequence
|
||||
|
||||
Mapped and admitted (2026-10-14, base 11b2d7ad): `aetheria-gravity:cut_spec:cut-gravity-subtract.r2` and its sibling `aetheria-gravity:cut_spec:cut-orbits-placed-at-build.r1`, both merged at 5dd1f6b7. Mapped and admitted (2026-10-14, base 5dd1f6b7): `aetheria-gravity:cut_spec:cut-potential-owner.r3` (rebased on 3f5cef68 on 2026-10-15, after rulings `funnel-kept-until-flown` and `core-inside-roche-curve`), one Hands pass; it carries follow-ups `deep-orbit-placement-test` and `gravity-subtract-test-residuals`. Between it and grid-lowering the drawn grid lags (B23). The operator will fly the funnel before ruling on it again (`funnel-kept-until-flown`), so potential-owner and grid-lowering must both be on one playable branch before that flight; grid-lowering is stacked on potential-owner, not a sibling (B26), and its map is the next Imagination pass once potential-owner's report lands. Mapped and admitted (2026-10-15, base dd06f39d, stacked on potential-owner's head): `aetheria-gravity:cut_spec:cut-grid-lowering.r1`, one Hands pass, Starfire-verified; on its branch the drawn grid is the field (B30) and the Sector Waves noise is off the grid until grid-noise-presentation. Not yet mapped:
|
||||
Mapped and admitted (2026-10-14, base 11b2d7ad): `aetheria-gravity:cut_spec:cut-gravity-subtract.r2` and its sibling `aetheria-gravity:cut_spec:cut-orbits-placed-at-build.r1`, both merged at 5dd1f6b7. Mapped and admitted (2026-10-14, base 5dd1f6b7): `aetheria-gravity:cut_spec:cut-potential-owner.r3` (rebased on 3f5cef68 on 2026-10-15, after rulings `funnel-kept-until-flown` and `core-inside-roche-curve`), one Hands pass; it carries follow-ups `deep-orbit-placement-test` and `gravity-subtract-test-residuals`. Between it and grid-lowering the drawn grid lags (B23). The operator will fly the funnel before ruling on it again (`funnel-kept-until-flown`), so potential-owner and grid-lowering must both be on one playable branch before that flight; grid-lowering is stacked on potential-owner, not a sibling (B26), and its map is the next Imagination pass once potential-owner's report lands. Mapped and admitted (2026-10-15, base dd06f39d, stacked on potential-owner's head): `aetheria-gravity:cut_spec:cut-grid-lowering.r1`, one Hands pass, Starfire-verified; on its branch the drawn grid is the field (B30) and the Sector Waves noise is off the grid until grid-noise-presentation. Mapped and admitted (2026-10-15, base 8f491fd3, stacked on grid-lowering's head): `aetheria-gravity:cut_spec:cut-fog-precision-and-jitter.r1`, the slope jitter (B32) and the patch's second gravity lowering (B33), one Hands pass. Not yet mapped:
|
||||
|
||||
- **potential-owner** (mapped, above): one ServerShared potential (c from an authored compressed curve G·m^p, authored core-radius curve, uniform-disc core, log tail, superposition, analytic gradient, no gate, global K in PlanetSettings, reference zero at the root's zone radius); every CPU force reader (Ship, floating bodies, clouds, mines) and `Zone.Flow`'s slope term read it; GetHeight = φ/K; deletes `GravityAcceleration`, `GravityReferenceRate`, `GetNormal` as a force source, the PowerPulse well and `GravityDepthExponent`; field strength per field-strength-ruled. Waits on both admitted cuts. May split into the potential and its readers if one Hands pass cannot hold both.
|
||||
- **orbits-from-field**: Orbit.Period = 2πd/sqrt(c_parent) for the orbit constructor, asteroid poses (Zone.cs:822) and BeltTargets.cs:63; `OrbitPeriod` deleted. Waits on potential-owner.
|
||||
|
|
|
|||
Loading…
Reference in a new issue