There is references in the change notes about being able to load lighting data additively but as far as I can tell loading light probes is broken. Right now I am storing a scene in an asset bundle and trying to load that scene with it’s light probes, but it just will not work. Objects in the level will only use real time lights on objects. I even tried manually setting the lightmap snap shot to be that of the level that is being loaded additively and it still will not work. I have also tried straight LoadLevel on the asset bundled level and it will still not work.
The light probes of the first level you load will be used. If you need probes that span a larger area, you can bake multiple scenes together and load them additively. See this for details Unity - Scripting API: Lightmapping.BakeMultipleScenes
That appears to not because the case if you load the level from an asset bundle.
Here is a screenshot loaded with LoadLevel
And here is one with LoadLevelAdditive
In both cases they are not using light probes (and checking or rechecking Use Light Probes has no effect) but for some reason in the load additive they take on some color of light from somewhere. It’s extremely odd behavior. There is one directional light in the scene set to Mixed. Going to try again with just “Baked” now, but I believe I tried that before.
Also if I change that directional light to baked or realtime at run time, the objects just turn black:
edit: appears to be same results when light is just set to baked
Even stranger. When loading the level additively NOT from an asset bundle, the light probes are being added, (which I thought you said should not work as it doesn’t include the light probe / light map snapshot info)
I’ve tried this with a much simpler scene and it appears to be loading the lightprobes, but it is triggering some errors about loading GI and light probe data sets. (Note: this is loading from an asset bundle, non-additive)
Failed opening GI file: ‘ad/ad69cfd66f388507f379521a92df1f8d.rpc.sse’.
Failed loading probe set data for hash: 0xad69cfd66f388507f379521a92df1f8d
Running more tests. Just loaded a level additively and the lightprobes loaded…
The level it loaded on top of had no lightmaps or light probes in it yet. So maybe it will load them if there is none there? Also one time I ran the test parts of the lightmaps were not included but the probes were. It seems to be possibly randomly bugging out when trying to retrieve data.
Can confirm this issue with 5.5.0b5. Light probes loaded with LoadScene with additive parameter seem to have the data from Scene 1. Attached pics for clarity.
Sorry I’m a bit lost here, I’ve the latest patch (5.5.1p3) but when loading additive scene the lightprobes data isn’'t loaded. Is there a way to load and setup up lighting data by myself (I’m using realtime GI only)?
Currently I just have a loading scene that loads levels as needed, having only one at the same time. What is the usual way people go around this?
Additive loading with light probe group data is not fixed yet but loading GI with assetbundles is (Unity Issue Tracker - Global Illumination doesn't work in Build if scene is loaded as an AssetBundle). Additive loading is still broken, lighting team didn’t have the time to fix it as lately, the primary focus was on “fixing” lightmapping, mixed lighting and providing better and more artist friendly tools for them.
I’m afraid there is no proper way until it is fixed. You should directly load scenes (without additively loading) and use DontDestroyOnLoad() if you want to keep some objects while switching scenes as a workaround. Besides that, you can try unloading light probes data before loading another scene so that current scene’s light probe data doesn’t overwrite the data of loaded scene.
SphericalHarmonicsL2[] bakedProbes = LightmapSettings.lightProbes.bakedProbes;
int probeCount = LightmapSettings.lightProbes.count;
// Clear all probes
for (int i = 0; i < probeCount; i++)
bakedProbes[i].Clear();
Has this been fixed? I’m loading scenes from asset bundles and everything that is not static in my scene and is supposed to use light probes doesn’t seem to do so. Everything looks fine in editor but in build the objects are too bright.
The issue with additive scene loading and light probes is not fixed yet but what you describe sounds like a different issue related to AssetBundles and somehow specific to standalone players? Could you provide more information about this? Which version are you using? A reproducible would be nice to have. Thanks!
I’m using Unity 5.6.1. The scene is loaded asynchronously from an asset bundle using the AssetbundleManager I got from the docs on asset bundles. The scene is in a bundle with a few other scenes and the scene assets are in separate bundles.
Everything else is static and using lightmaps, the doors are the only thing that moves. If I remove the light probes in the editor it will look exactly the same as in the standalone build, so apparently it’s not using the probes in the standalone. This is the first scene that is loaded after a menu scene with nothing in it but a UI. The same problem happens in all other scenes as well.
So, 3,5 years later, it still seems that the lighting team had no time to fix this!
When i load a scene from asset bundle additively, light probes are not working at all. not when testing in the editor and not in the build.
The scene is only lit by emissive materials. Most of the lighing is baked in lightmaps. When i load the scene separately in the editor, the non-static objects are lit by the light probes. When i load the scene in play mode additively from the asset bundles, all non-static objects are black (since they should only be lit from light probes). Unity 2020.1.6f1 here.
EDIT: Ok, nevermind. Somehow the LightProbes.TetraHedralize () was removed from our code.