|
|
1 month ago | |
|---|---|---|
| .. | ||
| README.md | 1 month ago | |
| hannibal_path.py | 2 months ago | |
| map_bounds.json | 2 months ago | |
| pipeline.py | 1 month ago | |
| provinces.py | 2 months ago | |
| requirements.txt | 1 month ago | |
Single-shot pipeline to prep the West Mediterranean campaign map. It locks coordinates, fetches base coast/land data, and emits UV-space assets the QML/OpenGL widget can consume.
map_bounds.json (equirectangular projection, normalized UV).tools/map_pipeline/build.assets/campaign_map/land_uv.geojson.assets/campaign_map/land_mesh.bin (float32 u,v pairs) and land_mesh.obj.assets/campaign_map/coastlines_uv.json, rivers_uv.json, and OBJ line exports.assets/campaign_map/campaign_preview.png.assets/campaign_map/campaign_base_color.png and campaign_water.png.assets/campaign_map/terrain_height.png + terrain_height.json.fiona, shapely, pillow, mapbox_earcut, numpy, rasterio (install via pip install -r requirements.txt)./tools/map_pipeline/pipeline.py
Outputs land/rivers UV, mesh binaries, OBJs, preview PNG, and base textures to assets/campaign_map/.
Generate a gameplay-focused provinces.json with hand-authored boundaries (requires shapely + mapbox_earcut):
./tools/map_pipeline/provinces.py
This writes assets/campaign_map/provinces.json (triangulated UVs + colors).
Generate progressive path lines for Hannibal's 8-mission campaign:
./tools/map_pipeline/hannibal_path.py
This script uses hardcoded city lon/lat coordinates from provinces.py and converts them to UV space using map_bounds.json. It generates assets/campaign_map/hannibal_path.json containing 8 progressive path lines, one for each campaign mission:
Each successive path builds upon the previous one, with the last path being the longest and covering all previous waypoints.
Coastline-Aware Features:
Validation System: The script includes comprehensive validation that ensures:
The validation output shows for each mission:
Note: This script does NOT require provinces.json - it calculates UV coordinates directly from lon/lat. If you need to generate provinces.json for the full campaign map visualization, run provinces.py after running the full pipeline.