Skip to content

Feat/stadium archetype#1069

Merged
louis-e merged 3 commits into
mainfrom
feat/stadium-archetype
May 27, 2026
Merged

Feat/stadium archetype#1069
louis-e merged 3 commits into
mainfrom
feat/stadium-archetype

Conversation

@louis-e
Copy link
Copy Markdown
Owner

@louis-e louis-e commented May 27, 2026

No description provided.

louis-e added 2 commits May 27, 2026 21:20
Detects leisure=stadium / building=stadium with size + structural
heuristics (>=20k m^2 alone, or >=10k m^2 with inner building=stadium),
fetches a generic bowl GLB from arnismc.com (cached), voxelizes it
non-uniformly to fit the polygon footprint, and suppresses overlapping
inner buildings, pitches, and tracks.

Extends voxelize_glb with vertex-color (COLOR_0) support per glTF spec
and reserves pure magenta (#FF00FF) as a GLASS sentinel. WorldTransform
now supports non-uniform world scaling via with_world_scale_xyz.

Consolidates 3DMR / Wikidata / custom orchestration into a single
Models3dPipeline; groups Arnis-hosted archetypes under models_3d/custom/
with a shared HTTP+cache client so future archetypes (water towers,
wind turbines, etc.) are ~50 lines each.
Copilot AI review requested due to automatic review settings May 27, 2026 19:52
@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 27, 2026

⏱️ Benchmark run finished in 1m 1s
🏗️ Generation time: 30s (excl. data fetching)
🧠 Peak memory usage: 892 MB

📈 Compared against baseline: 27s time, 900 MB memory
🧮 Delta: 34s time, -8 MB memory
🔢 Commit: 7900dcc

🟢 Generation time is unchanged.
🟢 Peak memory is unchanged.

📅 Last benchmark: 2026-05-27 20:23:21 UTC

You can retrigger the benchmark by commenting retrigger-benchmark.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds a new 3D-model substitution orchestration layer that integrates Arnis-hosted “archetype” models (starting with a stadium GLB) into the existing 3DMR + Wikidata model placement flow, and extends the voxelizer to support non-uniform scaling and special color handling.

Changes:

  • Introduces Models3dPipeline to prescan/suppress/place 3DMR → Wikidata → custom archetypes from a single entry point.
  • Adds a custom leisure=stadium/building=stadium archetype with footprint fitting, caching, and placement.
  • Enhances GLB voxelization with non-uniform world scaling, vertex-color handling, and a magenta→glass sentinel.

Reviewed changes

Copilot reviewed 9 out of 9 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
src/models_3d/wikidata/mod.rs Re-exports PrescanResult for use by the pipeline.
src/models_3d/voxelize.rs Adds non-uniform world scaling, vertex-color support, and glass sentinel handling in GLB voxelization.
src/models_3d/three_dmr/mod.rs Re-exports PrescanResult for use by the pipeline.
src/models_3d/pipeline.rs New pipeline to coordinate prescan/suppression/placement across all 3D model sources.
src/models_3d/mod.rs Registers custom archetypes + pipeline and includes custom cache clearing.
src/models_3d/custom/stadium.rs New stadium archetype implementation (prescan + suppression + footprint-fit voxel placement) with tests.
src/models_3d/custom/mod.rs New custom archetypes module wiring.
src/models_3d/custom/client.rs Adds cached HTTP fetcher for Arnis-hosted GLB archetypes.
src/data_processing.rs Switches generation flow to use Models3dPipeline suppression + placement.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/models_3d/voxelize.rs Outdated
Comment thread src/models_3d/custom/stadium.rs
- Clarify voxelize.rs comment: vertex colors modulate (not override) material.
- Add MAX_LONG_EXTENT_M / MAX_SHORT_EXTENT_M / MAX_HEIGHT_M caps so
  mis-tagged whole-sports-complex polygons don't blow up voxelization.
  Mirrors Wikidata's extent caps. Test covers an oversize 1500×800 m
  leisure=stadium being rejected.
@louis-e louis-e merged commit 7775dec into main May 27, 2026
3 checks passed
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.

2 participants