I am currently using probe volumes as the GI solution. However, the levels are loaded as additive. What is the recommended solution for handling the lighting when only one probe volume / set can be loaded at a time? Should this be managed by a script or is there a built-in solution?
I’m curious as well, bump
Hey,
You can choose Baking Set (instead of Single Scene) as a Baking Mode in the Probe Volumes panel. This way you can add multiple scenes in your baking set and bake them together. With this setup you should be able to bake all your scenes that are additively loaded in a single bake and into a single APV structure.
Note that only one baking set can be loaded at the same time (that’s why it should contain all the scenes that you want to load together), and that a scene can only belong to a single baking set.
Hope this helps !
Hi Maximeg,
I have been doing that but unfortunately Unity hard crashes and exits. I am using 2022.2.20f1. If I bake individual scenes it succeeds but they don’t hold because it wasn’t baked as a set and would not show during runtime. I am baking 19 scenes and that is about 10% of the all scenes that would be used in the game. The failure occurs when baking with CPU and GPU.
There was an issue with my HDRP package that was causing Unity to crash. I deleted the HDRP packages from the Package Cache and it has resolved the crashing.
Happy to hear the issue was solved !
I’m curious actually if there’s a workflow for…
Say I released a game containing 20 different scenes in total, including main menu, levels, etc.
For simplicity of an example, say I have 1 Baking Set for the 20 scenes.
While the game is already released on Steam (or wherever), I want to expand the game in monthly updates.
I add 3 new levels and now have a total of 23 scenes.
Would I have to rebake all 23 scenes’ lighting in 1 Baking Set?
I guess there’s no way around that cause the lighting of all of the scenes can impact each other, but just wanted to ask if there was any other workflow for adding scenes/levels additively to an existing game I’m working on.
Thanks!
The solution here would be to have multple baking sets in case some scenes are not meant to be loaded together at the same time.
Like the main menu scene could be in it’s own baking set i suppose.
If you have only one baking set then you have no choice but to rebake everything
Gotcha, thanks! This is helpful to know before I get started
Out of curiosity, is there a better solution now for this for open world games? I’m talking really large games where different parts of the level(cells) are additively loaded in/out.
Baking Sets don’t seem like a feasible solution, for two reasons:
-
Loading the entirety of the game is simply not doable. Unity will crash.
-
There is no “set” of scenes that will be exclusively loaded together. Instead, scenes can be loaded in many different combinations together depending on where the player is.
For example, imagine for whatever cell the player is in (each cell is a scene), that cell plus it’s 8 neighbors are loaded. If the player is in the bottom left most cell of the world, only 4 cells need to be loaded. However if the player moves diagonally to the next cell up and to the right, 9 total cells need to be loaded (the 4 that were already loaded plus 5 more).
In this scenario, the same cells/scenes are loaded at both player positions, however the second position has some additional cells/scenes. I don’t think Baking Sets will work in this scenario, right?
The ideal thing to do would be to bake each scene separately while it’s neighbors are loaded (but only the center cell/scene is actually baked); this way, the neighbors can “affect” each baked scene. This is already doable with the “old” light baking, and even works with regular light probe groups.
Is it possible to do with adaptive probe volumes?
To add to the above, I think what’s needed is the ability to merge the probes in different adaptive probe volumes at runtime, which is possible with regular light probe groups.
Is this something that’s doable with APVs or may be doable one day?
So to get around the lack of API to merge Probe Volumes, I think it should be possible to perform multiple bakes for every cell that the player might be in.
From what I understand only the cell the player is in needs to be in the Baking Set. Other cells/scenes can be loaded but not in the baking set, which allows their assets to contribute to GI. Unfortunately this does mean that the Probe Volumes have to be large enough to fit the cell you’re baking, plus any other cells that might be loaded when that cell is the “active” one. This will result in larger probe volumes and use more RAM, but it seems like the only way to go about it.
One thing I’m wondering. Has API been added to move Adaptive Probe Volumes at runtime? I know there was talk of doing so, but I cannot find information on whether this was ever added.
Generally additive levels are used in large games where origin shifting is needed, so this seems pertinent to this thread. Maybe I’ll never get an answer on any of this, but oh well!