Gravity map: B44-B48 (layers, turrets, stardust, ambient edge, law and generator r3); tail-taming line

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Meta Vens 2026-10-16 07:36:51 +02:00
commit 533b301e49

View file

@ -21,7 +21,7 @@ All read at c6519383 in the detached worktree `C:\aeth-wt\ag2-docs` on 2026-10-1
| Gravity Well (PlanetOutpost station prefab) | 9 | Gravity Well | none found; whether this prefab is instantiated in play was not checked |
Other cameras render the same layers into their own textures: `Patch Displacement` (layers 9, 10, 12), `Map Gravity` (9, the minimap; `MapView.cs`), `Slime Gravity Renderer` (9; `Slime.cs` binds it as `Heightmap`).
- **B4. Readers of the drawn height (GPU).** `Volumetric.cginc:121-130` (gradient of `_NebulaSurfaceHeight`, the shader's slopeFlow and surface normal; `:174` surface displacement), `Asteroid.shader:31` (displacement), `Stardust.compute:134` (`gravHeight`), `VolumeRenderCustom.shader` (property), `Slime.compute` (Heightmap), the minimap gravity materials (`ZoneRenderer.MapGravityMaterials`, `_StartDepth`/`_DepthRange` at :623-628), and the editor verifier `FlowFieldParityVerify.cs:162,261`. Follow-up `aetheria-fauna:follow_up:flow-slope-gradient-parity` already names the slopeFlow mismatch.
- **B4. Readers of the drawn height (GPU).** `Volumetric.cginc:121-130` (gradient of `_NebulaSurfaceHeight`, the shader's slopeFlow and surface normal; `:174` surface displacement), `Asteroid.shader:31` (displacement), `Stardust.compute:134` (`gravHeight`) (property), `Slime.compute` (Heightmap), the minimap gravity materials (`ZoneRenderer.MapGravityMaterials`, `_StartDepth`/`_DepthRange` at :623-628), and the editor verifier `FlowFieldParityVerify.cs:162,261`. Follow-up `aetheria-fauna:follow_up:flow-slope-gradient-parity` already names the slopeFlow mismatch.
- **B5. Readers of the sim height and force (CPU).** Force: `Ship.Update` (Ship.cs:133-135, through GetNormal and GravityAcceleration directly, not GetForce), `Zone` floating bodies, clouds and mines (Zone.cs:411, 437, 451 via GetForce). Gradient for flow: `Zone.Flow` (:700-704). Height for placement: `Entity.cs:1849` (Position.y of non-ship entities), `Agents/States/Combat.cs:114` and `Behaviors/TurretController.cs:73` (predicted target height), `Gameplay/ItemPickup.cs:44`, `Gameplay/MineInstance.cs:59`, `ZoneRenderer.cs:545` (belt bounds) and `:581` (planet body height, minimap depth range). Ship tilt: `Ship.Update` builds Rotation from the same normal. Tests: `FloatingBodyTests.cs:187-209, 254` (pin the gate and the legacy law), `LootTests.cs:299-308`, `MineTests.cs:623-628`, `FlowFieldTests.cs` (zone with bowl as the slope source), `FireControlTests.cs:380`. Editor smoke: `FloatingItemsDrawnSmoke.cs:159`. No AI reader predicts gravity.
- **B6. Rails.** `Orbit.Period = OrbitPeriod.Evaluate(Distance)` (Zone.cs:910), with `OrbitPeriod` = 1·d^1 + 0 in Settings.asset: period is a function of distance only, never of the parent. Other readers of the same curve: `Zone.cs:599` (an orbit added at run time, phase back-solved), `Zone.cs:822` (each asteroid of a belt), `Targeting/BeltTargets.cs:63` (belt target periods). `GetOrbitPosition` (:465-500) is the closed-form rail; the root orbit has no parent and sits at `FixedPosition`. Two commented-out period writers remain in `ZoneGenerator.cs:589, 650`.
- **B7. Body well parameters.** `Planet.CalculateProperties` (Zone.cs:755-760): `BodyRadius`, `GravityWellRadius`, `GravityWellDepth` from PlanetSettings curves times per-body multipliers; `GasGiant` adds wave depth, radius, speed. The generator never writes any multiplier or `GravityDepthExponent` (no writer in ServerShared). `GasGiantData`'s wave fields reuse the JSON names `gravRadiusMul`, `depthMul` and `depthExp` (twice: `WaveDepthExponent` and `WaveSpeedMultiplier`) that `BodyData` already uses for its gravity fields; MessagePack keys differ (14-17 against 6-8), so the binary store is unambiguous and the JSON names are not. `WaveDepthExponent` is read by nothing (the sim hard-codes 8).
@ -81,6 +81,11 @@ All read at c6519383 in the detached worktree `C:\aeth-wt\ag2-docs` on 2026-10-1
- **B41. Probe under the conserving compact law** (`gravity-well-law/probe3-output.txt`, 6 draws, same data as B35/B38). Reach 2*d_Hill (w3): ratio p50 Sun/GasGiant/Planet/Planetoid/Belt 1.09/1.00/0.97/0.97/0.98 (p90 1.15-1.32) against today 2.00/1.63/1.24/1.10/1.16; far field exactly 1.00x c(M_zone) at 2Z and 10Z (today 5.54x); deepest point 1.01x one body of the zone's mass (today 3.43x, p90 4.83); split invariance outside the family for 2382/2427 families inside the ruled generator window (4573/6976 under today's generator, which places most moons outside it, B25); mid-zone pull 0.60 at Z 1000; planets round a median sun 17.2 u/s, 99% in 12-18; suns' children keep 23.6 u/s rails. 234 children get under half the log pull: the same 234 inside their parent's Roche limit.
- **B42. Evaluation cost of the tree walk.** 30 terms per zone; a sim sample evaluates 4 terms p50 (p99 15) after 10 reach tests; a shader texel 3 (p99 14); today every sample evaluates all 17 wells p50 (p99 58). Skipping is exact because nothing outside a reach pulls; camera-window culling is optional.
- **B43. Consequences the well-law cut carries or names.** The ring law becomes partners' own terms at their chord (a binary member feels c(M_partner)*2D/(4D^2+eps^2)); a body orbiting a binary from outside feels c(M_pair), not the sum of strengths; strengthless companions on a ring keep the mean-pull rule until children-within-reach deletes it; children-within-reach reads the law's reach and support instead of respelling the tidal radius, and places circumbinary children beyond 5x the ring radius. Knobs (smoothstep order, band 1.5, fade from half the reach, ring reach 4D) were chosen once, not swept.
- **B44. Hull contact and layers** (orbital-layering, merged 949fa005; verdicts cut-orbital-layering.s1/s2). Contacts.Step paired every active unparented Entity by planar disc, so stations (r 14.4) and turrets (r 8.9) blocked ships; it now pairs ships only (ship bounce kept, ruling ship-contact-stays-keep). Vertical placement had four owners (per-hull GridOffset, prefab GridOffset, planet +2R, AsteroidVerticalOffset); one settings owner now sets ships 3, orbitals 15, floaters 0 (key 26 retired); planets keep their size lift; asteroids move to the floater layer in follow-up asteroid-floater-layer-cut.
- **B45. Station and turret placement** (turret-placement, merged 949fa005; verdicts cut-turret-placement.s1/s2). PlaceTurrets' t/2 integer division put every turret at distance 0 from its station; CreateLagrangeOrbit added pi/3 to a Phase in turns (stations 17 deg from their planet). Now stations sit at 1/6 or 5/6 turn and turrets flank by cumulative reach (min gap 8.74 u over 1024 zones). Orbit-choice residuals in follow-up station-orbit-choice-residuals.
- **B46. Stardust culling** (stardust-bounds, merged fdecde02; verdicts cut-stardust-bounds.s1/s2). The bounded Graphics.DrawProcedural was culled against a hand-set 2048-high box, and no overload opts out; the draw is now one CommandBuffer on TargetCamera at CameraEvent.BeforeForwardAlpha. Both target cameras are deferred, where AfterForwardOpaque never runs (it drew 0 pixels); BeforeImageEffects and AfterEverything also draw.
- **B47. The ambient's edge** (ambient-follows-populated-area, merged 6865af81; verdicts .s1/.s2; ruling dark-beyond-populated-area). The only tint in the outer zone was the Ambient Fog Light quad (PowerBrush power 2) sized to exactly Pack.Radius, so the tint map was zero beyond it while the field kept rising into a rim wall: the circular light edge. Sun brushes (power 16 over LightRadius/2) are under 1% by half their radius. Now Zone.PopulatedRadius (max chain reach of bodies and belts + Roche) sets a Gaussian fade, edge 0.12 of centre, quad sized to the B10G11R11 format floor 2^-15 (last step <= 1.5 floors). The dead second marcher (VolumeRender shaders, Fog Marching materials) was deleted (dead-fog-marcher, merged 949fa005).
- **B48. Law and generator together** (`docs/research/gravity-well-law-r3.md`, merged with its minimap renders; question tail-taming-law-r3). Recommended C4: the band law with reach 1/2 D, plus generator rules (child at least max(1.5 x parent Roche, 3 eps_c c_p/c_c), at most D_parent/6, sibling spacing D_(i+1) >= D_i/(1 - lambda/2), unfit children folded into the parent's body) keeping 20,768 of 31,640 nodes; rail honesty 0.90-1.10, planetoid cusps lost 4/4894 (today 805/10127), far field exactly c(M_zone). The closed-form band potential loses float32 precision for tau > 1; the law needs a series branch there. Blob share stays >= 0.49 under every candidate because the minimap spaces 21 contours linearly over the deepest body (IsolinesUI.shader:178): a presentation fix for grid-noise-presentation. Dead or derived generator variables: PlanetSafetyRadius, the neighbour-based ChildDistanceMaximum, distMul as spacing owner, the rosette child windows.
## Model page
@ -127,7 +132,7 @@ Cells not filled, plainly: whether a per-body multiplier on c or the core is eve
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. Mapped and admitted (2026-10-15, base 8f491fd3, a sibling of fog-precision-and-jitter on grid-lowering's head, disjoint files): `aetheria-gravity:cut_spec:cut-orbits-from-field.r1`, periods from the field (B35-B38), one Hands pass; it raises `aetheria-gravity:question:rails-enclosed-or-parent` and is written for the recommended parent-only option. Not yet mapped:
- **drawn-pose-at-drawn-time** (mapped and admitted 2026-10-15, base 09ec04a8: `aetheria-gravity:cut_spec:cut-drawn-pose-at-drawn-time.r1`, one Hands pass): `DrawAhead` owns every drawn pose at T = ExactTime + Lead (B39); closes item 3 of `fog-jitter-residuals`.
- **tail-taming** (ruling `tame-tails-parent-only-rails`): mapped and admitted 2026-10-15, base 8bc5ef18: `aetheria-gravity:cut_spec:cut-well-law.r1` (the conserving compact law, B40-B43), depends on drawn-pose-at-drawn-time; waits on question `tail-taming-law-r2`.
- **tail-taming** (ruling `tame-tails-parent-only-rails`, lean `tail-taming-lean-conserving-compact`): `aetheria-gravity:cut_spec:cut-well-law.r2` (the band law, B40-B43, B48; reach 1/2 D, series branch), runnable before question `tail-taming-law-r3` is answered; the generator rules go to children-within-reach once r3 sets the spacing.
- **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.
- **children-within-reach**: ZoneGenerator places children inside a fraction of the parent's tidal radius and the core radius inside the innermost child (softening-radius-ruled); tested over generated zones. It reads `Planet.RocheLimit` (lower bound) and half the tidal radius (upper bound); the windows per class are in B25, and a body with no window (4-7% of small bodies) gets no children. Seam: it places children on GeneratorPlanets before any Zone exists, so it needs the strength a child's rail obeys (`Zone.PeriodAround`'s pull: parent well, or the ring law for bodyless parents) over generator data; it lifts that pull to a pure function both read, rather than spelling the ring law a second time, and its tidal radius uses the same pull. Waits on orbits-from-field.
- **grid-noise-presentation**: the Sector Waves noise (after grid-lowering on layer 10, drawn only into the nebula patch height) and fine-grid detail move to non-slope presentation (grid-gravity-only-ruled); it also owns the Main Menu's own Surface Displacement brushes (B29, follow-up `menu-grid-brushes`). Waits on grid-lowering.