Stuck at 99%

This not yet a bug report, because I can’t think of a way to making an easily reproducible one, but any information would be welcome.

I have the following issue.

Using Unity 2021.2.16f1, I’m doing overnight bakes of one 2k map, with the GPU Lightmapper (GPU: 6800xt 16GB), with a million indirect rays. The amount of rays I put for overnight is based on my daily bakes (like, if I’m doing rough half hour bakes during the day, I do a x16 or something to the indirect rays for overnight).

The next morning, I (always? I’m not sure) find the lightmapper in the following state:

It is at 99% and says finalizing bake, the timer says there are 0 to 8 minutes left (and there is nothing weird on the console).

Then the time left goes to 0, it stays like that for a minute, then the timer goes back to 7-8 minutes. ← This repeats forever (? I have waited up to 6-7 more hours, I haven’t tried leaving it for, say, another day).

Basically as evidenced by our slack this morning, I just keep going through this rollercoaster of emotions:

I’m not sure if it’s stuck, or if the timer is just wonky and it’s actually doing stuff and it just needs a lot more time than I have (and it has) calculated?

Now. If I manually stop it, half the time I get a pretty decent lightmap (not sure if it’s a million rays worth, but it’s clean), and half the time I get “Assertion failed on expression: ‘m_PendingLightmapHashes.size() == m_LightmapCompositeHashes.size()’” and no lightmap.

The same project, same scene, bakes fine with more “sane” (sane=100k) indirect sample values.

I can’t narrow this down easily, since testing if it happens again is an overnight thing, so testing for reliable repro is an overnight thing.

I do welcome any information if anyone else has stumbled upon this, or if a dev can provide any insight on what the “Assertion failed on expression: ‘m_PendingLightmapHashes.size() == m_LightmapCompositeHashes.size()’” means.

Do you have progressive updates enabled? We are investigating an issue internally where progressive updates cause long bake times and/or stalled bakes.

No I don’t.

I suppose the best course of action would be to report a bug. But just out of curiosity: have you ever managed to bake with 1 million samples successfully before? Personally, I tried it only a couple of times.

Yes I have, but it’s been a while so I don’t quite
remember which scene and Unity version (it could have been with 2020LTS).

This needs more testing, but the overnight nature of it doesn’t make it very easy.

1 Like

This seems to still be an issue in 2021.3.1, any fix eta for this? To confirm the bake times are magnitudes higher when Progressive Updates are enabled.

Can confirm Progressive Updates has been making my bakes take 50x longer and often fail. Though with it off I’ve also seen it stall at 99% once - Unity 2021.3.3