Download

Build light at run-time

its really needed especially for procedural level building . there is a lot of topics and request for t from 2 or 3 years ago , but i couldn’t find any solution for that.
i hope epic have decision to add this feature in UE4 .

thanks

Not gonna happen.

Building lighting is far too slow for that to make sense. Your players would get really angry really fast if loading a new level takes 10 minutes.

Well, dynamic lightning is exactly what have been requested here. And it always part of UE4 :wink:

Lighting is build by the CPU, isn’t it? And most computers used for gaming have multiples of those.
Wouldn’t it be possible to build static lighting at runtime using idling CPUs? It would take a long time but since it would hardly affect the gameplay, I don’t see much of an issue.
Just start building the next dungeon floor as soon as the player enters the current one and lighting is ready once he tries to enter the next floor, hopefully.

There surely are limits how complicated the lighting setup could be to have reasonable building times but a game specifically build around that feature should be possible.
But maybe this is more of a home brew feature since not many developers would use this.

Unless you have a dedicated server board with Xeons, you have usually one CPU per PC. Dont confuse multi-threading with the number of CPUs…
Also, imagine someone creating a game for mobile, or console…

You have to sit and wait. I cant imagine a bigger impact on gameplay as a “stand by” screen.

Technically, you might be right. The term CPU is usually used for the physical unit and its periphery. To be more precise: i meant modern gaming computers have multi core CPUs.
Multi-threading is also not related to the number of cores. You can run multiple threads on a single core on a single CPU.
Modern gaming consoles also have multi-core CPUs so that should not be a problem. Also, there is nothing wrong with making PC exclusive games.
As I said, it probably wouldn’t make sense as an engine feature, but if absolutely needed, it should be possible.

Thats why you would need to work around that and build lighting on a separate core while the player still enjoys the content that was build earlier. Similar to the concept of level streaming but with more long-term planing.

Players PCs are also likely to be much slower than our dev ones. I can’t really see how you want to use this, even if it’s running in the background, it will still take a ridiculously long time compared to the player building stuff.

On screen in game message “Please walk around while lighting is being built for the next 20 - 40 minute, enjoy!”

Brings you back to the days of the first single speed CD-ROM drives.
I remember that the CD version of Strike Commander actually had a little pong like minigame (with a CD icon) during loading :smiley:

The amount of unused resources available wouldn’t be much, most of the CPU would be in use and if you were rendering then you’d have to have the geometry and assets loaded into memory to do that as well which could be impossible if the level is large enough.

Isnt Unity using real time lightning rendering? why it isnt possible in UE? well, the only thing i know is, a lot of people i know, migrated to unity just because they cant stand 30 minutes everytime they need to build the lightning in a medium sized scene. And in big projects, you build the lightning constantly… o.O

Unity has a few options available–their main lighting system uses Enlighten, which still has very long build times but allows you to animate lights afterward. They recently updated with an alternate system but it’s based off the camera view, so it will bake lighting within the view but still takes time. In my experience it takes longer to build lighting in Unity.

In my experience (4 years with unity) it takes far far less time to build lightning. In fact, there is not even possible comparisson. Thats why im so surprised that unreal engine doesnt have a better way to handle it. I switched to unreal engine because, well, the material editor, the terrain editor, blueprints, the cascade editor, etc, etc, but talking about lightning… oh my. It needs to improve soooo much with respect to unity and other engines…

It depends on what light you’re baking, the preview light building is really fast (but low quality). If it’s slow you’re probably using the wrong settings.

The only issue I have with the UE4 lighting system is that it processes objects on individual threads, which causes slight lighting variations between objects and can slow down rendering where a thread is bogged down with a large object while other threads are unable to help. In my experience with Unity, it’s difficult to match the same speed as UE4, and it’s very buggy, especially in earlier versions where lighting was just unusable due to particular bugs.

I think Unreal’s Lightmass needs an option to batch Objects together.
Batched Objects are processed on the same thread, which should reduce the Light Variations.
Either a Volume like the Importance Volume or an explicit Grouping would be nice.

Unreal Engine 4 does have dynamic lighting…

I already asked for that back in 2014.
The answer(s) I got were that they dont want to have the game designer to edit/maintain other explicit grouping structures; by design.
Also another alternative (threads dont process per mesh but per bounce) was not met with great enthusiasm.
I dont think they will overhaul lightmass for that…

Can’t you merge the objects using Merge Actor to have a bunch of objects use the same lightmap?