Skip to content

Clouds, fog and cab in Cesium (M2) - #262

Draft
leftos wants to merge 5 commits into
mainfrom
feat/cesium-weather
Draft

leftos wants to merge 5 commits into
mainfrom
feat/cesium-weather

Conversation

@leftos

@leftos leftos commented Oct 21, 2026 •

Copy link
Copy Markdown
Owner

🤖 Posted by Claude Code on behalf of @leftos.

Milestone M2 of the Babylon to Cesium migration: tower cab, clouds and fog drawn by Cesium. Merges after the owner's look sign-off and the iPad measurement (TC3D-150). Design: docs/plans/babylon-to-cesium.md, M2.

  • TC3D-144: clouds and fog as a depth-aware Cesium post-process stage (captures in docs/plans/canvases/cesium-weather-stage/)
  • TC3D-145: fog in the weather composite instead of scene.fog
  • TC3D-224: ease weather fog in instead of popping at 10 SM and on each METAR
  • TC3D-146: tower cab as a Cesium model again
  • TC3D-147: tint clouds and fog by sun elevation
  • TC3D-148: quality presets for the weather stage
  • TC3D-125: overcast horizon band, dense-fog colour
  • TC3D-138: one model-axis convention for aircraft and cab
  • TC3D-219: fog with the camera above ~32 km
  • TC3D-149: delete the Babylon fog dome and cloud meshes
  • TC3D-150: iPad measurement and look sign-off

Refs TC3D-221

Ports the weather spike's post-process stage into production: a cloud
raymarch and fog composite that read the scene depth, driven by the
weather store and settings, anchored on the airport or the followed
aircraft, kept after the silhouette stage. The Babylon fog dome and
cloud meshes stay behind a non-persisted switch and draw when the view
has no logarithmic depth buffer.

Refs: TC3D-144
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@linear-code

linear-code Bot commented Oct 21, 2026

Copy link
Copy Markdown

TC3D-221

leftos and others added 4 commits October 21, 2026 11:26
- Fog Intensity sets how thick the depth-drawn fog looks, and terrain
  in low visibility is no longer fogged twice

The weather composite's fog extinction is the quality preset's value
times fogIntensity (floored at 0). While the Cesium stage draws fog,
useCesiumWeather holds scene.fog at Cesium's clear-weather values
instead of tuning it from METAR visibility; with the Babylon overlay
drawing the weather, the tuning is unchanged. The stage hook now runs
before useCesiumWeather and hands it its gates.

Refs: TC3D-145
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The cab moves out of the Babylon overlay into Cesium (useTowerModel), so
it writes depth the cloud and fog stage reads, casts a Cesium shadow and
darkens at night on the same curve as the imagery (nightBrightness).

One axis convention for aircraft and cab (modelOrientation): manifest
rotation now turns the cab clockwise from north, as MODDING.md and the
positioning wizard always said; rotation 0 faces as before. Aircraft
headings are numerically unchanged.

Ground height resolves through resolveGroundHeight and re-samples on
terrainProviderChanged, so a cab loaded before World Terrain no longer
sits on height 0. The Babylon cab, its sun-direction hook, shadow
generator and IBL wiring are deleted. window.__tc3d gains towerModel.

Refs: TC3D-146
Refs: TC3D-138
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The headless check of the Cesium cab showed KOAK's cab hanging 7.45 m
off its shaft at its manifest rotation 0 and centred at 90: tower
manifests were tuned against the earlier Cesium cab, whose glTF +X
faced east at rotation 0. The cab now keeps that convention, through
the shared compass helper with a 90-degree cab offset, and turns
clockwise from there. MODDING.md and CLAUDE.md say so.

Refs: TC3D-146
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The Cesium weather stage draws clouds and fog and the tower cab has
left Babylon, so the Babylon dome, cloud planes, their textures and
recentring, the Babylon night lighting and the weather renderer switch
go. Label weather culling moves into useBabylonOverlay unchanged.
With log depth off the stage stays hidden and there is no Babylon
fallback (owner ruling). Babylon keeps rain, snow, lightning and
datablock labels.

Refs: TC3D-149
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant