Is there a way to bake real-time lighting?

I know that the answer is probably no, but is it possible to use only movable lights to make proper lighting in level and then bake result to lightmaps and use static lighting with those lightmaps? Unlike baking static lighting, this method wouldn’t require you to wait hours for lighting calculations and a result might be good because you can use as many lights as you want to do light sculpting of your level.

I don’t think it’s possible without changeing deeply current lighting pipeline. Way real time light work is CPU sends light source and other infromation to GPU, then GPU by shader programs degenerates pixels on screen (not world, main reason why it is so fast) and light data don’t go back to CPU and if any it usually already processed data.

That said i think it’s technically possible bake lighting by GPU which should be faster they doing so on CPU and it seems there was attempts to do so

https://forums.unrealengine.com/development-discussion/rendering/1460002-luoshuang-s-gpulightmass

I also know this answer is getting “meh!”…but some kind of yes. The answer is RTX :slight_smile: so to answer the question to bake real-time lighting = no, because of realtime says it all-no bake…you can go with stationary as some way in the middle (can change color, intensity without baking) but your explicit use case, to work most of the time with mobile lights - RTX will give you the power to do so while holding your FPS on a solid level. Baking the mobile lights I don’t think it is possible. By RTX I mean RayTrace as general - not sure if other cards thant the nvidia rtx are available to do to be honest

Maybe I’m wrong, but your approach with pixels on the screen is valid for deferred rendering. What about forward rendering?
I know about the GPU baking plugin, but it’s not what I need.
I know that, for example, Substance Painter can bake scene lighting (which is dynamic, even if it uses HDRI image as a light source) into textures (- YouTube). So technically, I guess it’s really possible, even if realization will be much complex in UE4.
Maybe it’s possible to setup lightmass settings with the lowest possible values to make it really fast, so the baking result will be similar to movable lights and then convert your movable lights into static to build lightmass in such way. Need to make a test, but guess it’s still a workaround, which won’t work fast if you have hundreds of lights on the scene.

I think RTX is not an option for at least 5-10 years. And I guess it won’t be suitable for all visual styles (hand-painted/anime/toon/stylized/etc).