Feat/visual audio overhaul #21

Merged
Dotts merged 31 commits from feat/visual-audio-overhaul into main 2026-07-21 14:09:18 -07:00
4 changed files with 83 additions and 1 deletions
Showing only changes of commit 911066875b - Show all commits
Binary file not shown.
Binary file not shown.
+27 -1
View File
@@ -681,9 +681,35 @@ func _build_rail_line() -> void:
_ad_quad(Vector3(x - 1.35, 2.0, z), Vector2(1.2, 1.8), -90.0, _poster_tex()) _ad_quad(Vector3(x - 1.35, 2.0, z), Vector2(1.2, 1.8), -90.0, _poster_tex())
i += 1 i += 1
x += PITCH x += PITCH
# Kitbashed station entrance beside the central avenue crossing # Kitbashed station entrance beside the central avenue crossing, with a
# platform strip (canopy + benches + signs) up on the deck above it
_hero("station", Vector3(ROAD_W * 0.5 + 8.0, 0.02, z + 7.5), 90.0, _hero("station", Vector3(ROAD_W * 0.5 + 8.0, 0.02, z + 7.5), 90.0,
Vector3(6.0, 3.6, 5.0), 1.8, "concrete") Vector3(6.0, 3.6, 5.0), 1.8, "concrete")
_hero("platform", Vector3(10.0, RAIL_TOP, z), 0.0, Vector3(14.0, 2.8, 2.4), 1.4, "metal")
_hero("platform", Vector3(-24.0, RAIL_TOP, z), 0.0, Vector3(14.0, 2.8, 2.4), 1.4, "metal")
# Pedestrian footbridge over the central avenue (deck + stair colliders
# are walkable: a third crossing route between the viaduct and plaza)
var fb_z := z + PITCH
var fb := StaticBody3D.new()
fb.name = "Footbridge"
fb.set_meta("acoustic_material", "metal")
add_child(fb)
fb.global_position = Vector3(0, 0, fb_z) # span runs along x, across the avenue
var fb_shape := CollisionShape3D.new()
var fb_box := BoxShape3D.new()
fb_box.size = Vector3(18.0, 0.4, 3.0)
fb_shape.shape = fb_box
fb_shape.position = Vector3(0, 5.5, 0)
fb.add_child(fb_shape)
var fb_inst: Node3D = _kit_scene_at("res://assets/props/hero/footbridge.glb").instantiate()
fb.add_child(fb_inst)
LevelMaterials.apply_toon_recursive(fb_inst, 0.015)
# Walkable stair ramps at both ends (over the stair visuals)
for e in [-1.0, 1.0]:
var ang := rad_to_deg(atan2(5.5, 6.4))
_ramp_static(Vector3(e * (9.0 + 3.2), 2.65, fb_z), Vector3(2.8, 0.3, 8.6),
Vector3(0, 0, -ang * e), PAVING, "FootbridgeStair_%d" % int(e), "metal").visible = false
# Slide ramps to the deck at the two main-avenue crossings # Slide ramps to the deck at the two main-avenue crossings
for sx in [-PITCH * 0.5 - 4.0, PITCH * 0.5 + 4.0]: for sx in [-PITCH * 0.5 - 4.0, PITCH * 0.5 + 4.0]:
+56
View File
@@ -301,3 +301,59 @@ phonebooth()
busstop() busstop()
bicycle() bicycle()
print("hero: batch 2 built") print("hero: batch 2 built")
# ── Batch 3: footbridge + station platform ───────────────────────────────────
def footbridge():
"""Pedestrian bridge: 18m deck, X-trusses, railings, stairs both ends."""
clear()
SPAN, DH = 18.0, 5.5
box("deck", (SPAN, 3.0, 0.35), (0, 0, DH), GRAY, 0.03)
box("deck_edge", (SPAN + 0.2, 3.2, 0.12), (0, 0, DH - 0.22), INK, 0.01)
# side trusses: X pattern of rotated bars + top chord
for sy in (-1, 1):
y = sy * 1.45
box("chord", (SPAN, 0.12, 0.12), (0, y, DH + 1.25), TEAL, 0.01)
n = 6
for i in range(n):
x = -SPAN / 2 + SPAN / n * (i + 0.5)
for ang in (0.6, -0.6):
box("truss", (0.09, 0.09, 1.55), (x, y, DH + 0.62), TEAL, 0.0,
rot=(0, ang, 0))
# rail mesh
box("rail", (SPAN, 0.05, 0.5), (0, y, DH + 0.55), mat("railmesh", (0.3, 0.32, 0.38)), 0.0)
# stairs at both ends, descending outward along the bridge axis
steps = 10
for end in (-1, 1):
for i in range(steps):
z = DH - 0.3 - i * (DH - 0.3) / steps
x = end * (SPAN / 2 + 0.5 + i * 0.62)
box("step", (0.62, 2.6, 0.22), (x, 0, z), GRAY, 0.01)
# stair rails
box("stairrail", (steps * 0.64, 0.08, 0.08),
(end * (SPAN / 2 + 0.4 + steps * 0.31), 1.25, DH * 0.55), INK, 0.0,
rot=(0, end * -0.68, 0))
export(os.path.join(OUT, "footbridge.glb"))
def platform():
"""Station platform strip for the viaduct deck: canopy, benches, signs."""
clear()
L = 14.0
for i in range(4):
x = -L / 2 + L / 4 * (i + 0.5)
cyl("post", 0.1, 2.6, (x, 0, 1.3), METAL)
box("proof", (L, 2.2, 0.12), (0, 0, 2.7), WHITE, 0.02)
box("proof_edge", (L + 0.2, 2.4, 0.06), (0, 0, 2.6), TEAL, 0.01)
for x in (-L / 4, L / 4):
box("bench", (1.8, 0.45, 0.08), (x, 0.4, 0.5), WOOD, 0.01)
for sx in (-1, 1):
box("bleg", (0.08, 0.4, 0.5), (x + sx * 0.75, 0.4, 0.25), INK, 0.0)
box("psign", (2.2, 0.1, 0.55), (0, 0.9, 2.15), mat("psign", (0.15, 0.35, 0.6)), 0.01)
export(os.path.join(OUT, "platform.glb"))
footbridge()
platform()
print("hero: batch 3 built")