I’m getting horrendous atlasing issues on baked lightmaps, when combined with LOD’s. Various elements are coincident across lightmaps, and are inconsistent from LOD to LOD.
I’ve read that there are persistent bugs with Directional Specular, so am trying a fresh bake with that disabled. Beyond that though, I’m a bit stumped. Would appreciate any thoughts on the matter.
switching off Directional Specular doesn’t fix the problem. It also seems I don’t have overlapping uv’s in the lightmaps. Rather, it appears that unity is deriving wacko light values during the render, and baking those in. Makes no sense to me.
Am I meant to switch off all LOD geometry except for the top level, then bake, then lock those maps, and re-bake with other geo on…?? That would seem needlessly circuitous - though at this point I’ll take a solution that works, even if it’s inelegant.
Since it seems to be an issue with the way the renderer is working, I’m trying to get a better handle on what enlighten is doing. I’m attaching here a screen grab of my scene in-editor (brightened a bit to show the triangular artifact more clearly) as well as the corresponding lightmap in uv-space. This light map shows the “baked intensity” of the image:
So how on earth does enlighten arrive at this bake??There’s no other geometry in the scene that’d suggest this kind of result. Nor does the mesh of the geometry suggest any kind of shape like this:
Lastly, here’s a snap of the next LOD of the same object. The lighting artifacts seem to relate in no meaningful way. Would dearly love some explanation as to the logic here.
As I’ve dug more into this problem, it’s become clear the problem is with the sampling or rasterization of the indirect portion of the baked light. I’ve produced another video that clearly exemplifies the problem - - and sent it along to Unity via bug report.
I must be doing something wrong that I’m just not grasping, since this seems to be a terribly simple issue, and easily fixed either by mapping each LOD into the base LOD’s lightmap, or by doing a full GI sample for each LOD. Would love opinions from folks who’ve gotten this to work (either with Unity or via 3rd party workflows.)
After a lot of tests and debugging, it appears that Final Gather is corrupting the bake. Here’re two lightmaps of the same scene, one baked with FinalGather OFF, and the other baked with it ON. Notice that with Final Gather on, the indirect lighting becomes faceted and loses most detail.
Conclusion: Don’t use Final Gather when baking in Unity - at least til this is fixed.
I’ve sent along an updated bug report to the Unity dev’s which hilights the issue.
Fantastico - the bugs I’ve reported in the last couple days:
739181 739241 739359 - the latter two are flavors of 739181, where I’ve attached example projects that show different facets of the problem.
Case 739221- crash on generate lightmap uv’s - tangentially related. Made debugging things harder