Hi everyone,
I’ve been fiddling with Global Illumination and lightmap baking in Unity 5 beta 14, and have been very impressed with the realtime lighting results. However I’m coming across an issue that has stumped me.
In this test, I wanted to depict changes in sun position over the course of a day, and have been successful in getting the scene lit up the way I want it to. Here’s a screenshot of the test scene in the Unity editor window. In this scene I used a main directional light, plus a few faint point lights added in darker areas of the space. All lights have some degree of bounce intensity boosted up to create that nice saturated light effect. This is how it looks like:

(Offhand, there’s the strange double LightmapDisplay dialog box there in the bottom right corner. Anyone get these in your Unity Editor too? It doesn’t affect the scene, nor mess things up, so it’s not a big issue.)
What’s bad for me is this here: when I build this as a standalone desktop app, and execute it, this is what I get:

The lighting has gone wrong, and I’m not quite sure where to start to fix this. The pitch black shadows and grey walls look very similar to when I manually disable lightmap display in the editor. So I suspect that the built app does not take the precomputed lightmaps into consideration.
The rest of the scene’s interactivity works, including realtime shadows. I also do get the occasional texture corruption, as bright green/magenta polygons. When moving through the scene, some partial polygons show up in the desired lighting (you can see some of that on the left side of the above image).
Can anyone shed some light on this? The test scene is a really simple, low-polygon mesh that rendered beautifully in the editor. There’s not much point if this visual effect doesn’t show up in the built app. I do not have much experience with lighting in Unity, especially realtime GI combined with lightmapping, and any advice would be greatly appreciated.
Here’s what I’ve gone through so far:
- Testing this on my development machine: Macbook Pro Retina, 16GB RAM, GT750M, Unity 5 beta 14
- I’ve checked the quality settings in Unity and ensured best visual quality a.k.a. Fantastic option, which I have also enabled when running the build
- Tried both x86 and x86_64 builds, same results
- Rendering Path: Forward
- Lightmapping: non-directional, atlas: 1024, realtime (1texel) & baked GI (40texels/2padding/compressed)
- Graphics API: Direct 3D 9 (tried D3D11 but needed Windows to run)
- There’s no requirement for this to be mobile; it’s eventually meant to be run on a beefy desktop PC
Could this be a platform-specific issue? Something wrong with the way I configured my lightmaps? Did I run out of texture memory?
