Why can't I bake lights?

Hello !

I have a scene where I got a sun light and nothing else. Every static meshes are in static light mode. But though when I click on build lightning only it does not work and it still shows me in red “LIGHTING NEED TO BE REBUILD”. I have no error message.

I don’t know what to do. Please help me !

Thank you !

Hi AnonymeR77,

Can you look in your taskbar (bottom right corner) and make sure there is no icon there for Swarm Agent (Yellow/black icon with an S). If so, you can right click and close that then try to rebuild lighting again.

33321-swarmtaskbar.png

When you go to build lighting again this icon will open in the the taskbar. If you double click and open it you should see some movement going on in the three tabs that are there. The main tab (Swarm Status) should be what you need to see if it’s doing anything initially.

If you’ve got a big or complex scene with a lot of object light builds can take a while on a machine depending on hardware specification. Even high end machines can take a while when not networked with other machines to make this process faster. Lightmass is a very cpu intensive process.

If this ends up being the case, try using a lightmass Important volume around your playable area. This will focus the photon calculations for better lighting in this area specifically. It will help facilitate where lighting needs to get the most quality as well.

Let me know.

Thank you very much for helping me !

So I double clicked on the Swarm Agent icon, then I got a window with the baking status. But nothing is happening : the “distributed progress” bar keeps being at 0% and the log shows me an error :

21:24:13: Starting up SwarmAgent ...
21:24:13:  ... registering SwarmAgent with remoting service
21:24:13:  ... registering SwarmAgent network channels
21:24:13:  ... initializing SwarmAgent
21:24:13:  ......... certificate check has failed
21:24:13:  ...... initializing cache
21:24:13:  ......... using cache folder 'C:/Users/****/AppData/Local/UnrealEngine/4.7/Saved/Swarm\SwarmCache'
21:24:13:  ......... recreating SwarmAgent cache staging area
21:24:13:  ...... initializing connection to SwarmCoordinator
21:24:13:  ......... using SwarmCoordinator on RENDER-01
21:24:16:  ......... SwarmCoordinator failed to be initialized
21:24:16:  ...... initializing local performance monitoring subsystem
21:24:18:  ... initialization successful, SwarmAgent now running
21:24:23: [Interface:TryOpenConnection] Local connection established
21:24:23: [Interface:OpenJob] Error: Invalid namespace 

Thank you !

Looking at the error that is thrown there it says “Invalid namespace” and then looking at yours list:

21:24:13:  ......... using cache folder 'C:/Users/****/AppData/Local/UnrealEngine/4.7/Saved/Swarm\SwarmCache'

What is your user name for your computer? Surely, it’s not “****”

This is how mine appears:

4:14:53 PM: Starting up SwarmAgent ...
4:14:53 PM:  ... registering SwarmAgent with remoting service
4:14:53 PM:  ... registering SwarmAgent network channels
4:14:53 PM:  ... initializing SwarmAgent
4:14:53 PM:  ......... certificate check has failed
4:14:53 PM:  ...... initializing cache
4:14:53 PM:  ......... using cache folder 'C:/Users/Tim.hobson/AppData/Local/UnrealEngine/4.7/Saved/Swarm\SwarmCache'
4:14:53 PM:  ......... recreating SwarmAgent cache staging area
4:14:53 PM:  ...... initializing connection to SwarmCoordinator
4:14:53 PM:  ......... using SwarmCoordinator on RENDER-01
4:14:53 PM:  ......... SwarmCoordinator successfully initialized
4:14:53 PM:  ...... initializing local performance monitoring subsystem
4:14:54 PM:  ... initialization successful, SwarmAgent now running

Try checking under the setting tab in Swarm Agent and setting a new location for your Cache Folder. This can really be any folder location you’d like. On your desktop or just your C: directory if needed. That’d be a good place to start test what’s going on.

I changed the cache directory but it always happen the same way.
This is exactly what I wrote in the cache directory setting “C:/Swarm”.
The error is also the same as before. That’s weird because it was working before.

By the way I noticed another funny thing, I don’t know if it is linked but the red alert on the viewport tells me that there is 169 unbuild objects, but in my outliner, I only have 146 actors in my scene.

I’ll continue to look into this, but just to answer your question with the outliner. You can have fewer objects in the outliner if you’re using Blueprints that have multiple objects in them. For instance if I only have one thing listed in my outliner, but it says I have 5 objects unbuilt, that means that my BP more than likely has five meshes that need lighting built for it.

Does your computer name have any foreign characters (ie. Cyrillic) or numbers?

Have you tried reinstalling the engine at this point or using the verify option in the drop down menu for each engine in the launcher?

I tried reinstalling the engine twice without success.

My computer name does not have any special characters.

Thank you for helping me !

I know you mentioned that lighting would build before. Was that in this 4.7 build or 4.6? If it was 4.6 do you still have that version on your computer and can you try building any scenes lighting and see if that works. Also, have you tried building lighting in a template project to see if that would work?

This can be helpful in narrowing down if it’s project specific or tied to the editor.

Also, the “invalid namespace” still concerns me. I did see this post that had a similar issue with invalid namespaces, but it was with compiling C++. The user name for the computer had special characters.

In fact, before I was using the 4.5 version of the engine, and when it became free, I upgraded to the 4.7 version. I tried to make it work with the 4.5 and it works perfectly fine. I can’t really tell if I have ever been able to build the lights with the 4.7, but I think the problem comes from the engine itself.

I also created a new basic project in 4.7 but it did not worked.

And this is what is written in swarm’s log when it tries to set the cache folder.

21:09:50: … using cache folder ‘C:\Users\Remy\AppData\Local\UnrealEngine\4.7\Saved\Swarm\SwarmCache’

You’re still getting the “invalid namespace” error correct?

If so, can you try the troubleshooting in this post and let me know.