Moon surface map
This commit is contained in:
1 parent
0e8134aa59
commit
f8b515e198
36 files changed
+1710
-222
No files matched your search
@@ -42,11 +42,11 @@ vary by about 5 %, and lavapipe's by up to 15 % between sessions. The sample is
|
||||
(`examples/scenes/landsat8.toml`). `cargo bench -p resolved` reproduces the
|
||||
numbers, and `resolved render --timings N` shows the per-pass split.
|
||||
|
||||
Planned tiers: L1 adds Earth's surface, shadows on the target, Earthshine
|
||||
and Moonshine, the Moon's albedo map, the Sun's limb darkening and eclipses
|
||||
seen on Earth and the Moon (M2); C1 and C2 add pixel-area sampling, lens
|
||||
distortion, blur and detector noise (M3); L2 adds measured materials and the
|
||||
atmosphere (M4); L3 is path traced (M5).
|
||||
L1 adds Earth's surface, shadows on the target, Earthshine and Moonshine,
|
||||
the Moon's albedo map and phase curve, the Sun's limb darkening and eclipses
|
||||
seen on Earth and the Moon; its row comes with its measurements. Planned: C1
|
||||
and C2 add pixel-area sampling, lens distortion, blur and detector noise; L2
|
||||
adds measured materials and the atmosphere; L3 is path traced.
|
||||
|
||||
## Usage
|
||||
|
||||
@@ -73,10 +73,13 @@ let panel = renderer.load_model(&Mesh::from_stl(&mut std::io::Cursor::new(stl),
|
||||
|
||||
// Each step: inertial positions in meters, Earth at the origin.
|
||||
let target = Vector3::new(7.0e6, 0.0, 0.0);
|
||||
let moon = Vector3::new(0.0, 3.844e8, 0.0);
|
||||
let scene = Scene {
|
||||
earth_attitude: UnitQuaternion::identity(),
|
||||
sun: Vector3::new(AU, 0.0, 0.0),
|
||||
moon: Vector3::new(0.0, 3.844e8, 0.0),
|
||||
moon,
|
||||
// Which way the Moon's surface map faces; an ephemeris gives it exactly.
|
||||
moon_attitude: Scene::moon_facing_earth(moon),
|
||||
targets: vec![Target { model: panel, pose: Pose::new(target, UnitQuaternion::identity()) }],
|
||||
};
|
||||
let observer = Pose::looking_at(target + Vector3::new(20.0, 0.0, 0.0), target, Vector3::z()).unwrap();
|
||||
@@ -100,14 +103,19 @@ observer, Sun and Moon positions (or an epoch, with the `astrokit` feature) and
|
||||
targets with their models. `examples/scenes/` has commented examples:
|
||||
`boxwing.toml` and `boxwing-epoch.toml` use a small generated model that is
|
||||
in the repository, `lunar-eclipse.toml` and `solar-eclipse.toml` show two
|
||||
real eclipses at lighting L1, and the rest use NASA spacecraft models
|
||||
real eclipses at lighting L1, `full-moon.toml` the Moon's map, and the rest use NASA spacecraft models
|
||||
(Landsat 8, ICESat-2, OSTM/Jason-2, an SSL-1300 and ACE) that
|
||||
`scripts/fetch-models.sh` downloads into `examples/models/nasa/`. That script needs Node (for `npx`),
|
||||
because most NASA models are Draco-compressed and are decoded on the way in.
|
||||
At lighting L1, Earth's surface comes from NASA's Blue Marble, which
|
||||
`scripts/fetch-earth.sh` downloads and resizes (with ImageMagick) into
|
||||
`data/earth/`, one image per month. The month comes from the scene's epoch, or
|
||||
from `[appearance] earth_month` in a scene without one.
|
||||
from `[appearance] earth_month` in a scene without one. The Moon's surface
|
||||
comes from the LRO Camera's normalized-reflectance mosaic, which
|
||||
`scripts/fetch-moon.py` downloads (1.2 GB) and assembles (with numpy and Pillow)
|
||||
into `data/moon/wac-hapke-643.png`. The Moon is turned by the scene's epoch, or
|
||||
by `moon_attitude` in a scene without one (by default facing Earth, which can
|
||||
be off by up to about 10 degrees).
|
||||
|
||||
```sh
|
||||
cargo run --release -p resolved-cli -- render \
|
||||
@@ -124,7 +132,8 @@ cargo run --release -p resolved-cli -- render \
|
||||
- `--lighting L0|L1` and `--camera C0` pick the fidelity tiers (default L0
|
||||
and C0). A tier the scene or the data cannot support stops with an error
|
||||
naming what is missing.
|
||||
- `--data DIR` says where the tiers' data is (`earth/bmng-2004-MM.jpg`).
|
||||
- `--data DIR` says where the tiers' data is (`earth/bmng-2004-MM.jpg` and
|
||||
`moon/wac-hapke-643.png`).
|
||||
Without it the CLI tries `RESOLVED_DATA`, then `./data`, then the
|
||||
repository's `data/`.
|
||||
- `--adapter` takes `auto`, `gpu`, `cpu` or part of an adapter's name;
|
||||
@@ -144,21 +153,19 @@ cargo run --release -p resolved-cli -- render \
|
||||
|
||||
## Status
|
||||
|
||||
M1 is complete: the library renders Earth, Moon, Sun and targets to DN
|
||||
through `Renderer`, the CLI renders scene files, and the benchmarks give the
|
||||
L0 / C0 baseline above. M2 is in progress: lighting L1 so far draws Earth's
|
||||
surface from Blue Marble, shadows on the target, light from Earth and the
|
||||
Moon on it, eclipses on Earth and the Moon, and the Sun's limb darkening. The work is tracked as
|
||||
Gitea milestones, each split into one issue per change:
|
||||
Lighting L0 and L1 and camera C0 are in: the library renders Earth, Moon, Sun
|
||||
and targets to DN through `Renderer`, and the CLI renders scene files. Lighting
|
||||
L1 draws Earth's surface from Blue Marble and the Moon's from the LRO Camera's
|
||||
map, shadows on the target, light from Earth and the Moon on it, eclipses on
|
||||
Earth and the Moon, and the Sun's limb darkening. Planned, in order:
|
||||
|
||||
| Milestone | Scope |
|
||||
|---|---|
|
||||
| M1 | Scene API, headless wgpu, analytic Earth/Moon/Sun, glTF and STL targets, Lambert shading with eclipse, pinhole camera, radiance to DN, CLI, benchmark baseline |
|
||||
| M2 | Earth surface image, self-shadowing, Earthshine and Moonshine, Moon albedo map, Sun limb darkening, lunar and solar eclipses on the bodies, lower readback overhead |
|
||||
| M3 | Pixel-area sampling, lens distortion, PSF, detector noise, saturation and blooming, stars, apparent positions |
|
||||
| M4 | BRDF and spectral materials, atmospheric scattering, clouds, lunar terrain |
|
||||
| M5 | Portable ray tracing, path tracing, label outputs for ML |
|
||||
| M6 | Validation against lunar, Earth and Mitsuba references; motion blur, rolling shutter, stray light; multi-band and 4k |
|
||||
- Camera: pixel-area sampling, lens distortion, PSF, detector noise,
|
||||
saturation and blooming, stars, apparent positions.
|
||||
- Lighting: BRDF and spectral materials, atmospheric scattering, clouds, lunar
|
||||
terrain.
|
||||
- Portable ray tracing, path tracing, and label outputs for ML.
|
||||
- Validation against lunar, Earth and Mitsuba references; motion blur, rolling
|
||||
shutter, stray light; multi-band and 4k.
|
||||
|
||||
## Conventions
|
||||
|
||||
|
||||
Reference in new issue
Block a user