feat(pipeline): add WOL validation + time-of-day sampling

Three additions to the Wowee Open Light format that landed
last commit:

  • WoweeLightLoader::sampleAtTime(light, timeMin) returns
    the linearly-interpolated keyframe at any time-of-day,
    correctly handling wrap-around between the last keyframe
    and the first (e.g. 21:00 blends from dusk toward
    midnight by going forward through 00:00).

  • --validate-wol <wol-base> [--json] walks every keyframe
    and reports structural problems: time bounds (must be
    [0, 1440)), strict-ascending sort order, fogEnd >
    fogStart, finite color components. Exit code 0 PASS /
    1 FAIL — CI-friendly.

  • --info-wol-at <wol-base> <HH:MM|minutes> samples the
    interpolated state at a specific time of day. Useful
    for previewing what the renderer would feed in at a
    given moment, debugging keyframe gaps, or previewing
    a sub-range of the cycle.

Smoke-tested: dawn-to-midnight blend at 03:00 yields a
plausible mid-fade ambient (0.18, 0.16, 0.15) and dusk-to-
midnight wrap at 21:00 yields the symmetric (0.19, 0.145,
0.14). The default 4-keyframe day/night cycle from
makeDefaultDayNight passes --validate-wol cleanly.
This commit is contained in:
Kelsi 2026-05-09 13:54:57 -07:00
parent d58ee0af7d
commit dc29f7f135
5 changed files with 202 additions and 1 deletions

View file

@ -773,6 +773,10 @@ void printUsage(const char* argv0) {
std::printf(" Print WOC collision metadata (triangle counts, bounds) and exit\n");
std::printf(" --info-wol <wol-base> [--json]\n");
std::printf(" Print WOL lighting keyframes (zone name + per-time-of-day ambient/directional/fog) and exit\n");
std::printf(" --info-wol-at <wol-base> <HH:MM|minutes>\n");
std::printf(" Sample the WOL's interpolated lighting at a specific time-of-day (linear blend between keyframes)\n");
std::printf(" --validate-wol <wol-base> [--json]\n");
std::printf(" Walk every keyframe; check time bounds + sort order + fogEnd > fogStart + finite color components\n");
std::printf(" --gen-light <wol-base> [zoneName]\n");
std::printf(" Emit a starter .wol with the canonical 4-keyframe day/night cycle (midnight + dawn + noon + dusk)\n");
std::printf(" --info-wot <wot-base> [--json]\n");