Skip to content

OSM building facades by type - #263

Draft
leftos wants to merge 2 commits into
mainfrom
feat/osm-facades
Draft

leftos wants to merge 2 commits into
mainfrom
feat/osm-facades

Conversation

@leftos

@leftos leftos commented Oct 21, 2026 •

Copy link
Copy Markdown
Owner

🤖 Posted by Claude Code on behalf of @leftos.

Type-aware facades for Cesium's OSM buildings. A 3D Tiles style classifies each building from its OSM tags (parking garage, hangar, house, office, terminal, plain) and packs class, storeys, a wall height code and a per-building hash into the style colour; the facade custom shader decodes it and draws each class's wall grammar with a hashed palette.

Review captures (KSFO garage and tower, KOAK hangar and tower, noon and 22:00): docs/plans/canvases/osm-facades/. The palette is the owner's call before this merges.

Items:

  • TC3D-164: draw type-aware facades from class and levels packed into the style colour
  • TC3D-163: vary building colour per building from a stable hash
  • TC3D-218: type OSM building parts from their outline, then by shape near the field
  • TC3D-220: facade floor lines don't start at the building's ground
  • TC3D-225: turn sun shadows off while the sun is below the horizon, so lit windows are not dimmed at night

Refs TC3D-226

- 3D buildings now show walls that suit their type, such as window
  rows lit at night, open parking-garage decks and hangar doors, and
  vary in colour

A Cesium 3D Tiles style classifies each OSM building (parking garage,
hangar, house, office, terminal, plain) and packs class, storeys, a wall
height code and a per-building hash into the style colour, near white;
the facade shader decodes it and draws each class's grammar with a
hashed palette. Heights come from tagged height less min_height and a
tagged roof, else from the estimated height for whole buildings; a part
with no height of its own uses the default storey. Hangar door seams
are box-filtered over the pixel footprint. The review captures under
docs/plans/canvases/osm-facades/ are retaken on Cesium 1.146.

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

linear-code Bot commented Oct 21, 2026

Copy link
Copy Markdown

TC3D-226

Below the horizon Cesium stops drawing the sun shadow map but receivers
keep sampling the last daytime texture, so every wall (lit windows
included) lost about 30% of its brightness at night, and a stale sunset
shadow patch showed after a noon-to-night switch.

useCesiumLighting now enables sun shadows only while the sun is up, and
re-runs only when the sun crosses the horizon. useSunElevation computes
the sun from Cesium's own clock against the geodetic normal, the same
sun and horizon the shadow map uses, so a time switch updates at once.

Refs: TC3D-225
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