You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat(world-render): seasons v2 with day-night and seasonal models (#44)
- Ground textures and placeholder trees follow the start date: meadows turn through October, grounds and foliage go under snow from November to March
- Track objects may ship optional `autumn_model` and `winter_model` glTF files with their own textures; missing variants fall back to `model`
- Lit windows and glowing signs: any glTF node ending in `_NIGHT` switches at dusk (shown when daylight < 0.5), independent of model
- Move `Daylight` resource to `world-render` where it's used by the night-node switcher
- Season baked at load (not cross-faded), editor builds in summer, run season is scenario's date
Copy file name to clipboardExpand all lines: STATUS.md
+22-3Lines changed: 22 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -14,7 +14,7 @@ As of 2026-08-16 · `cargo test --workspace`: **383 tests green** · clippy and
14
14
| **M3** | Sifa + PZB 90, signals, editor v1 | **done** — Sifa (time-time, time-distance, RZM) and every intermittent build from the Indusi I 54 to the PZB 90 V2.0 complete with standard-case tests; H/V + Ks signal logic present, and **signal models render the lamp images**: modular glTF assemblies on mount points (Zusi pattern), lamp nodes switched by the current lamp image, placeholder mast with an aspect light for signals without a model; the **route editor** edits the line over the aerial imagery (editor v3 — arc-to-point track drawing, device placement and per-device fields, switch placement that splits the track and wires the turnout facing or trailing with its throw time in the panel, the signal/section/route tables of the interlocking as forms, support-point dragging, rule checking, module boundaries with a ghost neighbour, delete with index remapping, undo/redo, save/open with discard guards); the **vehicle editor** edits base data, glTF model, LOD, moving parts, the 3D cab (eye point + interactive controls), the cab displays and the sound table; the **signal editor** assembles signal models (parts, mount points, lamp bindings, lamp test) |
15
15
|**M4**| Interlocking, AI trains, timetable |**done** — routes with locking/release, automatic block, AI stops at signals and platforms |
16
16
|**M5**| LZB 80 + AFB, MFA, tap-changer loco |**done** — LZB with guidance, braking curve, end and failure procedures, with and without PZB, full/partial block mode and CIR-ELKE; BR 110 present; **AFB** as vehicle equipment (`VehicleSpec::afb`): holds the dial speed with traction, dynamic brake and — where that does not suffice — the air brake, and under LZB guidance runs down the braking curve because the LZB's v-soll caps the dial; MFA values and lamps ship as indicators — HUD text, `gauge:`/`lamp:` instruments and render-to-texture displays in the 3D cab (see M6) |
17
-
| **M6** | Interactive 3D cab, start-up procedure, audio, weather/night | **done** — interactive 3D cab: per-vehicle cab data (eye point + controls binding glTF nodes to a closed input registry incl. wipers, lights and display softkeys), mouse picking with drag/click/scroll gestures per control kind, hover glow, HUD readout, operating clicks via `Control(…)` sound quantities; instruments: gauges/lamps of the safety systems (`gauge:`/`lamp:` indicators, MFA pointers), `digit:` seven-segment counters, and **displays rendered to texture** (declarative widget lists in RON, a Lua `display(ctx)` hook with nested menus and clickable softkeys, or an HTML/CSS/JS page per screen — parsed, flex-laid-out and scripted in-engine by the `html-display` crate, no browser embedded); edited in the vehicle editor with viewport preview; start-up chain operable via keyboard and mouse; **weather rendering**: `Sim::weather` (clear/rain/snow/fog) set by the `SetWeather` scenario action — overcast sky, dimmed sun, distance fog from the weather's visibility, rain/snow particle fields around the camera (their streaks slanted by the relative wind of the player's speed), a `Rain` sound quantity for the sound table, and the implied rail condition on every train (`mods/example/scenarios/regenfahrt.ron` shows it); terrain from the DGM; **day/night cycle**: scenario start clock (date + time), sun and moon computed from the georeferenced location, lighting/sky follow the sun's elevation; **night lighting**: signal lamps glow (HDR + bloom on the main camera, emissive lenses), headlight cones at both train ends follow the light switch, the direction of travel and the darkness, red tail lamps (Zg 101) mark the opposite end, cab light on its own switch (`CabControl::Headlights`/`CabLight`, keys 9/0); **terrain texturing and vegetation** (ch. 14): texture splatting — per-vertex weights from slope and track distance blend three generated ground textures (grass/rock/gravel) in a `StandardMaterial` extension — and vegetation as **line content**: every tree its own `LineSource::trees` entry (3D objects from mods' `objects/*.ron`, placeholder for the unnamed), spawned as children of their terrain tile so they stream with it and batch into instanced draws; woods are baked into single trees by the editor, so each one stays individually editable; no recorded samples (the sources are generated — content, not code) |
17
+
| **M6** | Interactive 3D cab, start-up procedure, audio, weather/night | **done** — interactive 3D cab: per-vehicle cab data (eye point + controls binding glTF nodes to a closed input registry incl. wipers, lights and display softkeys), mouse picking with drag/click/scroll gestures per control kind, hover glow, HUD readout, operating clicks via `Control(…)` sound quantities; instruments: gauges/lamps of the safety systems (`gauge:`/`lamp:` indicators, MFA pointers), `digit:` seven-segment counters, and **displays rendered to texture** (declarative widget lists in RON, a Lua `display(ctx)` hook with nested menus and clickable softkeys, or an HTML/CSS/JS page per screen — parsed, flex-laid-out and scripted in-engine by the `html-display` crate, no browser embedded); edited in the vehicle editor with viewport preview; start-up chain operable via keyboard and mouse; **weather rendering**: `Sim::weather` (clear/rain/snow/fog) set by the `SetWeather` scenario action — overcast sky, dimmed sun, distance fog from the weather's visibility, rain/snow particle fields around the camera (their streaks slanted by the relative wind of the player's speed), a `Rain` sound quantity for the sound table, and the implied rail condition on every train (`mods/example/scenarios/regenfahrt.ron` shows it); terrain from the DGM; **day/night cycle**: scenario start clock (date + time), sun and moon computed from the georeferenced location, lighting/sky follow the sun's elevation; **seasons** (ch. 14 "seasons v2"): the same start date colours ground textures and placeholder vegetation — meadows turn through October, ground, gravel and foliage go under snow from November to March — and a mod may add optional `autumn_model`/`winter_model` variants to its track objects, falling back to the year-round model where it ships none; **night lighting**: signal lamps glow (HDR + bloom on the main camera, emissive lenses), headlight cones at both train ends follow the light switch, the direction of travel and the darkness, red tail lamps (Zg 101) mark the opposite end, **mods' `_NIGHT` nodes** (lit windows, glowing signs) switch at dusk in every model, cab light on its own switch (`CabControl::Headlights`/`CabLight`, keys 9/0); **terrain texturing and vegetation** (ch. 14): texture splatting — per-vertex weights from slope and track distance blend three generated ground textures (grass/rock/gravel) in a `StandardMaterial` extension — and vegetation as **line content**: every tree its own `LineSource::trees` entry (3D objects from mods' `objects/*.ron`, placeholder for the unnamed), spawned as children of their terrain tile so they stream with it and batch into instanced draws; woods are baked into single trees by the editor, so each one stays individually editable; no recorded samples (the sources are generated — content, not code) |
18
18
|**M7**| Pilot line from OSM/DGM, scenarios, scoring, save/load |**largely done** — scenario system, scoring, save/load and the OSM/DGM importer are in place; only a real pilot line is missing (data procurement) |
19
19
|**M8**| Mod runtime: declarative content plus Lua behaviour |**done** — loader with dependency order, vehicles/lines/compositions/scenarios/timetables/signal types/signal models/track types/track objects as RON, signal state machine as data, four Lua hooks (vehicle, signal aspect, line, scenario) with a sandbox, mod manager on the main menu (a toggle applies on start) and under F9; reference mod under `mods/example` incl. a glTF model. Only distribution (`.crails` zip + installer) is still open |
20
20
@@ -602,8 +602,27 @@ Every simplification is marked with a `ponytail:` comment at the code site, with
602
602
noon) via `Sim::clock()`. It anchors `Daily` timetables (`Timetable::delay`/
603
603
`next_occurrence` take the start-of-day offset) and drives sun and moon: positions
604
604
from date, time and the georeferenced location (`world_coords::sun`, low-precision
605
-
astronomy), so the season falls out of the date. Seasonal *appearance* (vegetation,
606
-
snow) remains content/texturing work (ch. 14 "seasons v2").
605
+
astronomy), so the season falls out of the date. **The seasonal appearance hangs off
606
+
the same date** (`world_render::Season`, ch. 14 "seasons v2"): the generated ground
607
+
textures and the placeholder trees are built in the colours of the start day — meadows
608
+
turn through October, ground, gravel and foliage go under snow from November to March,
609
+
a rock face keeps showing through. A mod may follow along without having to:
610
+
`autumn_model`/`winter_model` on a track object name a glTF with its own textures for
611
+
that season, each optional, missing ones falling back to the year-round `model` — a
612
+
mast names neither, a birch may name both. Two ceilings: the curve is a central
613
+
European lowland year (a line in the Alps or south of the equator wants a per-line
614
+
climate entry, not a finer curve), and the season is **baked in at load** (a run from
615
+
October into November keeps the ground it started on, and a variant either shows or it
616
+
does not — cross-fading two glTFs would draw every tree twice). The route editor
617
+
builds in summer; which season a run shows is the scenario's date.
618
+
-**Night furniture is a node name**: a glTF node ending in `_NIGHT`
619
+
(`world_render::NIGHT_SUFFIX`) is shown below half daylight and hidden above it —
620
+
lit windows, glowing signs, the light pool under a lamp, in every model the world is
621
+
drawn from. Like the `_LOD<level>` convention it needs no entry in any RON, and the
622
+
lit look stays in the mod's own emissive material. Two ceilings: it is a hard switch
623
+
at dusk, not a fade (fading would mean patching every loaded glTF material per frame),
624
+
and there is one threshold for the whole world — a shop that closes earlier than the
625
+
street lamp wants a per-node schedule, which is a scenario question, not a render one.
0 commit comments