fix(assets): drop atomic writes, fix heightmap-size flag, default to 1024x512

The atomic .tmp→rename pattern caused silent FileNotFoundError on some
bodies. Removed in favour of direct writes — resume logic already handles
interrupted runs. Fixed --heightmap-size CLI flag which was silently
ignored due to Python default parameter binding. Changed default heightmap
resolution from 4096x2048 to 1024x512 (native simulation grid — no
information gain from upscaling).

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-04-06 18:51:00 +02:00
co-authored by Claude Opus 4.6
parent db241b88bd
commit 53ec7ee6d9
3 changed files with 26 additions and 45 deletions
+4 -4
View File
@@ -52,8 +52,8 @@ from biome_config import (
# Output resolution
# ---------------------------------------------------------------------------
OUT_W = 4096
OUT_H = 2048
OUT_W = 1024
OUT_H = 512
UI_SCALE = OUT_W / 1024 # 4.0 — all pixel sizes scale with this
# ---------------------------------------------------------------------------
@@ -390,13 +390,13 @@ def render_heightmap(body_def: dict,
render_mode: str = "cartographic",
chrome: bool = True) -> Image.Image:
"""
Render a 4096×2048 annotated equirectangular heightmap PNG.
Render an annotated equirectangular heightmap PNG.
Parameters
----------
body_def : dict — body definition from body_definition_parser
terrain : dict — terrain dict from planet_simulation.simulate()
out_w, out_h — output resolution (default 4096×2048)
out_w, out_h — output resolution (default 1024×512)
Returns
-------