Feat: Write mesh overlay as a separate <stem>_mesh image

--draw-mesh no longer modifies the primary render.  The clean HDR FITS and
tone-mapped image are written first, then the final image-plane mesh is
overlaid in place on the already-consumed HDR buffer and saved as a
<stem>_mesh sibling.  This applies uniformly to single-frame, movie-frame,
and imported lens-map renders, with derived paths validated before catalog,
spacetime, and render initialization.

Dummy PSF backends still write nothing and report ignoring --draw-mesh.  The
reference-image target now uses the configured image extension so the
ENABLE_PNG=0 test path passes, and the CLI tests cover clean-main identity,
sibling naming, PATH_MAX overflow, and zero-tolerance HDR comparison.

README, README.zh-CN, and usage.md describe the new naming; the mesh reference
asset is renamed to match.
This commit is contained in:
wyj committed 2026-09-26 17:01:25 -04:00
1 parent e4d093a9fe
commit 2a0197229a
7 files changed
+267 -68

No files matched your search

+8 -4
View File
@@ -173,8 +173,11 @@ blueshift pushes both the 3000 K and 12000 K test stars toward blue-white.
### Example: Synthetic test grid with mesh overlay
This example uses `assets/sky_grid_5deg.csv` to inspect lensing and adaptive
mesh refinement in Schwarzschild spacetime. `--draw-mesh` overlays the final
image-plane triangles.
mesh refinement in Schwarzschild spacetime. The main output is the clean
tone-mapped image; `--draw-mesh` additionally writes the final image-plane
triangles, so one command produces both
`output/imgs/schwarzschild_test_grid.png` (no mesh) and
`output/imgs/schwarzschild_test_grid_mesh.png` (mesh overlay).
```sh
mkdir -p output/imgs
@@ -190,9 +193,10 @@ mkdir -p output/imgs
--output output/imgs/schwarzschild_test_grid.png
```
[![Synthetic stellar grid lensed by a Schwarzschild black hole, with adaptive mesh overlay](assets/images/schwarzschild_test_grid.png)](assets/images/schwarzschild_test_grid.png)
[![Synthetic stellar grid lensed by a Schwarzschild black hole, with adaptive mesh overlay](assets/images/schwarzschild_test_grid_mesh.png)](assets/images/schwarzschild_test_grid_mesh.png)
*4K test-grid reference image. Click to view at full resolution.*
*4K test-grid reference image showing the `_mesh.png` overlay. Click to view at
full resolution.*
### Freely falling Schwarzschild movie camera