lighting: fixed daytime rig, real surface materials, crossing fix
Fixed daytime lighting and basic ambience for the DemoMap: - Sun pitch -50 / yaw 120 (intensity 4, warm), sky light 2.6 with real-time capture, sky atmosphere, height fog, and an unbound post-process volume with fixed exposure (min = max brightness) so no shot washes out or crushes to black depending on how much sky it frames. - Root cause of the washed-out look was NOT the sun: Blender's flat diffuse colours do not survive the FBX->Unreal import. Every site material arrived white and the terrain arrived with WorldGridMaterial. The demo builder now creates and assigns M_Asphalt / M_Concrete / M_Ground / M_RoadPaint. - Crossing fix: each zebra band was its own object, so Blender renamed the duplicates .001/.002 and site assembly (exact-name append) kept only one. All bands are now a single Crossing_Markings mesh (36 verts, 3 bands). - Terrain gets a Ground_Earth material in the builder so it stops importing as a white grid. - Demo cameras: street-level no longer sits inside the facade body (was rendering its back face), and the crossing camera aims at the designated s=130.1 crossing (UE X -14956) looking along the crosswalk. Screenshots re-rendered; the four demo views are marked needs-review for the owner's approval. MEMORY.md records the material-import, exposure, light_color, band-naming and camera-bounds traps.
This commit is contained in:
1 parent
121c0398b0
commit
830ce596fa
37 files changed
+241
-82
No files matched your search
@@ -174,3 +174,12 @@ Scope: facts and traps that cost time to establish. Planned work lives in [TODO.
|
||||
- **`EditorLevelLibrary.load_level`/`new_level` are deprecated no-ops in `-nullrhi` commandlets** (they return without switching worlds, so staged actors land in whatever world is current and get saved over the wrong map). Use the `LevelEditorSubsystem`: `unreal.get_editor_subsystem(unreal.LevelEditorSubsystem).load_level(path)` actually switches. Symptom was ReviewMap containing Demo actors + `ShotSequencer`.
|
||||
- **Map-save ordering bug in `Tools/ue_build_review_map.py`**: the script saved ReviewMap *after* the DemoMap section, but the switch back to ReviewMap fails silently because the map only exists in memory at that point — so the final `save_map` wrote the demo world over ReviewMap. Fix: save ReviewMap first, then stage the demo cameras, and never switch back. Both maps verified by probe (ReviewMap lists Review actors; DemoMap lists Demo actors).
|
||||
- Rebuilt ReviewMap after the fixes: character, both cubes (A grounded, B floating at 2 m), pawn, NPC prefab, hero facade all present; user re-approved the shots. README cube naming corrected (README had A/B swapped vs the script).
|
||||
|
||||
## 2026-11-07 — Materials and lighting in the demo map
|
||||
|
||||
- **Blender flat diffuse colours do not survive FBX -> Unreal.** Every site mesh (road, sidewalks, kerbs, crossing paint) imported with a material asset that had a default *white* base colour, and the terrain imported with `WorldGridMaterial` (UE's bright grey grid). That — not the sun — is what made the demo look blown out and washed white. Fix: create the colours in UE (`M_Asphalt`, `M_Concrete`, `M_Ground`, `M_RoadPaint` via `Constant3Vector`) and assign them per actor in `Tools/ue_build_demo_map.py`.
|
||||
- **Auto-exposure makes review shots non-comparable**: the same road rendered washed-out in one framing and near-black in another because each camera saw a different amount of sky. Fix: an unbound `PostProcessVolume` with `AEM_HISTOGRAM` and `auto_exposure_min_brightness == auto_exposure_max_brightness` (fixed exposure). Do not use `AEM_MANUAL` + `auto_exposure_bias` — a bias of 11 blew the whole frame out.
|
||||
- **`DirectionalLightComponent.light_color` takes a `Color` struct, not `LinearColor`** (`unreal.Color(r=255,g=245,b=230,a=255)`); passing `LinearColor` raises a nativize error.
|
||||
- **One band per object loses geometry downstream.** `crossing_band()` created `Crossing_Markings` each call, so Blender renamed the second and third to `.001`/`.002`; `site_assembly.py` appends by exact name, so only one crossing ever reached the game. Build all bands into a single mesh instead of one object per band.
|
||||
- **Street arc length -> UE X:** s=0 is the west end of the block (UE X −27966 cm) and s increases eastward, so the designated mid-block crossing at s=130.1 m is UE X ≈ −14956, not the −24291 used by an earlier camera (that is the s=36.6 crossing).
|
||||
- **Camera placement in the demo map needs the mesh bounds, not intuition.** The hero façade body spans UE Y −1457..−200, so a "street level" camera at Y −400 is *inside* the building and renders its unlit back face. Read `get_bounding_box()` on the staged meshes before choosing a camera.
|
||||
Reference in new issue
Block a user