Add first pass sky lighting

This commit is contained in:
2026-05-16 01:32:48 -07:00
parent 06508061da
commit dddac97658
7 changed files with 311 additions and 21 deletions
+11 -18
View File
@@ -68,25 +68,11 @@ DEMO_ACTORS = [
"rotation": unreal.Rotator(0.0, 135.0, 0.0),
},
{
"label": "AGR_DemoSun",
"class": unreal.DirectionalLight,
"location_xy": unreal.Vector(-22000.0, -9000.0, 0.0),
"fixed_z": 35000.0,
"rotation": unreal.Rotator(-42.0, -35.0, 0.0),
},
{
"label": "AGR_DemoSkyLight",
"class": unreal.SkyLight,
"label": "AGR_DemoSkyLightingController",
"class": unreal.AgrarianSkyLightingController,
"location_xy": unreal.Vector(-18000.0, -7000.0, 0.0),
"fixed_z": 12000.0,
"rotation": unreal.Rotator(0.0, 0.0, 0.0),
},
{
"label": "AGR_DemoFog",
"class": unreal.ExponentialHeightFog,
"location_xy": unreal.Vector(-18000.0, -7000.0, 0.0),
"fixed_z": 4000.0,
"rotation": unreal.Rotator(0.0, 0.0, 0.0),
"rotation": unreal.Rotator(-42.0, -35.0, 0.0),
},
{
"label": "AGR_DemoNoticeActor",
@@ -97,6 +83,12 @@ DEMO_ACTORS = [
},
]
LEGACY_DEMO_LIGHTING_LABELS = {
"AGR_DemoSun",
"AGR_DemoSkyLight",
"AGR_DemoFog",
}
BIOME_RESOURCE_ACTORS = [
{
@@ -330,7 +322,7 @@ def spawn_foliage_actor(height_values):
reserved_points = [
spec["location_xy"]
for spec in DEMO_ACTORS
if spec["label"] not in {"AGR_DemoSun", "AGR_DemoSkyLight", "AGR_DemoFog", "AGR_DemoNoticeActor"}
if spec["label"] not in {"AGR_DemoSkyLightingController", "AGR_DemoNoticeActor"}
]
foliage_actor = unreal.AgrarianEditorAutomationLibrary.spawn_actor_in_editor_world(
@@ -405,6 +397,7 @@ def main():
raise RuntimeError(f"Could not load map: {MAP_PATH}")
labels = {spec["label"] for spec in DEMO_ACTORS}
labels.update(LEGACY_DEMO_LIGHTING_LABELS)
labels.update(spec["label"] for spec in BIOME_RESOURCE_ACTORS)
labels.update(spec["label"] for spec in WATER_SOURCE_ACTORS)
labels.add(FOLIAGE_LABEL)