gameplay: designated street crossing — zebra markings, corridor cut, up-facing street
- street_mesh.py: continental zebra markings (0.5 m bars, 0.5 m gaps, 3 m band) at all three signalised crossings, triangles not quads (FBX SDK refuses to triangulate the crown-twisted quads), stripes +6 cm above the DEM so they stay above the road surface; winding flipped so every street surface faces up (road/sidewalks/markings were 100% down-facing and invisible in engine once the terrain stopped covering them). - terrain_from_dem.py: cut a 10.7 m corridor around the Hollywood Blvd centreline so road, kerbs and sidewalks are not buried under the terrain; sidewalks themselves cover the transition band, walk-check stays at 0 holes. - Blender builders save with a writability guard + fatal failure: *.blend is LFS-lockable and checks out read-only; a failed save previously left downstream steps building from stale files. - ue_import_site.py: Crossing_Markings imports with no collision (paint on the road); ue_build_demo_map.py stages it and chmods the lockable .umap before saving (save_map silently returned False on read-only maps). - ue_build_review_map.py: demo-crossing camera moved to the real crossing (s=130.1 m -> UE -24291,-1340) and fixed the ensure_writable path (was missing the .umap suffix, so the chmod never fired).
This commit is contained in:
1 parent
985dfcbac7
commit
bc2e421d33
20 files changed
+133
-36
No files matched your search
+18
-4
@@ -27,7 +27,10 @@ def log(msg):
|
||||
unreal.log(str(msg))
|
||||
|
||||
|
||||
def import_fbx(path, name, collision):
|
||||
def import_fbx(path, name, collision="complex"):
|
||||
# 5.8 note: there is no FBX import 'no collision' switch exposed to Python;
|
||||
# a default import simply generates no collision primitives, so collision="none"
|
||||
# means: skip the trace-flag step below and leave the body setup empty.
|
||||
task = unreal.AssetImportTask()
|
||||
task.filename = path
|
||||
task.destination_path = DEST
|
||||
@@ -58,10 +61,16 @@ def import_fbx(path, name, collision):
|
||||
# something to stand on. Terrain and street get complex-as-simple: a simple
|
||||
# hull would ramp straight over the kerbs.
|
||||
#
|
||||
# UE 5.8 exposes this only through StaticMeshEditorSubsystem (the mesh itself
|
||||
# UE 5.8 exposes this only through the body setup's trace flag (the mesh itself
|
||||
# has no trace-flag property, and the subsystem has no setter in Python), so
|
||||
# the import path sets the body setup's trace flag through the mesh's
|
||||
# collision options at import, then verifies it by reading it back.
|
||||
# the import path sets the body setup's trace flag, then verifies it by reading
|
||||
# it back.
|
||||
if collision == "none":
|
||||
box = mesh.get_bounding_box()
|
||||
mn, mx = box.min, box.max
|
||||
log(f"{name:18} import ok size=({mx.x - mn.x:.0f}, {mx.y - mn.y:.0f}, {mx.z - mn.z:.0f}) cm "
|
||||
f"min_z={mn.z:.1f} collision=none")
|
||||
return
|
||||
trace = (unreal.CollisionTraceFlag.CTF_USE_COMPLEX_AS_SIMPLE
|
||||
if collision == "complex" else unreal.CollisionTraceFlag.CTF_USE_SIMPLE_AND_COMPLEX)
|
||||
try:
|
||||
@@ -83,6 +92,11 @@ def main():
|
||||
return
|
||||
for path in files:
|
||||
stem = os.path.splitext(os.path.basename(path))[0]
|
||||
# Crossing markings are paint on the road surface — no collision at all,
|
||||
# so the player never stands on a 1 cm lip at the band edges.
|
||||
if stem == "Crossing_Markings":
|
||||
import_fbx(path, stem, "none")
|
||||
continue
|
||||
collision = "complex" if stem in ("Terrain_DEM", "Road_Hollywood",
|
||||
"Sidewalk_South", "Sidewalk_North") else "simple"
|
||||
import_fbx(path, stem, collision)
|
||||
|
||||
Reference in new issue
Block a user