Lightmass crashes, no matter what

Ok, I’m working on one more level for my game. But when It comes to building light, my computer freezes for 5-10 minutes, then I’ll get an error saying this

It’s a forest level and all I have are foliage and one static mesh. The highest Lightmap Resolution I have is 128, the lowest is 4, and the one static mesh is 64. It’s not a large level. By looking through the forums, I set my virtual memory to 100GB, since I only have a 8GB RAM installed. Here’s the amount of foliage I have in my level


Hello SoraJr,

The proof is in the error message. You are running out of memory. Despite the scene not being very large I see 2.5K pine trees in your scene. Each of these is over 10k in polys. So take that and multiply that 2.5k times. Then your have 5.06k smaller bushes. Each of these are around 1-4k. I believe your computer cannot handle that many computations when building lighting. Try using the reapply tool and setting the density to .6 or .75 and seeing of you can cut back on some of that. Then try and build your lighting again.

I actually went ahead and set the density to 0.5, and while I was at that I cut down on some other foliage to see if it’ll fix my problem. But the lightmass is still crashing.


Thank you for your reply, I actually took out a lot of trees. The pine trees was originally at 3.55k and now it’s at 2.51k. I’ll try the reapply tool and get back to you.

Interesting, is this the only project that this happens in? If so would you provide a link to it so I can test this on my machine? Also you may try cutting down on the 3.15k bush’s. 1k is starting to stretch things thin as far as memory. Especially if they are dynamic and are casting any kind of shadows.

Hello Sora,

You may also try setting your light map resolution on your mesh’s down to something like 32 or 64. After consulting with another member of our team I have learned that setting to a lower resolution can help with build times. This is due to the way that the light mass is calculated. Instead of a dynamic light that updates every frame and calculates a mesh’s properties and returns a value on a per mesh basis, you have a baked lighting calculation. Setting to higher values can cause a strain on your GPU.

For extremely large scenes you may even be able to set this to a value of 16 or lower.

Sorry for the late reply, finals are here haha. Ok, so since my scene isn’t large at all, I set the lightmap in the foliage tool for the bigger trees to 64 or 32. Those two are the highest and the lowest is 4. I’m still getting a crash. As requested, here’s a LINK to my project

Hey Sora,

I was able to build lighting in your project. It did take around 10 mins on my computers specs.

OS Windows 7 Professional

Intel(R) Xeon(R) CPU ES-2620 0 @ 2.00 GHz 2.00GHz

32GB Ram

GeForce GTX 770
Version 347.09

I did receive warnings about your lightmap being quite large. I then reduced the lightmap of all of your foliage to 4. This did not seem to change the warning. These are just warnings and as such do not adversely affect your scene. However, I was unable to determine why your lightmap resolution was so large or why it takes so long to build. I ended up changing everything over to dynamic lighting and playing around with Culling distances for the shadows and for your instance static mesh. This improved your FPS anywhere from 20 - 40 FPS in places.

My only guess for your crash is, when calculating, you run out of VRAM. You could try to switch to fully dynamic lighting and see if that fixes your issue. In certain situations dynamic lighting can be less expensive than a large light mass calculation. The other suggestion would be to build another scene, use just foliage and no Blueprints or Post Processing, and see if it crashes there.

Thank you for finding a solution and helping. But so I can understand more, because I’m still in the process of learning, did you change the lightmap resolution in the foliage tab or in the static mesh editor per tree? When you say “everything over to dynamic lighting” you mean you changed the skylight and directional light to moveable right? Lastly, could I please ask for the culling distances used for the shadows and instance static mesh I used in the level? Please and thank you. Sorry if it seems as if I’m asking too much, but I’m definitely going to rebuild light a lot. I’m making that level into a night scene and I’m going to change some trees around.

Correct, I changed my lights to movable. I changed in both the mesh’s details panel and within the foliage options for the light maps. I believe the culling distance was a good ways out, around 4000 - 5000. That’s around the point I don’t want to start seeing grass. I believe the cascade shadows are about the same distance as the culling and then the distance field shadows, after enabling mesh distance fields, set to the same so they take over after the cascades end. We are here for our communities support. As long as it’s questions that pertains to the original issue that you may need clarification on we won’t encourage the opening of another thread.