How to rebuild lights programmatically?

Hello.

I plan to realize game with Build Mode.

Now I simple spawning Static Mesh on click and I see, that I must to rebuild lights.

http://s6.postimg.org/f80dd9nch/screenshot_90.png

I know, how to rebuild lights in Editor…

But how to rebuild lights on-fly?

How to rebuild lights programmatically? The game must do it, after player exited Build Mode…

Light building cannot be performed at runtime.
It takes a significant amount of time and is handled in part by an external application.

You could make your scene entirely dynamic, in which case there would be no lighting to build.

Distance field lighting is surprisingly performant and requires no baking, you should look there.

Depending on the number of lights you will begin to run into performance issues.
Figuring out what the limits are on lighting will be very specific to your game, so it’s a matter of trial and error to see how much lighting can be done with distance field lighting.

I can’t understand this tutorial :)…

Look, I turned on

And tunned my Light:

But it still shows error:

What I need to do to fix this?

Yep, I did it!

I switched Mobility of the light to the Movable and it’s work good!

http://s6.postimg.org/lfgcr68hd/screenshot_96.png

Now no error:

http://s6.postimg.org/kr7i889rl/screenshot_97.png

Thank you very much!

great! sorry i didn’t see your messages in time to help, but glad you got it :slight_smile:

In any case, thank you very much, you helped me figure out how to fix the error. :slight_smile:

Calben, I got issue with lighting - Lighting bug? - Rendering - Epic Developer Community Forums - is it bug or my mistake?

is your issue completely resolved now?

Hi, Calben! Yes, it’s resolved by re-creating (dublicating) BP. I’ve created dublicate of old BP and removed old BP. After that new BP doesn’t flickering. I don’t know, why old BP of the Static mesh was flickered…