Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

Keep getting "lighting needs to be rebuilt" when switching between light scenarios

Hi Guys,

I am currently fiddling around with the light scenarios feature in UE4 but I just don't seem to understand how it works. Moreso, every time I go ingame and switch dynamically between the different lighting scenarios that I have, it keeps popping up in the corner saying that the lighting needs to be rebuilt when I have already done so.

The lighting scenarios I have are just morning, afternoon, evening and night iterations of the lighting.

The master level blueprint has been programmed so that it unloads the current scenario before it loads in a new one. So there can only be one lighting scenario loaded in at any one time.

Can I please get some clarification for how lighting scenarios actually work?

Cheers guys, Goolog

Product Version: UE 4.20
more ▼

asked Jul 20 '18 at 11:53 AM in Rendering

avatar image

10 2 6

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

1 answer: sort voted first


So I'm sure (hope) you've seen this already, it's really straight forward... https://docs.unrealengine.com/en-us/Engine/Rendering/LightingAndShadows/PrecomputedLightingScenarios You have your main level with all the NON changing elements (meshes, foliage, ...)... Then you create your scenario levels one by one (setting them as lighting scenarios) placing the different lighting elements (skylight, reflection captures, directional light, well all the lights). Then you'll have to build light! You can build on selected levels or for all... and then you should be able to load/unload levels on your choice!

more ▼

answered Jul 20 '18 at 02:25 PM

avatar image

1.2k 3 4 8

avatar image Goolog Jul 20 '18 at 02:37 PM

Hi Makigirl,

I have looked at the documentation for multiple lighting scenarios. Question about the scenario levels, are you only supposed to put in the lighting entities themselves and not the geometry and meshes?

Also, I don't understand the difference between the Toggle Level Visibility button (the blue eyeball buttons) next to each of the maps and the Toggle Lighting Scenario buttons (the grey sun buttons). As far as I'm concerned, the Toggle Level Visibility buttons are the only buttons that seem to change which lightmaps are being streamed from the editor, which to me doesn't sound right as I would think that that was supposed to be what the Toggle Lighting Scenario buttons would do.

Thank you for your help so far!

avatar image Makigirl Jul 20 '18 at 03:00 PM


Yes!! I can only repeat myself: You have a main level with your geometry. And then let's say 3 "sub" levels with the specific lighting information! So basically your lighting scenario levels only contains the lighting elements! /or extra thing if you need at that time/

I'm not seeing Unreal now but as far as I remember the visibility button is for visibility/building purpose only, it has nothing to do with your "in game" part... In the editor you can see the selected (even more then one) scenario(s). ...and also this level will be built... /I think Unreal asks you if you really want to build only this level or all of the scenarios/ The grey sun is just the sign that it's a lighting scenario level... /again haven't used this feature lately so everything is from my dodgy memory! ;)/

If you want to change your scenarios IN GAME you'll have to do it using level streaming (blueprints)...

You should read more about the subject or watch a video tutorial! There are really good ones out there...

avatar image Goolog Jul 22 '18 at 06:56 AM

I fiddled around with the map again but I still can't figure it out. I understand what you're saying and I've got a pretty good idea of how you're supposed to use lighting scenarios but I am still having the issue where my lighting needs to be rebuilt every time I switch scenarios ingame. Makigirl, when you have time, could you please take a look at the map for me?

I have moved the map and any assets it requires from my project called RoomRenovation2018 to a new project called LightingScenarioTest. The zip file will include this. You should just be able to unzip it and open it in the editor. It requires the new 4.20 version (initially, the LightScenarioTest project was created in version 4.19.2 but I had to update it to 4.20 because it kept crashing on startup for some reason but this shouldn't really matter). You can use the 1, 2, 3 and 4 keys, to switch between lighting scenarios. I have made sure the lighting has been rebuilt, so you shouldn't have to rebuild it the minute you open the project.

Here is the link to the project zip file: https://www.dropbox.com/s/uzqc5dxxsf4f128/LightingScenarioTest.zip?dl=0

I know I am doing something else wrong but I just can't seem to figure out what it is.

avatar image Makigirl Jul 22 '18 at 11:25 PM


I think it should be ok... although you left your skylight in your persistent level... and the post process volume... I would put them into the scenario levels and then you can set them separately. I don't know why you get the error message, I think you shouldn't have. ...and you can see on the levels that they were built... So maybe all you need to do is to turn off onscreen messages...

"You could always open these levels individually and build lighting, then come back to your persistent and load them there. That should work, but it's a really hacky workaround and isn't a supported workflow. It used to work before lighting scenarios but may not anymore. I've not tried it in a long time. One side effect of that method though is that you will always get the warning about lighting needs to be rebuilt because the persistent level doesn't know if it's been built for these levels that are present. At that point, you can use the command "DisableAllOnscreenMessages".

avatar image Goolog Jul 23 '18 at 08:39 AM

It always seems to recognise that the night scenario has its lighting built and therefore, doesn't give me the warning when I switch to it. It is also the only scenario whose lightmaps actually look accurate. It also just happens to be the last lighting scenario on the list of levels as well as the last scenario that lightmass builds. The rest of the scenarios have inaccurate lighting. It seems that the engine gets lightmass to build all the lighting scenarios and then disregards all but the night scenario when it is finished and it only applies that one. When trying to switch from the night scenario to a disregarded one, it is those scenarios that still look as though they were never built in the first place but they were and therefore, show inaccurate lighting.

Here are some screenshots: alt text alt text alt text alt text Do note the preview watermarks on the walls in this screenshot. These show up in every scenario when in the editor and not ingame. At the time of taking these screenshots, I hadn't made any changes to the map whatsoever. I also did not use preview quality lighting. I used production quality.

As for the skylight and post process volume, I put them in each lighting scenario instead. The only problem here is that now I get error messages in the message log saying that only one skylight can be active per world. Which is why I put the skylight in the persistent level in the first place.

I tried rebuilding the lighting scenarios by going into each of their map files as you said but this did not work. However, it did make changes to the lighting for the scenarios but it still resulted in inaccurate lighting.

avatar image Goolog Jul 23 '18 at 08:41 AM

I think Epic need to revamp this whole lighting scenario feature because this sort of thing shouldn't be too hard to work out how to use and yet, it is proving very difficult to work with.

(comments are locked)
10|2000 characters needed characters left
Viewable by all users
Your answer
toggle preview:

Up to 5 attachments (including images) can be used with a maximum of 5.2 MB each and 5.2 MB total.

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question