#I see Does the asset pack use a bad

1 messages · Page 1 of 1 (latest)

ruby stag
#

No, the lightmapper seems to keep restarting with every tick of the time node because we keep hashing the scene for changes. It's an oversight in the way we detect changes in the scene to restart the bake.

small sapphire
#

Oh I see. Is this a recent bug or has it been there forever

ruby stag
#

I've never seen it before and we just got another bug report about it so my guess is that it's something recent.

ruby stag
#

The regression happened in 2021.3.22f1, I am getting a clean bake in 21f1. If you have the choice to go back a minor version it will clear up this issue.

#

In the meantime, we'll work on getting a fix to the LTS versions, sorry about this 😦

ruby stag
#

Hey @small sapphire I have some news related to this.
I spoke to my team members about it and it seems that it is by design. I know it sounds a bit ridiculous, but hear me out.

In f22 we made a change that includes more shader keywords into the hashing/caching algorithm that we use to capture the scene. This does not include anything related to the time node explicitly, but if the time node is changing mesh vertices (or in general the albedo / emission textures) for meshes that are supposed to be baked, then the bake is going to run forever because there is nothing stable to bake.

I know that this is frustrating, it's why in 2023.1 and later we are moving on to a different architecture. Specifically, if you hit the 'Generate Lighting' button in 2023.1 beta (and not use 'auto generate lighting') the hashing algorithm will run exactly once. The issue with this, which we are dealing with through UI warnings for 2023.2 and possibly backporting into 2023.1, is that if the scene changes after you hit 'Generate Lighting' your lighting will come out wrong, for the same reason that it was looping in previous versions. If you're changing your meshes after we've hashed the scene, in 2022 and before the bake restarts, in 2023 and ahead, the bake will be incorrect (but not cause infinite loops).

So what solutions are there?

  1. Use an outdated version of the editor (not recommended)
  2. Bake with the time nodes disconnected and reconnect them later (could lead to incorrect results)
  3. Upgrade to 2023.1+ and use the "Generate Lighting" button (could still lead to incorrect results if the meshes are changing)
  4. Contact the asset creator to fix the asset such that it conforms to the fixed hashing algorithm. In general, the hashing should only take into consideration static meshes that contribute to / receive GI and nothing else. If you discover that this is not the case, let me know here and I'll investigate further.
#

Again, I'm sorry that this caused so much trouble for you and thanks for reporting it here.

ruby stag
#

@small sapphire good news, we have a fix for this, I'll let you know when it lands in 2021 🙂

small sapphire
#

That's great news, thanks for the amazing communication!

ruby stag
small sapphire
#

Do you have any idea when it will be fixed for unity 2021?

ruby stag
#

I can see that fixes are under review for 2022 and 2023.1 so not too long 🙂

#

Don't have a specific date though

#

Couple of weeks max would be my estimation without making any promises 😄

small sapphire