ShitboxInfinity/tools/build_all_levels.sh
m3ultra 82dae637a1 Scenery overhaul: real OSM street furniture, FLUX texture set v2, lighting pass
Builder now uses the furniture OSM already carries (footways, lamps, benches,
bins, bollards, bus stops, crossings): raised chamfered footpaths, shopfront
bands, awnings in three fabrics, parapets, layered fig/palm trees, zebra bars,
dashed centre lines, Queen St Mall winged canopies. ACES tonemap + SSAO + fog
in game.gd. flux_texture.sh gains size/luma clamping (FLUX renders "pale" as
blown-out white); gen_textures.sh + check_textures.py manage the set. Woolies
carpark rebuilt textured, parking the real fleet. Fixes: fractional OSM layer
tag crash, zero-length-normal UV projection, blood-red mall pavers.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-07-28 14:13:29 +10:00

25 lines
1.5 KiB
Bash
Executable File

#!/bin/bash
# Rebuild every OSM level. Area JSONs are cached in $OSM_CACHE; refetch via the
# README curl + osm_xml_to_json.py if absent.
set -e
cd "$(dirname "$0")/.."
B=/Applications/Blender.app/Contents/MacOS/Blender
C="${OSM_CACHE:-$HOME/.cache/burnout_osm}"
[ -d "$C" ] || { echo "no OSM cache at $C -- set OSM_CACHE or refetch (see README)"; exit 1; }
while IFS='|' read -r id json lat lon sway loop bridge canopy; do
ARGS=$(python3 tools/osm_level_args.py "$C/$json" "$sway" "$loop") || { echo "ARGS FAILED $id"; continue; }
SPAWN=$(echo "$ARGS" | head -1)
RP=$(echo "$ARGS" | tail -1)
# the glTF export drops textures next to the .glb; clear them first or
# renamed/dropped materials leave orphans behind forever
rm -f "levels/$id"/level_*.jpg "levels/$id"/level_*.jpg.import
"$B" -b -P tools/build_level_osm.py -- "$C/$json" "$id" "$lat" "$lon" "$SPAWN" "$RP" "$bridge" "$canopy" 2>&1 \
| grep -E '^(level built|bridge truss|canopies built)'
done <<'EOF'
queen_st_mall|brisbane_cbd.json|-27.4699|153.0251|Queen Street Mall|Adelaide Street,Edward Street,Elizabeth Street,George Street|-|Queen Street
southbank|southbank.json|-27.4775|153.0215|Little Stanley Street|trace:Grey Street|-|-
albert_parklands|albert_parklands.json|-27.4740|153.0280|Albert Street|Alice Street,George Street,Margaret Street,Edward Street|-|-
story_bridge|story_bridge.json|-27.4635|153.0355|Bradfield Highway|trace:Bradfield Highway|Bradfield Highway|-
kangaroo_point|kangaroo_point.json|-27.4780|153.0345|River Terrace|trace:River Terrace|-|-
EOF