There is a day-night cycle in my mobile game with a big open world. It has a multi scene setup (small scenes loading and unloading as player explores the world). Time of the day doesn’t change in a moment - it changes smoothly. So I think of a few options what can I do with shadows:
Use only real-time shadows (the easy one but this is not good for performance especially on mobiles);
Bake 2-3 light maps for different time of the day for every scene and switch it;
I have an idea that I could make a lightmap of a currently opened scene every 10-20 seconds for example and apply it. But is it possible to make a lightmap in runtime?
So what is the best one? Or am I missing something? Anyways I would very appreciate all suggestions!
For mobile, you are very limited what you can do. And I doubt this game scenario is really suited for mobile.
Realtime shadows are mostly out of the question due to low-end hardware. You may can use some fake blow shadows for the most important characters.
There is no runtime baking. And if there would be one, you would be again bound by low-end hardware. The closest thing is Realtime GI with Enlighten but this does not generate shadows and it is also not suited for mobile or a huge open worlds.
You could bake your scene with different time of day, but do you really want to do such huge task?
It will take a lot of time to bake everything and consume a lot of memory depending how many different lightmaps you will have at which quality. Something you also have to consider for a game. Again you are bound by low-end hardware. A lot of consumer actually complain if a game takes too much of their very limited mobile memory.
The best thing you can do is simply change the ambient color and sky and directional light and that’s it for mobile. Anything more realistic and dynamic requires to be run on more decent hardware. The other way would be painfully bake every possible lighting scenario. Good luck.
The setup with directional lightning and short shadow distance (about 100) works quite good on latest smartphones actually, but I was looking for a way to optimize it. Anyways thank you!