feat(sim): real ring zoom transitions + Dev Mode + cosmos → Webb Cosmic Cliffs #21

Merged
benstull merged 7 commits from feature/ring-transitions-real into main 2026-06-25 19:31:22 +00:00
2 changed files with 40 additions and 2 deletions
Showing only changes of commit 53cb89b4c6 - Show all commits
+11 -2
View File
@@ -28,15 +28,24 @@ stays noncommercial**.
| id | clip | source | window (s) | license / credit |
|----|------|--------|-----------|------------------|
| `cosmos` | Orion Nebula flythrough | NASA/JPLCaltech — https://images.nasa.gov/details/JPL-20221122-SOLSYSf-0001-Orion%20Dust%20and%20Death | ~3054 | PD (17 U.S.C. §105) |
> ⚠️ **Orion is NOT text-free.** The source is the *annotated* "Orion: Dust and
> Death" visualization — NASA burns lower-third captions in throughout
> ("DUST FILAMENT", "BLUE BUBBLE", …), so trimming can't avoid them. We crop past
> them: `simulator/build_pool_manifest.py:decaption_cosmos()` keeps the top 66% of
> the frame (16:9 preserved, ~1.5× tighter framing) and re-fits to 1920×1080. Run
> it ONCE after (re)sourcing the Orion clip, then re-run `generate_media()` so the
> cosmos-orbit / abyss-cosmos transitions use the cropped base.
| `cosmos_galaxies` | Flying Through Galaxies | NASA SVS — https://svs.gsfc.nasa.gov/vis/a010000/a014900/a014950/14950_Galaxies_FlyThrough_4k.mp4 | 832 | PD |
| `cosmos_hudf` | Hubble Ultra Deep Field zoom | NASA SVS — https://svs.gsfc.nasa.gov/vis/a030000/a030600/a030687/hudf-b-1920x1080p30.mov | 2044 | CCBYclass — credit **NASA, ESA, STScI** |
| `cosmos_xdf` | eXtreme Deep Field flythrough | NASA SVS — https://svs.gsfc.nasa.gov/vis/a030000/a030600/a030681/hxdf_fly-b-1920x1080p30.mov | 226 | CCBYclass — credit **NASA, ESA, STScI** |
> ⚠️ **DISCREPANCY to fix next session.** Operator selected cosmos **#1, #3
> (Orion), #4, #5**. During processing, **#6 Galaxy Traverse was run by mistake
> instead of #3 Orion**. The Orion clip (#3) is textfree and already lives at
> instead of #3 Orion**. The Orion clip (#3) lives at
> `simulator/sample_media/cosmos/base.mp4` (the prior real base), so the pool above
> is correct. **`cosmos_traverse` is an UNSELECTED extra on disk — drop it** (or
> is correct — but it carries burned-in captions (see the Orion note above; now
> cropped out). **`cosmos_traverse` is an UNSELECTED extra on disk — drop it** (or
> confirm with operator). The current ring scale id is `cosmos`; when the pool is
> wired, `cosmos` becomes one pool member.
+29
View File
@@ -408,6 +408,35 @@ def generate_media() -> None:
print(f"generated transitions/{a}-{b}.mp4 (+ .rev) from real bases")
# Fraction of frame HEIGHT kept (from the top) to drop the NASA burned-in
# lower-third captions on the cosmos Orion clip ("DUST FILAMENT", "BLUE BUBBLE",
# …). The "Orion: Dust and Death" visualization is captioned throughout, so
# trimming can't avoid them — we crop past them instead. ~1.5x tighter framing.
COSMOS_CAPTION_KEEP = 0.66
def decaption_cosmos() -> None:
"""Re-crop the cosmos Orion base/master IN PLACE to remove NASA's burned-in
lower-third caption band, keeping 16:9 (crop width to match, center-x, top-
anchored) then re-fitting to 1920x1080. Run ONCE after (re)sourcing the Orion
clip re-running would crop again. Media is gitignored, so this is the
recorded, reproducible form of the operation."""
ff = _ffmpeg()
f = COSMOS_CAPTION_KEEP
vf = f"crop=iw*{f}:ih*{f}:iw*{(1 - f) / 2}:0,scale=1920:1080"
for name, crf in (("base", "20"), ("master", "18")):
p = MEDIA / "cosmos" / f"{name}.mp4"
if not p.exists():
continue
tmp = p.with_suffix(".decap.mp4")
subprocess.run([
ff, "-y", "-i", str(p), "-vf", vf,
"-c:v", "libx264", "-crf", crf, "-pix_fmt", "yuv420p", "-an", str(tmp),
], check=True, capture_output=True)
tmp.replace(p)
print(f"de-captioned cosmos/{name}.mp4 (kept top {int(f * 100)}%)")
def main(argv: list[str]) -> None:
manifest = build_manifest()
MANIFEST.write_text(json.dumps(manifest, indent=2, ensure_ascii=False) + "\n")