Search Unity

[PathTracer] InitializeLightmapData job with hash: 120fb6e5e3ae5bc68ee62d5005962700 failed with exit

Discussion in 'Global Illumination' started by KarlKarl2000, Jul 24, 2018.

  1. KarlKarl2000

    KarlKarl2000

    Joined:
    Jan 25, 2016
    Posts:
    606
    Hi guys,

    I'm new to light map baking, so please bear with me.

    I tried to bake my level today, it's been running over 7 hours. The original estimation Unity told me, was 3 hours.

    I came back a few hours later, to see I had 18 minutes left. Which I was pretty happy to see. But then I noticed whenever it reached 12 -13 minutes, the baking time would reset back to 19 minutes.

    I don't think my bake is going to finish. I'm baking a 2d platformer, that's made with 3d objects. So I can't really say it's an "outdoors" environment. (I read in another thread outdoor scenes would be better off using Enlighten)

    I've attached some screenshots about settings and the error. I used Mesh Baker (asset store), to combine as many objects as possible into "chunks" of assets. For example: a house and its surrounding trees would be a chunk. I made those "chunks" lightmap static only. There's around 20 of these "chunks" and I have smaller unique detail assets like street signs etc, as their own individual game objects.

    I have about 30 lights. (Is that too much? They're set to Mixed)

    Should I be making my "platform colliders" static as well? They have a mesh renderer on them so I can see them in editor, but are not rendered by any cameras at runtime. If I made them static, would those be considered in the lightmap baking process?

    Any help would be much appreciated!

    Thank you
     

    Attached Files:

  2. Ragueel

    Ragueel

    Joined:
    Jun 2, 2018
    Posts:
    39
    I had similar problem recently. I don't know how I fixed it but turning off some objects then rebaking lightmaps helped me. So try to find that meshes that are not correctly baking or causing errors and rebake, also i noticed that if you have empty gameobjects that are static also causes this error.

    EDIT:
    Error might also occur because of windows paging file size, try to increase it.
     
    Last edited: Aug 7, 2018
  3. KarlKarl2000

    KarlKarl2000

    Joined:
    Jan 25, 2016
    Posts:
    606
    Sorry for the late reply.

    I ended up going with Enlighten and was able to finish in under 30 minutes. I also redid my mesh baking into smaller chunks. It seemed to help.
     
    novicecode likes this.
  4. GAZEREAPER

    GAZEREAPER

    Joined:
    Feb 15, 2014
    Posts:
    9
    Just to add to this thread for anyone encountering this error:
    I disabled "Prioritize View" and "Multiple Importance Sampling" and haven't gotten this error since. Also jobs that would get stuck at around 85% now actually complete.
     
  5. KEngelstoft

    KEngelstoft

    Unity Technologies

    Joined:
    Aug 13, 2013
    Posts:
    1,366
    BakeJobInitializeLightmapData returning error code 2 means that there isn't enough memory available to run the job. Please close any other running applications or lower the lightmap size or install more memory (RAM) in the machine.
     
  6. gblanke

    gblanke

    Joined:
    Apr 30, 2020
    Posts:
    1
    Where can I download that from?

    All joking aside, I just got the same error message, after the progressive GPU lightmapper falling back to CPU. My GPU has 8 GB Vram and i have 64 GB RAM installed, so I think either I or Unity must be doing something wrong.

    I figure it's the former, but I have no clue, any hints?
     
  7. Salvador-Romero

    Salvador-Romero

    Joined:
    Jan 21, 2014
    Posts:
    54
    What does an error code 1 mean? Or better, where can I find a list of errors and their meanings? Thanks! :)
     
  8. KEngelstoft

    KEngelstoft

    Unity Technologies

    Joined:
    Aug 13, 2013
    Posts:
    1,366
    Error code 1 means InvalidTexture and happens if there is a mismatch between width/height of the lightmap and G-buffer. If you run into this, please file a bug report so I can fix it, thanks!
    Ideally these error codes should be documented in the manual or never be printed as integers but rather as self contained actionable messages. I'll bring this up with the team.
     
    LSHLS and Salvador-Romero like this.
  9. Salvador-Romero

    Salvador-Romero

    Joined:
    Jan 21, 2014
    Posts:
    54
    Thank you for taking the time to reply!

    Please notice that I am getting this error working with 2019.1. But I tried with 2019.4 and it works, so I guess it was a bug that you already solved. That's would explain why I find so few results when looking up on how to solve my problem. Given that 2019.1 is no longer supported, I guess you don't need a bug report. But thank you!

    I will reserve a day to finally sit down and port my project!
     
    KEngelstoft likes this.
  10. kanthjata

    kanthjata

    Joined:
    Feb 11, 2021
    Posts:
    1
    thanks man.