Search Unity

Bug Lighting asset file not saving after a bake

Discussion in 'Global Illumination' started by SimSjB, Sep 26, 2022.

  1. SimSjB

    SimSjB

    Joined:
    Jan 23, 2017
    Posts:
    4
    Hello all,

    I am having some trouble with a large bake with Unity 2022.4.f1 and HDRP 13.1.8.

    I am baking a list of scenes (~13) that generate about 300 shadow maps @ 2048x2048, which looks like totals a lighting asset file that would be about 3 GB according to the Baked Light Maps tab in Unity. After the bake completes (12 hrs on an RTX8000) there is no asset assigned in the Baked Light Maps tab of the Lighting Inspector, the slot says 'None(Lighting Data Asset)'.

    The maps did generate and the shadow map data exists below that in the inspector window. It is just not saving to disk.

    If I close Unity and reopen all the baked data is gone.

    Am I hitting some limit of some sort? File size or map count?

    As a point of reference I have several other projects of roughly the same size (they are a single scene instead of being broken up) that are using BRP and build without issue but I do not have any hard evidence of a connection between my problem and HDRP.

    Thanks for any help!
     
  2. kristijonas_unity

    kristijonas_unity

    Unity Technologies

    Joined:
    Feb 8, 2018
    Posts:
    1,080
    Are those 13 scenes loaded additively in the editor during baking? If so, please check the scene that is marked as the Active Scene (its name should appear in bold in the Hierarchy). That scene will hold the LDA reference.
    Also, make sure that you do not have Auto Generate enabled. When in auto mode, Unity generates an auto LDA file, which is not accessible by users.
     
  3. SimSjB

    SimSjB

    Joined:
    Jan 23, 2017
    Posts:
    4
    Hello @kristijonas_unity, thanks for the help!

    We confirmed the main scene does not have Auto Generate enabled.

    For the baking process the scenes are dragged into the hierarchy manually before the bake is triggered. We will check which scene is bolded and run a bake (see you in 12 hrs).

    On a side note do you know why a bake of this nature would take 12 hrs vs similar non-multiscene BRP bakes that take 1.5 hrs on the same hardware?
     
  4. kristijonas_unity

    kristijonas_unity

    Unity Technologies

    Joined:
    Feb 8, 2018
    Posts:
    1,080
    This sounds like a bug, please report it.
    I don't see a reason why multi-scene baking would incur such a performance hit. If the single scene is of an identical complexity as the multi-scene setup, then this might be a bug.
     
  5. SimSjB

    SimSjB

    Joined:
    Jan 23, 2017
    Posts:
    4
    Hello,

    As a follow-up, in an attempt to reduce the difference between the projects we are baking we set up the following:

    A single scene in the long bake time project which encompasses all the content contained in the 13 individual scenes, then triggered a bake. This bake finished as expected and is fully usable. It did take 20 hours.

    @kristijonas_unity I am attempting to figure out how to submit a bug while being 100% offline, if you have any suggestions I would appreciate it.

    Thanks for the help
     
    kristijonas_unity likes this.
  6. kristijonas_unity

    kristijonas_unity

    Unity Technologies

    Joined:
    Feb 8, 2018
    Posts:
    1,080
    I suppose you could try to replicate the setup you have using very primitive objects. Nothing fancy is needed: as long as the bug reproduces, it should be enough for us to investigate.
     
  7. BocephusClaypool

    BocephusClaypool

    Joined:
    Oct 5, 2022
    Posts:
    1
    I'm experiencing the same thing. I ended up filing a bug report.
     
    kristijonas_unity likes this.