Some lightmaps don't save?

Hey guys,

I’m new to UE so forgive me if this is a bit basic.

Yesterday I was working on a small kitchen scene that I’m using as a test bed to teach myself UE4. I had baked the lightmaps (using VRay) and everything was displaying correctly; I even rendered out a short animation and was reasonably happy with the result. I saved the project, closed UE4 and went home.

Today I open the project back up and some, but not all of the actors appear to have their lightmaps displaying incorrectly - see attached image.

It also says that some 321 objects have unbuilt lightmaps. They were fine when I saved the project yesterday.

Why should this be?

The meshes with the “?” mark look like the lightmaps didn’t stream the full resolution light maps into memory. I forget all the tricks to fix it, but sometimes giving the editor an extra 5 minutes to load everything, increasing the texture streaming pool size, hitting play and going back to the level, etc. Also cutting back on the number of high resolution light maps help.

make sure your lightmap cache is big enough. You can increase the size in the DefaultEngine.ini in the Config folder.

[/Script/Engine.RendererSettings]
r.Streaming.PoolSize=2048

This would set your pool to 2048 MB. I think 1024 is default or at least it was in the past. You may need to restart the editor.

Remember that your client may not have the same video card as you. I wouldn’t recommend to set it to very high values to avoid surprises. Better to find the cause what eats all your cache memory here. To do that you can look at the Statistics AFTER you have build the lighting. Check Build->Lighting Info->Lighting StaticMesh Info. Then in the next window choose “Texture Stats” and “Static Mesh Lighting Info” from the drop down list on the top left.

If you find out that your 4K textures eat all your memory then you can reduce their size in the editor. Click on the Name of the offending texture in the list and then in the texture editor set the LOD Bias to larger than “0”. “1” will set the max size to 2048 and “2” will set it to 1024 and so on.

4K textures use about 22 MB each so 100 of them would use something like 2 GB of cache memory. Some texture sets have 4 or more textures so that means 25 of those sets use already 2 GB of memory leaving no space for any light map. It might in reality not be that bad but maybe use 4K textures only when absolutely necessary.

Same goes for 1024 or 2048 light map resolutions. Be mindful - nothing is free in Unreal.