Feat/stadium archetype#1069
Conversation
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.
|
⏱️ Benchmark run finished in 1m 1s 📈 Compared against baseline: 27s time, 900 MB memory 🟢 Generation time is unchanged. 📅 Last benchmark: 2026-05-27 20:23:21 UTC You can retrigger the benchmark by commenting |
There was a problem hiding this comment.
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
Models3dPipelineto prescan/suppress/place 3DMR → Wikidata → custom archetypes from a single entry point. - Adds a custom
leisure=stadium/building=stadiumarchetype 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.
- 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.
No description provided.