Is it possible to bake lightmaps for LOD models? I can't have both models visible while baking lightmaps, because they will cast shadows on eatchother. How would I go about doing this?
I don’t know if there is an easy way to do this.
The first thing that comes in my mind is to hide completely the second model, bake the lighting, and somehow project the lightmap UV of the first model to the second one.
Anybody have tried this before?
generate your LOD’s off the main mesh after the lightmap UV’s have been created- just make sure you preserve UV borders, or it won’t work. After that, you can just share the same lightmap between multiple meshes. This technique works best on terrain, or objects that will have a relatively simple unwrap- the more seams, the less effective it becomes because you won’t be able to get your LOD down far enough to make it worth it.
Seperate the LOD assets from the high-def assets they are replacing. Select all the LOD models, offset them by 1024 units (or whatever makes sense for a game of your scale,) duplicate all the light sources (except for directional lights, of course,) and offset the duplicates by the same ammount. Now bake. Each “version” of your scene now has roughly identical lighting, and it was all baked in one pass, with no overlap between meshes. Offset your LOD assets by -1024 to line them back up with the high-poly assets, delete the duplicate lights, and re-assign LODs.
Of course the obvious downside of this is that it constitutes an entire pipeline, but it should get the job done. Note that I haven’t tested this, or worked much with LOD in general, so apologies if it’s not this simple.
The lower levels of LOD don’t get the secondary light from the scene, so you have to use Light Probes to light them.