The OSM pipeline pointed at actual mountains. Both levels ride the real terrarium DEM (Coot-tha's range tops at 287 m, Gravatt's at 196 -- matching the survey numbers) with the real roads draped and carved over it: Sir Samuel Griffith Drive winding up one side of town, Mount Gravatt Outlook Drive zigzagging up the other. Race mode is 3 laps of the mountain; the drag finder even discovered a 1080 m strip through Mount Gravatt's suburbs (Logan Road, of course it is). Pipeline upgrades earned along the way, all reusable: - trace: RacePath mode now STITCHES every OSM way sharing the name into one chain by shared endpoints (SSG Drive is 19 segments; tracing only the longest produced a fraction of the route) and samples densely -- 16 points cut hairpins cross-country and gridded race starts in a paddock. - 9th builder arg selects the raw-terrain texture. Bushland levels pass "grass" (tiled at 3 m -- 18 m tiling reads as macro-photography lawn blades under the car) which also enables forest fill: ~2600 extra gums, 65% biased to within ~150 m of roads, where the driver's eyes actually are. - amenity=parking polygons are now PAVED (draped asphalt) as well as stocked with parked shitboxes -- a summit lookout carpark is a burnout pad, not a dirt patch. Both summits come ready. - man_made mast/tower ways become tapered lattice towers with a cage and whip antenna, built from beams into the steel bucket. Mount Gravatt's telecom tower stands over its carpark. - Levels can carry their own sky: levels/<id>/sky_<time>.jpg overrides the global panorama for any time of day, including day (previously always procedural). Both mountains ship FLUX skies with the Brisbane skyline on the horizon; Gravatt also has a sunset one, because John's reference photo demanded it. Suite green at 11 levels. Next burnout spot: the Gateway Bridge, when the details arrive. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
30 lines
2.0 KiB
Bash
Executable File
30 lines
2.0 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 terrain; 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)
|
|
# level_*.jpg are Godot's extraction of the GLB's embedded textures, not
|
|
# Blender's output. Clear them so renamed/dropped materials don't leave
|
|
# orphans -- but the .glb.import MUST go too, or Godot's cache decides
|
|
# nothing changed and never re-extracts, leaving a level with no textures
|
|
# at all (loads, renders untextured, spams "Resource file not found").
|
|
rm -f "levels/$id"/level_*.jpg "levels/$id"/level_*.jpg.import "levels/$id"/level.glb.import
|
|
"$B" -b -P tools/build_level_osm.py -- "$C/$json" "$id" "$lat" "$lon" "$SPAWN" "$RP" "$bridge" "$canopy" "${terrain:--}" 2>&1 \
|
|
| grep -E '^(level built|bridge truss|canopies built|forest fill)'
|
|
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|-|-
|
|
mt_cootha|mt_cootha.json|-27.4735|152.9530|Sir Samuel Griffith Drive|trace:Sir Samuel Griffith Drive|-|-|grass
|
|
mt_gravatt|mt_gravatt.json|-27.5520|153.0755|Mount Gravatt Outlook Drive|trace:Mount Gravatt Outlook Drive|-|-|grass
|
|
EOF
|