lighting: fixed daytime rig, real surface materials, dynamic lights
Completes "Fixed daytime lighting and basic ambience" for 0.1.0. All 14 screenshots approved by the owner. Lighting rig (Tools/ue_build_demo_map.py): - Sun pitch -50 / yaw 120, intensity 4, warm (255/245/230), atmosphere sun light - Sky light 2.6 with real-time capture, sky atmosphere, height fog (density 0.008) - Unbound post-process volume with fixed exposure (min == max brightness) so a shot cannot wash out or crush to black depending on how much sky it frames - Dynamic-only: r.AllowStaticLighting=False plus MOVABLE lights and mesh components, so the editor's "LIGHTING NEEDS TO BE REBUILT" warning no longer fires and nothing needs baking Bugs found and fixed on the way: - Blender diffuse colours do not survive the FBX -> Unreal import: every site material arrived white and the terrain arrived with WorldGridMaterial, which is what actually made the scene look blown out. The demo builder now creates and assigns M_Asphalt, M_Concrete, M_Ground and M_RoadPaint. - Only one of the three crossings reached the game: each zebra band was its own object, so Blender renamed the duplicates .001/.002 and exact-name site assembly skipped them. All bands are now one Crossing_Markings mesh. - Demo cameras: street-level sat inside the facade body (rendering its unlit back face) and the crossing camera aimed at the s=36.6 crossing instead of the designated s=130.1 (UE X -14956). - The terrain had no material and imported as a bright default grid. - Cleared a committed Android File Server SecurityToken (plugin disabled and shipping-excluded; the value must stay empty). Docs: - Screenshots/README.md: one consolidated table for all 14 shots with map, camera view and description; all approved. - MEMORY.md: records the material-import, exposure, light_color struct, band-naming, camera-bounds and lighting-build traps. - TODO.md: lighting item marked done. Squash of branch gameplay-lighting-0.1.0 (PR #3).
This commit is contained in:
1 parent
1dbe737b85
commit
accf3a5306
38 files changed
+318
-126
No files matched your search
@@ -96,11 +96,28 @@ try:
|
||||
else:
|
||||
log("floor spawn failed")
|
||||
|
||||
if spawn(unreal.DirectionalLight, unreal.Vector(0, 0, 900), "RenderKeyLight",
|
||||
rot=unreal.Rotator(pitch=-38.0, yaw=35.0, roll=0.0)):
|
||||
log("staged: DirectionalLight")
|
||||
if spawn(unreal.SkyLight, unreal.Vector(0, 0, 1200), "RenderFillSky"):
|
||||
log("staged: SkyLight")
|
||||
# Lights are Movable and the project disables static lighting
|
||||
# (r.AllowStaticLighting=False), so no baked lighting build is needed and
|
||||
# the editor stops asking to rebuild lighting.
|
||||
sun = spawn(unreal.DirectionalLight, unreal.Vector(0, 0, 900), "RenderKeyLight",
|
||||
rot=unreal.Rotator(pitch=-38.0, yaw=35.0, roll=0.0))
|
||||
if sun:
|
||||
comp = sun.get_component_by_class(unreal.DirectionalLightComponent)
|
||||
if comp:
|
||||
try:
|
||||
comp.set_mobility(unreal.ComponentMobility.MOVABLE)
|
||||
except Exception as exc: # noqa: BLE001
|
||||
log(f"key light mobility not set: {exc!r}")
|
||||
log("staged: DirectionalLight (movable)")
|
||||
sky = spawn(unreal.SkyLight, unreal.Vector(0, 0, 1200), "RenderFillSky")
|
||||
if sky:
|
||||
comp = sky.get_component_by_class(unreal.SkyLightComponent)
|
||||
if comp:
|
||||
try:
|
||||
comp.set_mobility(unreal.ComponentMobility.MOVABLE)
|
||||
except Exception as exc: # noqa: BLE001
|
||||
log(f"fill sky mobility not set: {exc!r}")
|
||||
log("staged: SkyLight (movable)")
|
||||
if spawn(unreal.SkyAtmosphere, unreal.Vector(0, 0, 0), "RenderSky"):
|
||||
log("staged: SkyAtmosphere")
|
||||
|
||||
@@ -258,8 +275,17 @@ try:
|
||||
# 14 m back so the 14.5 m elevation fits: at 2 m the camera sees only
|
||||
# the colonnade's underside.
|
||||
("demo-spawn-view", unreal.Vector(-10722.5, -3500, 165), unreal.Vector(-10722.5, -1450, 700)),
|
||||
("demo-street-level", unreal.Vector(-11000, -400, 165), unreal.Vector(-10722.5, -1450, 500)),
|
||||
("demo-crossing", unreal.Vector(-23750, -1800, 480), unreal.Vector(-24291, -1400, 300)),
|
||||
# Street level, from the north sidewalk: the old camera sat at Y -400,
|
||||
# inside the facade body (which spans Y -1457..-200), so it looked at
|
||||
# the unlit back face. Y -2600 is on the sidewalk in front of the lit
|
||||
# elevation.
|
||||
("demo-street-level", unreal.Vector(-10850, -2600, 170), unreal.Vector(-10722.5, -1450, 400)),
|
||||
# The designated mid-block crossing. Street arc length runs from the
|
||||
# west end (s=0 at X -27966 cm), so s=130.1 m is UE X -14956, not the
|
||||
# -24291 the old camera used (that is the s=36.6 crossing). Camera sits
|
||||
# on the north sidewalk looking along the crosswalk itself, which is
|
||||
# the pedestrian's view and shows the zebra bars as bars.
|
||||
("demo-crossing", unreal.Vector(-15250, -2500, 400), unreal.Vector(-14956, 400, 150)),
|
||||
# the two north-side background buildings (TCL, Tussaud's) seen from
|
||||
# the south sidewalk, across Hollywood Blvd: their frontage and mass.
|
||||
("demo-north-buildings", unreal.Vector(-22800, -1000, 400), unreal.Vector(-22800, 3000, 300)),
|
||||
|
||||
Reference in new issue
Block a user