|
|
243f0c8ced
|
fix: load_tree_variants() 缺少 return variants 语句
函数在构建 variants 列表后删除了 imported objects 但忘记 return。
Python 隐式返回 None,导致 tree.assemble() 永远进入 'not variants'
分支(但 assemble 里也没有检查 None,只是 silently return 0)。
结果:tree 构建静默失败,场景里一棵树都没有。
181 棵树现在正确出现在 SCENE_DONE 和 GLB 里 (362 objects, 113k tris)。
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
|
2026-07-30 09:17:07 +08:00 |
|
|
|
e8aecc7143
|
refactor: tree.assemble() 接管树构建,_add_polyhaven_trees 移除
把 polyhaven 树的实例化逻辑从 generate_scene.py 移到
osmassets/tree.py::assemble(),与 water/grass/scrub 的要素
注册表模式对齐。
generate_scene.py 现在只有一个 _assemble_building 残留(因为需要
make_prism / add_roof / add_wall_panel 这些 mesh 构建函数)。
后续 P2c 会把 building 也搬出去。
parity: control-1 vs p2b-unify = PARITY OK (两区域)
smoke: tree_style=polyhaven SCENE_DONE (181棵树, exit 0)
tests: 42/42 OK
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
|
2026-07-30 09:05:14 +08:00 |
|
|
|
9ddf951186
|
chore: grass.py 参数名 add_grass_tufts_fn → add_grass_tufts (更 Pythonic)
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
|
2026-07-30 09:01:30 +08:00 |
|
|
|
a621ef743b
|
feat: 接入 Poly Haven island_tree_01 真实扫描树模型
tree_style 新增 'polyhaven' 选项,用 wm.append 从 vendored .blend
加载 LOD1 网格(4 种 branch+leaf 组合),通过实例化放置场景中的树。
每棵树约 625 tris / 2 meshes (branch+leaf),比旧 procedural tree
(~400 tris) 多了约 60%,但换来真实树形和 PBR 贴图,树叶有 alpha
透明度,在 Cesium 远距离比纯几何球体更可读。
纹理从 ~/Downloads 手动下载(Poly Haven CDN 的 API URL 不可用),
存放在 assets/models/polyhaven/island_tree_01/textures/(不入 git)。
默认 tree_style 仍为 'natural',parity 保持不变。
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
|
2026-07-30 08:57:24 +08:00 |
|
|
|
24e02e2041
|
refactor: 抽 osmassets 包,要素注册表,材质单一定义源 (P0-P3)
generate_scene.py 从 1271 → 816 行 (-455)
P0: 纯函数搬家
- osmassets/osm.py: parse_osm / Projector / parse_height
- osmassets/geom.py: clip_polygon / point_in_polygon / distance_to_ring / sample_tree_row 等
- blender/tests/test_pure.py: 42 个 unittest (脱离 bpy 运行)
P1: 单一定义源
- osmassets/catalog.py: ROAD_LAYERS + MATERIALS (含 cesium 导出参数)
- 对接 osm2streets_scene_style.json 做图层一致性 warning
- 干掉 road_mats / layer_z / 材质参数三份副本
P2: 要素注册表
- osmassets/{water,grass,scrub}.py: 每个要素一个 assemble() 函数
- build() 中的 if/elif 链收缩为注册表调用
- 计数器集中到 counts 字典
P3: 材质契约化
- catalog.py 扩展 CESIUM_EXPORT 段 (tint/metallic/emission)
- 标记已发现的死条目 Office White Metal Facade (四表各一组)
校验:
- parity.js + scene_digest.py + glb-digest.js 三位一体
- control-1 vs p0/p1/p2a/p2b/p3-counts: 两区域全 PARITY OK
- 42 个纯 Python 测试全部通过
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
|
2026-07-29 17:59:32 +08:00 |
|
|
|
23ae63bc2a
|
feat: 草坪新增一些草
|
2026-07-29 14:46:29 +08:00 |
|
|
|
a5c3ad3cf3
|
Generate Cesium preview pages from area builds
|
2026-07-27 13:06:57 +08:00 |
|
|
|
61e4820a4c
|
Refactor pipeline around area asset builds
|
2026-07-27 12:56:13 +08:00 |
|
|
|
59a22ea697
|
Use lightweight natural tree rendering
|
2026-07-27 12:36:55 +08:00 |
|
|
|
cf69c99d20
|
通用化项目结构:Blender 脚本去硬编码、config 路径占位符、layerPrefix 配置
- blender/generate_nantaizi.py → blender/generate_scene.py(去硬编码路径,
--geojson 改为可选,--office-overrides 替代硬编码 way ID)
- blender/export_cesium.py CLI 参数改为必传,修复隐藏物体导出崩溃
- blender/README.md 重写为中文通用文档
- config/default.json 路径改为占位符,template.json 新增 blender 配置块
- scripts/build-osm2streets-qgis.js 新增 layerPrefix 配置驱动 QGIS 图层名
- package.json name → osm-gis-pipeline
- README.md 重写并增加实际运行示例
|
2026-07-24 17:09:43 +08:00 |
|
|
|
fb2a36ac7e
|
成果暂存
|
2026-07-24 16:03:15 +08:00 |
|