Hi,
We’ve been trying to stand up baking of static lighting on CI, for World Partition maps; using the WorldPartitionStaticLightingBuilder via the WorldPartitionBuilderCommandlet.
We’re using WorldPartition for our maps to minimize actor overhead for actors outside of our relevant space, and so that we can take advantage of data layers.
This is also a mobile title - if that matters for this topic
We’ve run into a couple issues, we’ve fixed a couple things. But some issues remain unsolved.
Issues we’ve encountered:
issue 1 - If you use the two step process where the mappings are deferred till the second phase, the generated static light maps are dropped before export, and lost.
This was due to a missing value in a copy constructor.
issue 2 - We were getting an out of memory crash when an artist was using GPU Lightmass.
Digging into the logs, we found this:
LogLightmassSolver: Warning: Volumetric lightmap grid size is too large which can cause potential crashes or long build time, clamping from (2049, 2865, 1030792152) to (2049, 2865, 3200)
In StaticLightingBuildContext.cpp, the bounds of the volumetric lighting grid are determined like so:
VolumetricLightMapGridDesc->Initialize(InWorld, InWorld->GetWorldPartition()->GetRuntimeWorldBounds());
GetRuntimeWorldBounds() takes into account all the actors in the world.
The issue was that AMapBuildData actors which are generated to store per cell build data, are generated with bounds that reach to +-HALF_WORLD_SIZE in the Z axis. This comes from the Streaming Cell, which is based on a 2D grid.
The first bake is ok, but any subsequent has polluted RuntimeWorldBounds() resulting in oversized Volumetric Lighting Bounds.
issue 3 - The static shadows aren’t showing up in the Editor after a commandlet bake.
We have verified that the MapBuildData entries for a mesh do contain the light map and shadow map data.
Also they do show up at runtime in Mobile device builds.
We have seen static shadows show up in editor after an in-editor bake, but these may be using the “preview path”
We could use some assistance in tracking down the issue #3, as well as a critical eye over our fixes for 1 and 2.
[Attachment Removed]