I’ve recently added LOD to a few of my objects, some of which are static objects. I’m finding that realtime lighting is behaving strangely on those objects now, and I don’t know if I’ve done something wrong, or if this is a shortcoming of the realtime lighting system.
It seems like only one of the meshes in my LODGroup actually get lightmapped. When the scene loads, I can see lighting on the object, but if I move closer to it, such that the mesh is replaced with one of the other LOD meshes, all of the lighting on the object disappears.
I saw a post from back in 2015 stating that this was how things worked then, but there was hope that it would be improved. Does anyone know if this was actually improved? Or is realtime GI lighting on static objects not compatible with LOD?
If you have only realtime GI enabled, then only the top level LOD will get lightmapped. The rest will receive lighting from light probes. You can read more about it here - https://docs.unity3d.com/Manual/LODRealtimeGI.html
It is strange, however, that the lighting disappears when you approach the object. Make sure that your LODs are properly setup (with LOD0 being the highest detail mesh) both in your .FBX files in the prefab.
Ah, thanks. I’ll look into that. I’ll do some experimentation with it. My earlier statement might have been wrong without realizing it. It might be more of an issue with emission generation from the static LOD meshes. But I appreciate the link.
As I suspected, it seems this is an issue with emissive lighting. Objects lit by light probes get a very different amount of lighting on them compared to static objects. For example, here’s a door at LOD0. The outer frame of the door is the mesh I’m using LOD on:
If I step back a little to reach LOD1, it looks like this instead:
The red lighting the frame’s picking up is the emissive light coming from the lights on the door.
The hard jump in lighting when changing an LOD level is not very attractive at all, and it’s very noticeable. Do you know of any techniques to improve this behavior? I tried turning off Blend Probes on the LOD1/2 meshes, but then they just look like this instead:
Thanks for the screenshots. The lower LODs are most likely interpolating between neutral ambient light and emissive light, and the result you are seeing is something in-between. You could try increasing the probe density around the door, but that will not help all by itself. You will most likely need to rely on LPPVs in order to get more correct probe sampling for your door. You can read more about LPPVs here - Unity - Manual: Light Probe Proxy Volume component