Commit Graph
5 Commits
Author SHA1 Message Date
N0VAN0M4LY 21ab1084a6 fix(navgen): bake crushable riExtra objects and true chokepoints
Read both damage tables in config/rendinst_dmg.blk. riExtra blocks are
named after each destructible object and often carry hp without a
destructionImpulse, so dry-stone and wooden fences, metal railings,
sandbags and car wrecks were baked as solid walls. Stock damage data now
decides before model-name guesses, with the impulse and hp limits in the
navBake tuning section.

Flag chokepoints on the eroded voxel field instead of per polygon. A span
is a chokepoint only when no passable span within reach has room for a
passage chokepointMaxWidthVehicles wide, so long polygons touching a wall
no longer mark open yards. Chokepoints become WTO_FLAG_CHOKEPOINT on all
three tiers and keep their surface area.

Let roads cover rough slopes, map Poland's concrete streets as road, and
add an extractor --report with ground material shares and per-object
classification. Previews draw short cover ticks and record 300 DPI.

Verified with Rust release and MSVC builds without warnings, TypeScript
checks, and rebakes of Berlin, Poland and Hurtgen on 2.61.0.58 with
15/15, 416/416 and 840/840 spawn-to-capture connectivity on every tier.
2026-12-05 12:42:40 +08:00
N0VAN0M4LY ed5296e0b8 fix(navgen): restore Berlin roads and terrain access
Retain road identity on narrow polygons, bake upward support faces on the verified fountain model, and attach directional Detour links for two dry canal-bank descents. Keep map-specific inputs in the Berlin tuning file and show both surfaces and links in the preview.

Verified three-tier bakes, platform approaches, and downhill and reverse route queries on 2.61.0.58.
2026-12-04 22:56:21 +08:00
N0VAN0M4LY 6f2d9f639b fix(navgen): qualify cover against source collision geometry
Recheck continuous hull cover at the final parking height and validate both corner approaches on the navigation mesh. Preserve terrain and driving collision for low stone fences while excluding their geometry from cover traces. Add a preview raster size option.

Verified with Rust and MSVC builds, TypeScript checks, and 300 dpi 8K bakes for Berlin, Poland, and Hurtgen.
2026-12-04 19:23:22 +08:00
N0VAN0M4LY 4191d59168 feat(navgen): bake road materials and directional cover
Decode LMp2 terrain materials and decals into navigable road areas. Preserve usable cover bearings and verify left and right corner approaches independently on the standard tank mesh.

Verified with Rust and MSVC builds, TypeScript checks, and offline baking on Berlin, Poland, and Hurtgen for 2.61.0.58.
2026-12-04 12:36:07 +08:00
N0VAN0M4LY 842ee23fa4 feat(ground-ai): add offline tank navmesh and cover baking prototype
Add Stage 0 offline map geometry extraction and Recast/Detour baking tools for ground AI navigation on feat/tank-ai-nav:

- Vendor upstream recastnavigation Recast and Detour sources (zlib license) under native/third_party/recastnavigation.
- Define shared .wtogeo and .wtonav binary layouts in native/wto-nav/wto_nav_format.h.
- Add mission-bounds.mts to collect union ground battle areas, spawns, and capture zones across mission templates.
- Add Rust extractor (tools/navgen/extract) using wt-unpack and config/rendinst_dmg.blk destructionImpulse thresholds to classify hard solids, bridges, crushable objects, and tree trunks in Dagor world space.
- Add multi-threaded MSVC C++ baker (tools/navgen/bake) producing 3 vehicle-width tiled Detour navmeshes, island pruning, dual-height voxel tank covers (full, hull-down, corner peek, retreat-verified), 8m tactical grids, and spawn-to-cap connectivity checks.
- Add zero-dependency PNG top-down preview renderer (tools/navgen/render-preview.py).

Verified: Rust release build (0 warnings), MSVC x64 baker build (0 warnings), root typecheck, and end-to-end extraction/baking/100% 3-tier connectivity and preview rendering on avg_berlin, avg_poland, and avg_hurtgen (2.61.0.58).
2026-12-04 11:33:32 +08:00