Is it possible to bake lighting upon loading level?

Is it possible to have a map bake lighting when it loads?

I would like to create a procedural map where each piece has baked lighting, as dynamic lighting for the entire map is far too expensive. I’m hoping I can have an “upon load, generate map, then bake lighting”.

This is just a shot in the dark, I’m not surprised if this is not possible.

Thanks in advance!

Sadly it is not possible at the moment. Baking light is a very expensive process and is not meant to be used at runtime.

Alright, thank you. Not really surprised by this answer. Do you know of any other potential solution to this?

you can fake lighting on the surface of a mesh by using the dot product of the light direction vector and the pixel normal. You can often use the unlit version of the material if you use this method.

Thanks, do you know of any tutorials on this?

here’s an example of what the rock from the starter content would look like.

the rock and sphere on the right use the fake lighting.

the material is unlit so it won’t receive any shadows from other meshes, and the fake shadow only effects the surface of the mesh not the shadow the mesh casts.

I’m not sure if the ambient occlusion is mixed in the best way, maybe multiplying it with the bias value would be better.
not sure if the fresnel adds much to the material, if I was making the game I would experiment with it so I left it in.
This method looks ok on realistic games, but looks really good with toony style looking games and some vfx.

rather than using the atmospheric light vector you could make a fake sun actor bp and use a parameter collection to effect everything.

This is a gem! Thanks a lot for sharing this. :slight_smile: