Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Console Errors while baking

Discussion in 'Global Illumination' started by Zylex, Mar 12, 2015.

  1. Zylex

    Zylex

    Joined:
    Nov 25, 2008
    Posts:
    238
    We are trying to bake all of our existing scenes but we seem to get a lot of errors while doing so. We get the following:

    terrainInstanceHashes.find (instances.instanceID) != terrainInstanceHashes.end ()
    Failed opening GI file: 'c3/c3b069c38a4b0b47c6f6a34933375fbf.ppg'.

    Sometimes it doesnt work after this but sometimes it does not seem to matter. I also cleared my cache but that does not seem to help for the opening GI file.
     
    GoGoGadget likes this.
  2. KEngelstoft

    KEngelstoft

    Unity Technologies

    Joined:
    Aug 13, 2013
    Posts:
    1,366
    Can you please file a bugreport with your scene attached? The terrainInstanceHashes.find (instances.instanceID) != terrainInstanceHashes.end () message indicates that one of your terrain instances are getting lost in the process.
    Thanks!
     
  3. Zylex

    Zylex

    Joined:
    Nov 25, 2008
    Posts:
    238
    I have submitted a scene where it happens: (Case 679908)

    I also had different errors while baking a pretty large scene namely:
    'Visibility' job failed with error code: 4294967295 ('Unknown error.').
    Failed executing external process for 'Visibility' job. Exit code: '-1073741819'.
    Failed executing external process for 'Visibility' job. Exit code: '-1073741510'.
    Failed executing external process for 'Visibility' job. Exit code: '1'.

     
    Last edited: Mar 12, 2015
  4. KEngelstoft

    KEngelstoft

    Unity Technologies

    Joined:
    Aug 13, 2013
    Posts:
    1,366
    Thank you for reporting this.
     
  5. Kragh

    Kragh

    Joined:
    Jan 22, 2008
    Posts:
    657
    We are also having bake errors (Unity 5.1.0f1):

    Failed executing external process for 'Bake Visibility' job.
    No Exit code!

    The scene is too big for bug submission. Just wanted to let you know problems still persist.
     
    Last edited: May 26, 2015
  6. robert-nally

    robert-nally

    Joined:
    Mar 5, 2014
    Posts:
    76
    I'm also having this issue. I'm getting these error messages while trying to bake lighting:

    Failed executing external process for 'Clustering' job.

    Failed executing external process for 'Visibility' job.

    The baking process has been going for approximately 7 hours. I have a pretty large scene. Baking in 4.6 used to take 3 to 4 hours, but I haven't been able to get it to bake in Unity 5 yet.

    Any idea on how to resolve this?

    I tried baking yesterday and it ran for 15 hours without finishing. It's getting hung up on Light Transport 7/11. I would hate to have to downgrade to 4.6 after putting a lot of work into getting Unity 5 to run without errors.

    I also tried lowering my baking settings as much as I could.
     

    Attached Files:

  7. Kragh

    Kragh

    Joined:
    Jan 22, 2008
    Posts:
    657
    We have had many of the same issues as you, but three changes to my system has made a BIG difference: More RAM, bigger GI cache size and specified parameters for meshes that are flat and cover big areas. Enlighten has problems with those...
    16GB is too little on a big scene. When I bake I peak at memory usage around 22-23GB.
    I upped the default GI cache size from 10GB to 100GB. It peaks at around 30GB usage, but if you have the space, just put it at max for good measure. All errors are gone now. It still takes longer than Beast, but at least it finishes ;)
     
    Larzarus likes this.
  8. robert-nally

    robert-nally

    Joined:
    Mar 5, 2014
    Posts:
    76
    Thanks for the tips. I'll try some of that stuff out. How are you specifying parameters for meshes that are flat and cover big areas?

    There has to be a better solution than have a "monster" rig though, right? I mean imagine Unity telling people they can only bake lightmaps if they have 22-23 GB of ram and 30 GB of free hard drive space and run everything at the lowest possible settings and .... 7 hours of time? That's a ridiculous request.
     
    devotid likes this.
  9. Kragh

    Kragh

    Joined:
    Jan 22, 2008
    Posts:
    657
    Under the object tab of the lighting system, you can specify a parameters file per object. It will by default be "Default", but if you right click in the project window, you can choose to create a new "Lightmap parameters" asset. After creation you can choose it from the dropdown in the objects tab. Hope it helps :)
     
  10. Deleted User

    Deleted User

    Guest

    This is still happening in 5.3.4.!
     
    KUFgoddess and Deleted User like this.
  11. AgentFire

    AgentFire

    Joined:
    Jul 19, 2014
    Posts:
    5
    And still happening with clean GI cache in Unity 5.4.
     
  12. BakaCat

    BakaCat

    Joined:
    Feb 26, 2016
    Posts:
    3
    I'm using 5.3.4 .When I baking my scenes,the same error happened.So i try to close my precomputed realtime GI ,clean GI cache,set a bigger Cache size and change the Cache Folder Location,everything is gone!
    So……did you try to set a bigger Cache size for example 20G+ ?~When the problem is happening,my max Cache size is 10G and 6.4G had been used.So maybe the most problem is the unused space size?~~
     
  13. RedDragon19

    RedDragon19

    Joined:
    May 21, 2016
    Posts:
    3
    I am also having a baking error "failed executing external process for 'bake runtime' job" and due to this error, Shadows are gone even after checking both PreComputed Realtime GI & Baked GI in Lighting Section but unchecking Baked GI component displays the shadows. It is weirdly worst. If anyone has a solution please inform us.
     
  14. kloogens

    kloogens

    Joined:
    Jul 1, 2015
    Posts:
    109
    I'm having problems with the Light baking like everyone else. I finally got past the light transport process without any errors. However I get a error "Failed executing external process for 'Baking Resources' job", with no additional information. On 3/17 Baking Resources. All 30 gigs of memory get taken up in about minute or less. I have a solid rig , plenty of disk space and the GI cache is set to max.

    What size is considered too big by the light mapper?
    Does the shape of the mesh have anything to do with it? For example a plane or concave vs convex shape.
    Any other suggestions?

    Edit: Okay after another day for testing what I discovered isn't making much sense to me.
    Upgraded to 5.6.2.f1
    Cleared the GI Cache.
    I sliced one big object into a bunch of small pieces.
    Created a new project imported the sliced up object.
    Set all the pieces of the sliced up object to "Static"
    No Other assets imported.
    Baked the scene with the default settings with exception to changing the Light Map Parameters drop down to Very Low Resolution.
    Bakes fast and with no errors.. That's good.

    However....

    It doesn't work when I.
    Open my original project (very big).
    Create a new scene.
    Clear the GI Cache.
    Add that exact same sliced up object to the blank scene.
    Set all pieces to "Static"
    Import settings for that object are the same between the two projects.
    The light bake settings are the same between the two projects.
    Fails with 'Baking Resources' job failed with error code: 3 ('Failed reading Bake Input System file.').

    Only differences I can think of.
    Original project has been migrated over several versions of Unity vs the new project was just created in the latest version 5.6.2.f1
    Some asset in the original project is somehow interfering with the light baking. Perhaps the Alloy shader frame work which the original project is using but not the new one. Either way I can't spend days working on this , so any suggestion are greatly appreciated.
     
    Last edited: Jun 28, 2017
  15. quincyHuang

    quincyHuang

    Joined:
    May 30, 2013
    Posts:
    20
    AMD card has this issue, even on 2018 version
     
  16. vibedev

    vibedev

    Joined:
    Nov 1, 2018
    Posts:
    13
    No matter if I check or uncheck both, or one is checked while the other unchecked, I still get the "Failed executing external process for 'Bake Runtime' job." error every time I change scenes. Has anyone found a resolution or reason for this?
     
    HamFar likes this.
  17. Deleted User

    Deleted User

    Guest

    Unity 2018.3.0f2 (64-bit). I have 16GB of RAM, Almost over 4TB of harddrive space. I don't mind long bake times. Click, go to sleep, see the results in the morning--if I have to. But if I hear my PC screaming and peeping that it's out of memory for baking a low-quality scene, what will happen when I bake something at a higher level of quality. It looks like this has been an ongoing problem. Any know of a fix?
     
    vibedev and HamFar like this.
  18. Tudvari

    Tudvari

    Joined:
    Jun 3, 2014
    Posts:
    30
    Same here, 2018.3.3f1.
     
  19. fguinier

    fguinier

    Unity Technologies

    Joined:
    Sep 14, 2015
    Posts:
    146
    Hey WhiteEyes, that seems a different problem than above. Could you report a bug please? Previous issue (case 679908) was closed and verified on version 2017.3.0p1 and 2018.2.0a1.

    Thanks!
     
  20. vibedev

    vibedev

    Joined:
    Nov 1, 2018
    Posts:
    13
    Any advice on the "Bake Runtime" error reported in this thread?
     
  21. DeathRace26

    DeathRace26

    Joined:
    May 26, 2019
    Posts:
    75
    Everytime i try to bake lightmap using enlighten, i get this error:
    Assertion failed on expression: 'terrainInstanceHashes.find(instances.instanceID) != terrainInstanceHashes.end()'

    this appears 4- 6 times in a row, randomly without any description. Im also stuck on creating bake systems(3 jobs). I've searched through many forums and i still cant fix this darn issue. Fix this unity, please. I've made numerous threads and still didnt get any response...
     
  22. rasmusn

    rasmusn

    Unity Technologies

    Joined:
    Nov 23, 2017
    Posts:
    99
    As pointed out by @fguinier just above, this issue should be fixed in Unity 2017.3 and 2018.2 and newer. What version are you using?
     
  23. DeathRace26

    DeathRace26

    Joined:
    May 26, 2019
    Posts:
    75
    Thanks for the response. I use 2018.3.9f1 personal. Parameters are sot to very low. With baked terrains, i still get crashes even through the fact that i can see 5x6 UV recrangles on each static terrain chunk. I'm using i3 dual core. Could be possible to handle it somehow with GPU? I have GTX 960 4GB and even when i try bake lighting no matter what lightmapper i use, my whole scene crashes. During beggining of Lighting generation, i get random number of errors ranging from 2 to 6, saying this:
    Assertion failed on expression: 'terrainInstanceHashes.find(instances.instanceID) != terrainInstanceHashes.end()'

    I've searched almost everywhere and still wasnt able to find any solution. Hopefully this is not related to CPU but memory, I can deal with fact that it bakes whole day or two. I have 12 GB ram and 4GB GPU. This situation is just unfair...

    here is a preview of my terrain: https://ibb.co/wLS8YHQ

    As you can see, it is aproximately 5x5 Km sized terrain. I chunked it up to 6 sectors, each one contains 4 Terrains. Everything is set to static.
     
  24. DeathRace26

    DeathRace26

    Joined:
    May 26, 2019
    Posts:
    75
    Last edited: Aug 8, 2019
  25. rasmusn

    rasmusn

    Unity Technologies

    Joined:
    Nov 23, 2017
    Posts:
    99
    I tried to reproduce the issue you are seeing but I could not unfortunately. Since I cannot reproduce the issue on my machine, it is difficult for me to diagnose the issue, and therefore I cannot tell you what is wrong. But here's a few ideas to try:
    • Does this issue only happen after you use the 3rd party tool to split terrains? Maybe the tool is generating data in a format that we somehow do not support (or expect).
    • Does it only happen with Enlighten? What happens if you switch to the progressive lightmapper?
    • Try disabling disabling one terrain and then bake. If the error still happens, try disabling another terrain object and then bake. By doing this iteratively you may obtain an understanding of what makes it break (is it a particular terrain, or the total number of terrains, or something else).
    Regardless of the above, it would be very helpful to us if you could create a new simple project in which the error happens. With this project open you can use the menu's "Help > Report a Bug" feature to report this as a bug. This way, we will receive a copy of your test project and that would make it much easier us to debug the problem.