Ridge look and night sky: painterly cel-3, fitted tone curve, real stars and moon, more sky #172

Merged
eureka merged 20 commits from void/ridge-night-sky into dev 2026-11-20 20:51:22 +00:00
Owner

Ridge look and night sky: painterly cel-3 locked, a fitted tone curve, the real night sky from the clock, and more sky in the frame.

Rulings (all ratatoskr-backdrop:ruling:): ridge-look-painterly-cel-curve-no-plates, ridge-look-tuned-by-eye-no-contrast-gates, ridge-look-painterly-cel3-locked, ridge-night-real-sky, ridge-constellation-lines-hidden-extra, ridge-frame-more-sky-fixed-pitch.

Look

  • RidgeLook is one record sent to the card shader as uniforms. DEFAULT_LOOK is painterly with 3 cel bands; PHYSICAL_LOOK keeps the Lambert base.
  • Tone curve: a monotone cubic fitted to each sky's luminance percentiles with a small black lift replaces the additive lift and the 0.47 day/dusk floor.

Night

  • One sidereal transform in src/sky/sun.js serves sun, moon and stars. src/sky/moon.js: low-precision ephemeris, phase, topocentric.
  • Stars: Yale BSC5 to Vmag 5.5 (2887, public domain), B-V colour, airmass extinction, drawn into the HDR sky so twilight hides them; twinkle schedule kept. The seeded field and NIGHT_LUMA gating are deleted.
  • Moon: disc with terminator, its own atmosphere bake, the night key light and cel direction. nightAmbient is deleted.
  • Night exposure adapts with partial adaptation (new moon darker than full) plus a scotopic grade; the fixed night knots and 0.043 ceiling are deleted.
  • Constellation lines (d3-celestial, BSD-3) are a hidden extra: re-pick Night while it is Night; stored in ratatoskr.skyLines.

Frame

  • windowFor places the horizon at HORIZON_AT = 0.85 for every state and viewport (about 31 degrees of sky at 16:9); the near plain is cropped.

Tests: scene and sky suites 537 pass. Star alt/az against astropy within 0.5 degrees; moon against Meeus 47.a, USNO phases and astropy.
Typecheck: the three scene errors (Ridge.test.ts:243, ridgeAssets.test.ts:168-171, skyForState.test.ts:22) are already on dev.

Open

  • skyState.ts BACKDROPS constants (login ink checks) still describe the old sky body.
  • BSC5 came from the SAO TDC copy (CDS unreachable); not byte-diffed against CDS.
  • Each night rebuild bakes the atmosphere twice.

🤖 Generated with Claude Code

Ridge look and night sky: painterly cel-3 locked, a fitted tone curve, the real night sky from the clock, and more sky in the frame. Rulings (all `ratatoskr-backdrop:ruling:`): `ridge-look-painterly-cel-curve-no-plates`, `ridge-look-tuned-by-eye-no-contrast-gates`, `ridge-look-painterly-cel3-locked`, `ridge-night-real-sky`, `ridge-constellation-lines-hidden-extra`, `ridge-frame-more-sky-fixed-pitch`. **Look** - `RidgeLook` is one record sent to the card shader as uniforms. `DEFAULT_LOOK` is painterly with 3 cel bands; `PHYSICAL_LOOK` keeps the Lambert base. - Tone curve: a monotone cubic fitted to each sky's luminance percentiles with a small black lift replaces the additive lift and the 0.47 day/dusk floor. **Night** - One sidereal transform in `src/sky/sun.js` serves sun, moon and stars. `src/sky/moon.js`: low-precision ephemeris, phase, topocentric. - Stars: Yale BSC5 to Vmag 5.5 (2887, public domain), B-V colour, airmass extinction, drawn into the HDR sky so twilight hides them; twinkle schedule kept. The seeded field and `NIGHT_LUMA` gating are deleted. - Moon: disc with terminator, its own atmosphere bake, the night key light and cel direction. `nightAmbient` is deleted. - Night exposure adapts with partial adaptation (new moon darker than full) plus a scotopic grade; the fixed night knots and 0.043 ceiling are deleted. - Constellation lines (d3-celestial, BSD-3) are a hidden extra: re-pick Night while it is Night; stored in `ratatoskr.skyLines`. **Frame** - `windowFor` places the horizon at `HORIZON_AT = 0.85` for every state and viewport (about 31 degrees of sky at 16:9); the near plain is cropped. **Tests**: scene and sky suites 537 pass. Star alt/az against astropy within 0.5 degrees; moon against Meeus 47.a, USNO phases and astropy. Typecheck: the three scene errors (`Ridge.test.ts:243`, `ridgeAssets.test.ts:168-171`, `skyForState.test.ts:22`) are already on dev. **Open** - `skyState.ts` `BACKDROPS` constants (login ink checks) still describe the old sky body. - BSC5 came from the SAO TDC copy (CDS unreachable); not byte-diffed against CDS. - Each night rebuild bakes the atmosphere twice. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
The look constants (ink geometry, ink keeps, sun cut-off) become RidgeLook with
DEFAULT_LOOK; lightCards and lightingOf take an optional look. hazeScale and
ambientScale are new axes (default 1 = today). A recording-GL test proves an
override reaches the shader uniforms.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
reliefWeight, reliefLight, hazeTint, nearWarm, contrastByDistance,
cardToneStep, cardGradient, inkScale, groundNoise, cloudShadows; all default to
today's look. makePhysicalSky takes an optional sun for the look sheet.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Per-sky monotone cubic through five knots (black lift, p5/p50/p95 of the sky grid to target luminances, white or the night ceiling), shared by sky and cards. Night gets a fixed-knot curve and a RidgeLook.nightAmbient term.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
RidgeLook gains celBands/celSoftness/celBandLevels and a coarse ambient step; DEFAULT_LOOK is painterly with cel 3, PHYSICAL_LOOK keeps the old Lambert look. Sheet presets: physical, swiss, poster, painterly, painterly-cel-2/3/4.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
sun.js exports daysSinceJ2000, gmstRad, sunEquatorial and equatorialToHorizontal (sunPosition is now their composition, unchanged in value). moon.js adds the Astronomical Almanac low-precision moon, phase from elongation (Meeus 48.3), topocentric position. Tests against Meeus ex. 47.a and USNO phases.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2887 stars (Vmag <= 5.5) and 150 line chains, 21 KB packed. Placement precesses J2000 to the date and uses sun.js equatorialToHorizontal; tests hold five stars and the moon to astropy's altitude/azimuth within half a degree.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
nightSky.ts holds the night's photometry (moon magnitude by phase, Krisciunas & Schaefer; airglow; star radiance; colour from B-V). The moon gets its own atmosphere bake for the night state and lights the dome, the clouds, the haze lookup and the cards (replacing nightAmbient and the cel bands' sun at night). Night loses its fixed knots and 0.043 ceiling: it adapts like day with the targets scaled by partial adaptation, a scotopic grade (Jensen 2001 luminance, blue shift) before exposure in CPU and shader, NIGHT_CEILING tunable (1). The ink-ceiling test for night is dropped with the ceiling.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
nightBodies.ts places the catalogue stars for the sky's own moment, adds their radiance (extinction, B-V colour, point spread) to the dome behind them and takes the sky's display, so twilight hides them; the moon is drawn with its terminator and earthshine; lines over the stars when asked. stars.ts keeps the twinkle schedule, now a gain on a star's flux. Ridge.ts bakes the bodies and takes a lines option.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
pickSkyState (the menu's pick): Night while the choice is Night toggles the lines, stored in ratatoskr.skyLines (storage wrapped), told to listeners as a sky change; the rebuild key carries ':lines' at night so the scene is rebuilt with the option. Sky menu Data section credits BSC5 and d3-celestial (BSD-3-Clause).

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
The night set renders new, first-quarter and full moon at four hours each plus deep dusk. Night exposure keys the sky to where the curve wants it so the per-channel curve does not turn the scotopic blue shift into a saturated sky.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
windowFor places the plane so its horizon row lands at HORIZON_AT of the height, the same for every sky state and viewport; the plane runs below the viewport bottom (negative bottom) and the near plain is cropped. Every consumer already read the camera and plane from windowFor; the sheet's card placement now reads plane.bottom too, and takes ?h= for a phone-shaped cell. Tests pin the constant horizon, ~35 degrees of sky in a 16:9 cell, and plane coverage with baked ground to spare at 1024x768, 1920x1080, 375x812.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Under a full moon at the new framing every constellation-line vertex in the sky strip now carries a drawn star (was 24 of 34); a test pins it.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Ridge framing: horizon at 0.85 of the viewport (operator, by eye)
All checks were successful
Build pull request / Build pull request (pull_request) Successful in 3m56s
0089cd956a
About 31 degrees of sky in a 16:9 cell. The vertex-star guard drops to 0.8:
low vertices sit in the moonlit haze at this framing.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Delete the sky-backdrop contrast apparatus, the sun-disc floor and dead star/tone code; keep stars out of the moon disc
Some checks failed
Build pull request / Build pull request (pull_request) Has been cancelled
01d74b8188
skyBackdrop/BACKDROPS and the tests that held login text against sky bounds are gone (the bounds were false: the look is tuned by eye). The vertex-carry guard asserts placement only. d3-celestial's BSD-3 text is in THIRD_PARTY_NOTICES.md.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Delete the unused MARGIN constant
All checks were successful
Build pull request / Build pull request (pull_request) Successful in 3m43s
d84a31ce79
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
GameCult/Ratatoskr!172
No description provided.