I’m havig a strange issue, I’m using baked static lighting for static objects in my game, and after lighting build, I play on editor and everything works fine:
As you can see is the same map on the same conditions, the only difference is that the first image is from PIE and the second is the packaged game.
I tried to look on answershub but I did not find any similar issue, as you can see the shadows are exactly the same in both cases, the lighmaps work perfectly on all objects and there is no “preview” on packaged shadows, the problem is that those objects are casting dynamic shadows as they don’t have baked lighting, wich has an impact in the game performance…
¿How can I fix this?¿Is there some parameter in packaging setting wich forces this precompiled shadows to get packaged?
EDIT:
If I build with the Build button It does’t work neither, and if I save all after build and close and reopen the editor I lose the lightmaps again, there is no way to keep them saved.
You didn’t press the build button. Build button not just select build light only. If you just click the build light only it just build the light in the scene. Not with the model together with the light itself. I guess your lighting quality should choose production. Should be good. That’s what is all about.
By the way i don’t put too much cast shadow into it. I still not that good handle with this shadow stuff. I will just keep trying on piece by piece with it.
Really, do you have any photo might be post it all here. I saw your photo have 64 units need to rebuild the light. I am the new hand with this software for a few months and this is most common case that the user forgot the click the build.
As you can see, the same levels are shown, and the images are exactly the same but the error is still there…
In our project we have all point/spot lights in their respective levels and the directional light and the skylight are in the persistent level.
The settings for our lights in the build time are:
SkyLight → Static
DirectionalLight → Movable
I have some errors when packaging (attached), I have lots of warnings like those:
LogTexture:Warning: Failed to stream mip data from the derived data cache for /Game/Maps/RG/Torreon.HQ_Lightmap0_54. Streaming mips will be recached.
LogTexture:Display: Building textures: HQ_Lightmap0_54 (AutoDXT)
LogTexture:Warning: Failed to stream mip data from the derived data cache for /Game/Maps/RG/Torreon.HQ_Lightmap0_28. Streaming mips will be recached.
LogTexture:Display: Building textures: HQ_Lightmap0_28 (AutoDXT)
LogTexture:Warning: Failed to stream mip data from the derived data cache for /Game/Maps/RG/Torreon.HQ_Lightmap0_68. Streaming mips will be recached.
LogTexture:Display: Building textures: HQ_Lightmap0_68 (AutoDXT)
LogTexture:Warning: Failed to stream mip data from the derived data cache for /Game/Maps/RG/Torreon.HQ_Lightmap0_59. Streaming mips will be recached.
LogTexture:Display: Building textures: HQ_Lightmap0_59 (AutoDXT)
LogTexture:Warning: Failed to stream mip data from the derived data cache for /Game/Maps/RG/Torreon.HQ_Lightmap0_55. Streaming mips will be recached.
LogTexture:Display: Building textures: HQ_Lightmap0_55 (AutoDXT)
LogTexture:Warning: Failed to stream mip data from the derived data cache for /Game/Maps/RG/Torreon.HQ_Lightmap0_50. Streaming mips will be recached.
LogTexture:Display: Building textures: HQ_Lightmap0_50 (AutoDXT)
Sorry the directional light is stationary, not movable.
Use only static lights is not a solution for my problem, I have dynamic actors that must be illuminated…
Please, I need help, it would be amazing to get this working before next week.
I can provide all the information you need to fix this. (At the moment I’m checking some blueprints made by the artists to see if it’s all ok)
Same problem here. All of my lights are static. I build (using the build button rather than build lighting only), see that the message isn’t in PIE, package the game, and see that the message is in the packaged game.
Also, I have to rebuild lighting every time I restart the editor. This might be related to needing to recompile my function libraries and a BP every restart.
I found the answer!!!
The problem (in my case) is that I was using randoms inside the construction scripts of the ground blueprints to randomly load one mesh or another.
The construction script is called when packaging the game and when restarting the editor and if the random mesh is different it generates the error.
That detail mesh is selected with a random that swiches between 3 different meshes, obviously if the next time that I restart the editor the mesh is different, the previously baked lighting is invalid.
OhiraKyou I hope that this helps you to solve your problem.
We solved this by selecting the detail mesh by its world position and not using any random at all.