There are a few things that Unity isn’t telling us about (or explaining) when it comes to how light baking works.
One of those things is that you can’t bake large outdoor areas (takes forever and it creates hundreds of Clustering jobs). Why? I can’t see why a distance-capped raytracer would have more trouble in a roofless environment than in a similar (or (as I tested) more complex) indoor environment. (but maybe I don’t know what is relevant towards “complexity” in this case)
How do you solve ambient light for your outdoor areas? Say you’re making Cities: Skylines or just any outside landscape whatsoever.
How do you handle ambient light, ambient occlusion, and shadows? (prefferrably in a way in which you can also rotate the directional light afterwards)
Another of those seemingly undocumented things, is that Unity has a default of 10GB of GI Cache (for storing light baking data) and once those are filled up by one job, Unity seems to just freeze the baking process WITHOUT TELLING YOU A THING ABOUT IT.
Anyway, with my outdoor area, I set my GI Cache to 40+GB and even those are now full with the clustering stuck at ~50%. The area is mostly made of a scattering of box-like buildings.
What say you?
PS:
Did anyone document what all the stages of baking are? What does “Clustering” actually mean, etc.? WOULD BE A BIT HELPFUL to know what kind of automagics are going on.
My guess would be that you simply have too high of a (indirect) resolution for the size of the scene.
Bake doesn’t freeze when you reach GI cache limit, it starts replacing oldest files with new ones. It might be problematic though if the scene requires more stuff than the cache limit allows, but then it’s also a good tell that resolution is definitely too high.
All of the stages are printed out in the logs with their times, but I’m afraid there is no docs explaining what happens in every one of them
The thing is that my Realtime Resolution is 2, and my Baked GI Baked Resolution is 20. (already pretty low)
Is there a way to have a super low resolution lightmap (like 1 and 5 instead of 2 and 20), and then also make a high resolution lightmap for only some geometry? I don’t think we can choose which lightmap a certain object should sample.
If the surface of the world is large (even though it’s split into small meshes (even the ground)), you get a lot of generated lightmaps. >10 light + directional maps. Which is to be expected. But Why does it take so long?
It seems like I can have nothing but flat ground tiles in the game and if there are a lot of them, it will still take forever and generate a lot of cache, simply because the surface is large. Whereas an intricate indoor scene with a lot of objects and light bounces takes less because there’s less surface. Am I crazy or is this normal behaviour, and is surface area the achilles heel?
I also heard others say something along the lines of “you can’t (it’s hard to) bake outdoor areas” but I can’t find the posts right now. Which is why I kinda want to know what people do when they -do- need to bake outdoor areas. I suppose I could put my meshes in a 3D modelling program and bake a lightmap there but that’s a hassle.
Yes. Select the object you’d like to change the lightmap resolution of. In your Lighting window, press the Object button. You can tweak lightmapping settings for the object there. For example, you may find that large meshes need the Advanced Parameters set to something like the Default-VeryLowResolution preset.
I think I should be able to work something out now. Thanks for the help.
For the record, I would appreciate it if in the future we had some guide from Unity, not just with general descriptions about GI, but with examples of values; along the lines of “Here is an example of what values you could/should use for an outdoor landscape”, “Here are some recommended values for a city scape”, “here are some values for this indoor showcase scene”.
EDIT
I hadn’t seen this. Excellent!
The reason I was using 2 and 20, or 4 and 40, was the tooltip saying the Realtime Resolution should be an order of magnitude smaller than Baked Resolution. So x / 10. Now that I know it can be 0.01 I’ll do that.