Use the same lightmap on lower LODs?

Hey,

I have various artwork with clean LODs, all fairly similar to LOD 0, they can share very similar UV islands.
I want all the LODs to share the same lightmap texture instead of using lightprobes or having a separate lightmap for each LOD which is unnecessary.

My LODs can easily share the basic UV layout for their lightmap UVs.

I want to achieve what is outlined in this video, however they just said “scripts are coming soon”, not sure if they ever came out.

I have to stay on Unity 2018.4 LTS for a number of reasons.
Also I am using Bakery, because Progressive GPU lightmapper instantly crashes.

If anyone knows the best workflow for this, did those scripts from the video ever come out ? I would really appreciate some insight.

Cheers

1 Like

I will give this a shot: GitHub - laurenth-personal/LODLightmapScripts: Scripts useful when using LODs and lightmaps

Have not tried it yet, if anyone has a better or built in solution let me know.

I also have a similar problem. The scene was very large, Lods in baking resulted in long baking time. The current progressive GPU lightmapper does not yet support LODs bake. I hope there can be a way for lower lods to share the lightmap with lod0.

2 Likes

Baked LOD support for GPU PLM is coming in 2020.1 release.

Instead of waiting for Unity 2034.1f12 preview, You can use this for now, it works - https://github.com/laurenth-unity/LODLightmapScripts You need to set the lightmap LOD script up in script execution order so that it happens later.

4 Likes

I’ve always wondered why Unity has never done this by default. It seems like a waste of texture space to have each LOD have its own lightmap.

Are there some pitfalls to using this approach?

1 Like

Their automatic lightmap UVs could create a different layout for the lower LODs, so it will only work consistently for people with very similar geometry on LODs or if they have custom lightmap UVs that match up in all the LODs. However there is not any real downfalls, besides not being a built in. Unity doesn’t make their own games so they seem to have different priorities & forget that people are trying to finish actual games, who are not interested in their latest stack of buggy preview features. Not saying it is necessary for them to make their own games, but their priorities are questionable & frustrating at times.

If I recall correctly the scripts above were made by someone at Unity while trying to finish a demo scene. It’s interesting they can’t finish a demo scene without needing custom workarounds for something as common as lightmapping LODs.

2 Likes

I’ve tried the above scripts and they indeed work. I’m manually created UV2s for LOD1and LOD2 (based on LOD0)…and it works great.

I did not have to change the script execute order for it to work…but I have not done a build of my game…so no idea if that breaks it.

Does anyone know if any products can create UV2 for lower LODs automatically? I’m wondering in products like InstaLOD can do it…