Lighting data getting cleared in last pass

Hi,

Although it’s probably not an entirely accurate title, something along those lines is happening when I bake my lighting.

I have a simple terrain, a dynamic object and a couple of static ones. Nothing to worry about there (although, terrain, well…).

It’s probably not the last pass per se as much as it is loading the baked data, but something is making my scene go from “nice” to “what”. My light is set on the doomed Mixed mode now, but I also have the same issue with baked lighting - everything seems fine during the bake, then screws up in the last few minutes.

If I change an object in the scene, shadows return and everything seems to be good again, until it finishes baking.

Has anyone experienced this?

Thanks in advance!

I found the solution, for those looking at the same problem: assuming the light is on mixed, giving realtime shadows, means that the baked surfaces are not receiving the realtime shadows. In other words, all objects except for the dynamic one are not getting any shadow info, and neither are the lightprobes.

1 Like

Hi, after looking at your screenshots and what you wrote, I believe I am having exactly the same problem as you. But I didn’t entirely understand how to fix this. I have trees (set to static) which shadows cover most of the terrain like in your shot as well, but after baking all shadows become virtually invisible. Thanks.

Hey! I believe it’s because realtime shadows are not cast onto static objects in deferred rendering mode. My light was on mixed, which is not working in Unity, meaning that none of the shadows were actually cast onto the static objects.

So it’s probably that your light is set on Mixed Mode. Put it on Realtime and you’ll have your shadows again - as Unity explains themselves, just use realtime for now, until they have proper lighting.

Thanks for your reply. After a fair few hours experimenting, I believe that it works if when you leave the skybox as the default. Once I changed it, even after reverting it back after, the mixed lighting didn’t work. I started a new project, left the skybox as it was and it appears to work fine now. But I’m not at all an expert in this field, so I may be mistaken. Thanks for your response any way.

Be wary that the mixed lighting mode is officially broken, so you might run into trouble later down the line. Check this topic out for more information: http://forum.unity3d.com/threads/when-is-mixed-mode-lighting-going-to-be-fixed.332250/

Good luck!

1 Like

Thanks! I’ll use the real-time light. I read that the mixed light has problems, didn’t realise it was completely broken! Makes you wonder why they don’t just remove the option from the drop-down menu :slight_smile: