LOD Group Baked Lighting - How To Use?

I am seeing that in Unity 5 my LOD1 group is NOT using the same(or similar) lightmaps as LOD0, also it seems forced to use light probes instead, which is resulting is some VERY low quality results. There is a huge “pop” to totally different lighting when changing LOD levels. In 4.6 these same LODs transitioned almost invisibly. The option to turn off light probes on the LOD is grayed out, does anyone know what is going on here?

Thanks.

It is normal, that LODGroup creates different lightmap for very group lod, as those have different uv sets and are downscaled properly.

But its either not baked properly, not applied properly, or I don’t know. I have similar thread in here:

Maybe I should file bug report, but wanted to confirm firstly that it is not my own mistake.

Hi! This is by design - you have to light your lightmap static LODs using lightprobes.

Alright, after many tests, I am confused now. LODGroup produces more ligthmaps, which means, that lower LOD levels are using the maps, not the probes; But, as I see it now, we are using light probes to give information for the lower lods, like where do we want them to be lit. Why not use downsample, as we had before? What is the logic behind this?

Maybe I am doing it all wrong, but have you ever tried littling LODGroup with lightprobes yourself? I had to put probes manually in the grid pattern around the objects, and still I could not get smooth transition - in some places visual difference is just too dramatic. Which means, that I just need to place more probes in the grid-pattern everywhere around the object? What kind of workflow is that?

Basically, all I can do now, is render LOD0 myself, then downsample it, and assign to lower LODs, as they have similar UV layout, coming out from simplygon. Which also save me map space. I just don’t get any kind of logic behind the decision to use lightprobes and different UV maps for lower lods.

1 Like

You have to use more light probes if you aren’t getting a smooth result. Can you post a screenshot of the quality issue? Perhaps we can make this probe placement automatic…
We never used resampling/downsampling of lightmaps in Unity 4. The lightmapper did change completely from 4 to 5 so the way we have to solve lighting for LODs also had to change.
This is how it works behind the scenes now: The direct light for a LOD object is baked into a lightmap and the indirect light is sampled from light probes and then gets added into the lightmap for the LOD. I have notified Jesper about the LOD scale, maybe we have a bug there.

1 Like

Thank you for explanation. I think workflow is a bit troublesome at the moment, so I’ve switched to manually assigning lower LOD’s based on the LOD0 lightmap; But I guess what you did here is somehow needed to interact with realtime GI, which is I am not using.

I’m not sure if there is a bug, but it is really hard to place lightprobes properly, at least from the first time, that is for sure.

2 Likes

Yeah it is not optimal, we will look into improving this (I have added this to our TODO list).

2 Likes

So to summarize:

  • LODs don’t get lightmapped, only probe-lit so you won’t get AO on them

  • LODs don’t affect the lightmap around them so if you use LOD for large buildings the terrain they sit on, or nearby rocks will not be affected by the building (ao, gi, baked shadow).

  • Probes are per object, not per vertex of per pixel so you cannot re-create detailed lighting

Correct?

No.

  1. LODs do get lightmapped. LOD0 get lightmapped using the full resolution indirect lighting. LOD1 and higher get lightmapped and the indirect lighting is sampled from lightprobes during baking.
  2. Only LOD0 will affect the surrounding geometry. This shouldn’t be a problem since the LODs are usually same size as LOD0.
  3. The probe SH coefficients are generated per object by interpolating between the nearest 4 probes, and evaluation of the lighting is done either per pixel or per vertex using the interpolated probe coefficients so you should be able to get detailed lighting.
1 Like

Thanks for clarifying, still fuzzy on 1.

  • are you saying LOD0 gets lightmap (AO, shadows)+GI map but LOD1+ get lightmap (AO, shadows) but the GI doesn’t use LOD0 map but instead it is GI lit like other dynamic objects?

They will both get a lightmap. The only difference is the two ways of sampling the indirect illumination during the lightmap baking before its gets stored into the lightmap.

1 Like

Gotcha, now the pop makes sense.
So need to increase probe density around static LOD? That’s bad workflow that should be fixed in 5.3

1 Like

Yeah, the workflow could be improved but 5.3 is feature locked already and only bugs will be fixed, so it will be in a later release.

Sorry for bringing up an Old Post. But for this point.
It’s somehow kinda confusing how is this gonna work for large object, say a building since unity doesn’t have deffered irradiance lightprobe? with the current setup the lighting difference is quite big between LOD. the current lightprobe is only approximation right?

We have something coming soon that will improve lighting on large probelit objects - probably in Unity 5.4.

Per vertex probe sampling?

Hi @KEngelstoft , I placed the Light Probes around the static LODed objects, but it keeps ‘popping’ when the LOD changes. I increased the probe density but not improved.
I have no directional light(only baked for Ambient Occlusion purpose), only one realtime point light and the point light is following the player position (closely positioned to a camera). Is this setting might cause the popping problem??
++
Should I have to enable “Use Light probes” in the higher LODs? It’s strange, when I bake a lightmap the “Use Light probes” is disabled(but its value can be modified by acript).

I’m experiencing with the same problem and with the huge scenes, it is also quite painful process to manually place the light probes.

This seems like a good idea.

Light Probe Proxy Volumes (it is in 5.4).

You shouldn’t have to, that’s why the option is greyed out. Is it popping because of a change in brightness, shape or something else? Please try and describe it in more detail, screenshots would also be nice.