Inability to Build Static Lighting in 14.8+

Hello, I’m having difficulties with lightmass and swarm at the moment. I’m currently running 14.8.2 but this has been an issue since I upgraded my project to 14.8.

I currently have three different levels in my project. Two of the three have no issues building lighting. The third one, unique in the sense that it is the only one of the them to use an actual Landscape, Directional Light, and Skylight, Along with its much large size (strictly in terms of actual area measurements, not necessarily in content complexity.)

In this level when I attempt to build lighting, it spends 7+ hours exporting the data to the SwarmAgent and gets stuck there or just crashes. Swarm’s log also always contains the following after a failed light building attempt.

I try to queue the job in lightmass but then the SwarmAgent returns a bunch of errors during scene export. Most notably the following :

5:13:40 PM: [Interface:TryOpenConnection] Local connection established
5:13:40 PM: [Job] Accepted Job 31749101-4DA3380F-0E7A35AF-95D6A853
5:13:41 PM: [MaintainConnections] Local connection has closed (499B731B)
5:13:41 PM: [MaintainConnections] Removed connection 499B731B
5:14:23 PM: [Interface:EndJobSpecification] Error: The internal array cannot expand to greater than Int32.MaxValue elements. System.Runtime.Serialization.SerializationException: The internal array cannot expand to greater than Int32.MaxValue elements.
Server stack trace: 
at System.Runtime.Serialization.ObjectIDGenerator.Rehash()
at System.Runtime.Serialization.ObjectIDGenerator.GetId(Object obj, Boolean& firstTime)
at System.Runtime.Serialization.Formatters.Binary.ObjectWriter.InternalGetId(Object obj, Boolean assignUniqueIdToValueType, Type type, Boolean& isNew)
at System.Runtime.Serialization.Formatters.Binary.ObjectWriter.Schedule(Object obj, Boolean assignUniqueIdToValueType, Type type, WriteObjectInfo objectInfo)
at System.Runtime.Serialization.Formatters.Binary.ObjectWriter.WriteMembers(NameInfo memberNameInfo, NameInfo memberTypeNameInfo, Object memberData, WriteObjectInfo objectInfo, NameInfo typeNameInfo, WriteObjectInfo memberObjectInfo)
at System.Runtime.Serialization.Formatters.Binary.ObjectWriter.WriteMemberSetup(WriteObjectInfo objectInfo, NameInfo memberNameInfo, NameInfo typeNameInfo, String memberName, Type memberType, Object memberData, WriteObjectInfo memberObjectInfo)
at System.Runtime.Serialization.Formatters.Binary.ObjectWriter.Write(WriteObjectInfo objectInfo, NameInfo memberNameInfo, NameInfo typeNameInfo, String[] memberNames, Type[] memberTypes, Object[] memberData, WriteObjectInfo[] memberObjectInfos)
at System.Runtime.Serialization.Formatters.Binary.ObjectWriter.Write(WriteObjectInfo objectInfo, NameInfo memberNameInfo, NameInfo typeNameInfo)
at System.Runtime.Serialization.Formatters.Binary.ObjectWriter.Serialize(Object graph, Header[] inHeaders, __BinaryWriter serWriter, Boolean fCheck)
at System.Runtime.Serialization.Formatters.Binary.BinaryFormatter.Serialize(Stream serializationStream, Object graph, Header[] headers, Boolean fCheck)
at System.Runtime.Remoting.Channels.BinaryClientFormatterSink.SerializeMessage(IMessage msg, ITransportHeaders& headers, Stream& stream)
at System.Runtime.Remoting.Channels.BinaryClientFormatterSink.AsyncProcessMessage(IMessage msg, IMessageSink replySink)
Exception rethrown at [0]: 
at System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg)
at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type)
at NSwarm.IAgentInterfaceWrapper.AddTaskDelegate.EndInvoke(Hashtable& OutParameters, IAsyncResult result)
at NSwarm.IAgentInterfaceWrapper.AddTask(Int32 ConnectionHandle, List`1 Specifications)
at NSwarm.FSwarmInterface.EndJobSpecification()

Solutions I’ve already attempted with no success:

Deleting all foliage

Switch the directional and Skylight between Static, Stationary, and/or Moveable

Cleaning and Validating Swarming Cache

Deleting UE4 Cache

Disabling and then reenabling “Force No Precomputed Lighting” so as to “Flush” the map’s lightmaps.

Adjusting and readjusting Lightmass importance volumes.

Any further help would be greatly appreciated as I can’t proceed with the level setup further due to performance issues inherent with entirely dynamic lighting.

Thank you all in advance for taking the time to read this and help,

Riley L

Don’t know if you ever solved this but we had a similar problem where Swarm Agent would just display the gray (exporting) bar indefinitely and then eventually crash. Our problem was that UE automatically switched to the new lighting system (Volumetric Lighting as opposed to Sparse Samples). The new lighting system seems to be more taxing on our very large levels and unoptimized importance volume setup. Two solutions I found:

In World Settings > Lightmass:

  1. Reset Volume Lighting Method to VLM Sparse Volume Samples - this just worked out of the box for me
  2. Tweak:
    • Volumetric lightmap detail cell size - I bumped default 200 to 2048 (one of our streaming levels is silly large)
    • Volumetric lightmap Maximum brick memory Mb - seems to adjust how many sample to actually save, I bumped this slightly from 30 to 64 but higher values may = longer build times… maybe