Search Unity

Global Illumination Computation (Unity5) ongoing saga

Discussion in 'Global Illumination' started by radiantboy, Mar 4, 2015.

  1. radiantboy

    radiantboy

    Joined:
    Nov 21, 2012
    Posts:
    1,633
    Hi guys,

    I am using Unity5 release version. The baking process went smoother than ever, faster than ever too, however it still did not complete, it's stuck on 14/15 Compositing 439 jobs. It seemed like it was going to finish perfectly and in record time, but once it stuck I noticed it was continually spitting out:

    Failed opening GI file: 'e1/e12f9256987b770ad064f439ee710354.osa'.
    Failed opening GI file: '43/4334f4a0949e29df8335628383f412e6.osa'.
    'Compositing' job failed with error code: 2 ('Failed reading AO file.').

    Any thoughts? Im soooo clooooose to getting a bakkkkke!
    Unity5 rocks!

    Gaz.
     
  2. radiantboy

    radiantboy

    Joined:
    Nov 21, 2012
    Posts:
    1,633
    So I believe it is simply running out of ram making some of the files it needs, the memory rises right up then falls fast then it says:Failed executing external process for 'Baking Resources' job. Exit code: '-1073740940'.

    I will try again with more virtual memory when I have a shower. One great thing is the virtual memory usage doesnt seem to lock me out of my pc anymore, so it can hopefully run in the background as I code. You'll know when my bake is done because there will be a earthquake-like boom from my apartment, I have been trying to do this for 7 weeks.
     
  3. radiantboy

    radiantboy

    Joined:
    Nov 21, 2012
    Posts:
    1,633
    Wow ok I put virtual up by 32 gig (I also have 16 gig physical) - it did lock my pc up for over an hour, capslock taking 15 min to respond etc.. but it did not run out of memory and did not spike up then down, it gradually came down with no error and continued. Except it still stopped at the same point as in my first post and with the same error. I wonder if I need to flush the gi cache and do it all again...
     
    IgorAherne likes this.
  4. radiantboy

    radiantboy

    Joined:
    Nov 21, 2012
    Posts:
    1,633
    Yeh so I flushed the GI, started from scratch, upped the virtual memory to 64 gig + 16 gig physical, left the house for 5 hours came back PC was turned off. Only Unity light computing can literally turn off my PC, how does that even happen ? I would say Unity5 is not actually ready for release on the GI front, unless I am doing something drastically wrong (it is always me who has the issues, so I guess I am!). Although I have never had any software ever behave this badly when I am just trying to use a supposedly finished feature (even RealFlow...well maybe After Effects), especially for the amount of money it has cost, is GI basically still broken in some way? In many ways I wish I had stuck to U4, it worked perfectly and my lighting was awesome. Now I have a pitch black game that runs about 10x slower than it used to, and with virtually all the features broken. I've spent almost 2 months simply trying to lightmap my level, it's very hard not to get angry about this situation to be honest. If this was some small game engine no one had heard of I would have tossed it aside weeks ago and warned everyone, don't bother it's buggy as hell..

    I know in the end it will be worth it, and maybe my PC is just too crap, it's an old 2010 machine I have upgraded heavily, but I doubt this is the case (and an actual build from unity4 was going at 100fps), and I doubt anywhere the requirements state that you need 80 gigs of RAM to lightmap a relatively simplistic scene. I have submitted this scene to Unity so hopefully when they get around to checking it, it will be something idiotic on my behalf (must admit I have used lots of Sketchup models, I believe these may ultimately turn out to be the culprits, but with no way to know what object it is lightmapping and no way to debug the engine itself [I am presuming even pro users cant get the source to the Unity App itself?], I don't see how I can ever discover what is the issue, without spending literally years doing trial and error). I hope I am not the only one having this issue , because if it's not major enough to fix, my game is dead, after years of 16+ hour days - well I guess I can go back to my Unity4 backups actually, that was working perfect, but still these beautiful videos I am seeing from Unity make me want to persevere.

    It's starting to impact my quality of life, and has become the most difficult computing task I have ever faced in 20+ years of crazy computing, even after writing many engines of my own, some drag and drop comparable to Unity. If you are facing this sort of thing still even with the released Unity, please add to this thread, so we can get a fix going, or maybe even a feature that simply lets us know WTF is going on behind the scenes. It's going to be some vase somewhere sitting on a table that is wrecking my life isn't it? Ah well at least it is not like sitting there writing opengl for decades....

    EDIT: Just as I was finishing off this epic post (aka suicide note) the lightmapping on unity again literally turned off my PC. During 5/11 clustering I think. Im going to stop bitching on on here now and give up until a new Unity comes out, Im sorry for the negativity towards this GI, but I hope you can understand. At least when there was RCs coming out I held out hope, and things were improving weekly, I can only hope new official increments come out so fast.

    IFF I discover anything of worth I will post again, It's becoming a diary of my GI woes here LOL.. I still love Unity and all the developers, I'm just frustrated I guess.. Apart from the GI, everything seems perfect!..

    Keep baking!!
    Gaz.
     
    IgorAherne and Meltdown like this.
  5. Jde

    Jde

    Joined:
    Oct 2, 2011
    Posts:
    139
    Just wanted to chip in here to say that I'm also still having issues with lightmapping, so you're not alone! I need to do some more complete tests with the full release version but so far I've not seen much improvement.

    Also, watch this.

    That's Joachim on stage yesterday at the GDC announcement. You can see his editor hang briefly when trying to select the plane, and it looks to me like the culprit is the continuous baking process! Notice too how his progress bar shows 5/11 Clustering.
     
  6. antenna-tree

    antenna-tree

    Joined:
    Oct 30, 2005
    Posts:
    5,324
    It would help to know a little more about the scene you're trying to bake and the bake settings you have.
     
  7. Nubeh

    Nubeh

    Joined:
    Oct 7, 2012
    Posts:
    47
    hey, I have the EXACT same problem. My project also hangs at 5/11 Clustering and I get a bunch of Failed opening GI file: '8c/8cdda25931f6770e9ea554b65c0b61f8.ppg'. errors.

    I have a fairly big scene that used to crash Unity 4.6 when building the lightmaps.
     
  8. richardh

    richardh

    Joined:
    Mar 7, 2012
    Posts:
    226
    I/m also getting the very same error as Nubeh (above). hangs at 5/11 Clustering. Only my scene is a simple test scene with a plain and 4 cubes with a directional light.
     
  9. antenna-tree

    antenna-tree

    Joined:
    Oct 30, 2005
    Posts:
    5,324
    Posting your bake settings when getting this error would be helpful.
     
  10. Jde

    Jde

    Joined:
    Oct 2, 2011
    Posts:
    139
  11. Nubeh

    Nubeh

    Joined:
    Oct 7, 2012
    Posts:
    47
    this makes me sad...I've been waiting for so long to be able to bake my lights in my level and it still doesn't work. But how come the folks at Camouflaj were able to work on their remastered version of République? Is it because all their lighting is in real time?
     
  12. mittense

    mittense

    Joined:
    Jul 25, 2013
    Posts:
    168
    I get the same error. And my scene is large in units, but there's not much there. Screen shot of the scene and bake settings is attached. Screenshot 2015-03-05 23.07.25.png Screenshot 2015-03-06 18.44.22.png
     
  13. DethRaid

    DethRaid

    Joined:
    Aug 29, 2010
    Posts:
    210
    I have also experienced this issue, except that for me Unity likes to hang up during Light Transport.

    I downloaded Unity 5 on Tuesday, ready to give my project awesome lighting, and spent the next few days letting my computer run almost constantly to bake the lighting. I've run probably five or six baking jobs since Tuesday. At first, they all hung up on Light Transport with 6 jobs left, but once it hung up with 31 jobs left and more recently it's been hanging up with only 1 job left. I've let it run overnight as much as I can, only to wake up to 'Light Transport | 6 jobs'. Yesterday Unity 5 finally finished a baking job. I was rather excited, since I've been waiting all week for a finished GI bake, but then I glanced at the console and found two errors:

    and

    I have 16 GB RAM, along with an i7-4710M CPU and a 1 TB HDD that is nowhere near full, leading me to believe that this issue is not due to my system specs... although if Unity 5 really does need 80 GB RAM to back GI, then I guess my system specs are the problem :p

    Bake settings, along with a listing of all the lights in my scene:



    It's worth noting that, after baking the GI failed, opening the scene in Unity caused it to re-import all my assets.
     
  14. protopop

    protopop

    Joined:
    May 19, 2009
    Posts:
    1,560
    try using 2 texels per unit and/or non-directional lightmaping and see if it helps:)
     
    halfshey likes this.
  15. DethRaid

    DethRaid

    Joined:
    Aug 29, 2010
    Posts:
    210
    I tried that, and it finished in like 5 minutes. Then I tried Directional and Directional Specular, and those both worked. Then I increased the texels per unit (tpu) by one for a while. That worked fine until I got to 7 tpu, at which point the baking job hung up again. I'm letting it run to see if it gives me the same error message. I'm also going to mess around with the other settings and see if this issue is related purely to the tpu or if there are other factors.

    Update 11:30 EST: 7 tpu baked, it just took a couple hours. I'm continuing to increase the resolution until the bake job fails.

    Update 23:43 EST 3/9: I'm up to 19 tpu, which is currently hanging up on '12/15 Bake Indirect | 1 jobs'. Will report on further developments.

    Update 10:45 EST 3/10: 19 tpu has been running for 14 hours, and is still stuck on '12/15 Bake Indirect | 1 jobs'. This is interesting, since 8 - 18 tpu all completed in no more than half an hour. I'm going to manually stop the 19 tpu job and poke around in the settings for a while.
     
    Last edited: Mar 10, 2015
    protopop likes this.
  16. koobazaur

    koobazaur

    Joined:
    Nov 6, 2013
    Posts:
    46
    Pitching in as another Dev getting a bunch of errors in the console. Baking hasn't finished yet so I don't know if it will hang or not, or if the outcome will even look right.

    Also getting a bunch of errors that just say "pig". Anyone else getting that?

    I'm not that fat :(
     
    IgorAherne and Meltdown like this.
  17. DethRaid

    DethRaid

    Joined:
    Aug 29, 2010
    Posts:
    210
    I have not any errors that just say 'pig', all the errors I get are after the lighting finishes baking.
     
  18. GoGoGadget

    GoGoGadget

    Joined:
    Sep 23, 2013
    Posts:
    864
    I actually got a new BSOD that I'd never had before today whilst baking (or, trying to bake) Unity 5 lighting in my scene. Very impressive. Getting these issues as well in my scene (2x2km terrain with default settings). Going to try really knocking down the texels/unit and seeing if it bakes then.

    Edit: Looks like that hasn't fixed it, stuck at this:
     
    Last edited: Mar 13, 2015
  19. protopop

    protopop

    Joined:
    May 19, 2009
    Posts:
    1,560
    Instead of Directional Specular try Non-directional and 2 texels per unit to start. I cant get my scenes to bake with Directional specular.
     
  20. GoGoGadget

    GoGoGadget

    Joined:
    Sep 23, 2013
    Posts:
    864
    Tried that, and found out that Unity's GI baking is the only way I can reliably get my computer to BSOD (with a BSOD screen that's never displayed before)! Kind of ridiculous.

    But yeah, the errors still get spammed. Might have a fiddle around with some shaders, but they popup for the terrain as well, which is using the standard terrain shader...
     
  21. LepR

    LepR

    Joined:
    Dec 24, 2013
    Posts:
    1
    Hello. Maybe it can help someone.
    We had a similar issue with stucking on 14/15 Compositing. The problem was with "Comressed" checkbox and Android ETC2 compression. We solved it by unchecking that and choosing compression manually on lightmap in Inspector.
     
  22. essimoon2

    essimoon2

    Joined:
    Nov 13, 2013
    Posts:
    195
    Kind of similar issue here. We're having 5 stages with different ligthing, different geometry count, etc. and the last one which has on average a bit more geometry in it (~ +100k polys) it runs out of ram with windows telling me to close programs to prevent data loss. The problem is way more present if final gather with default 1024 rays is enabled. The scenes I'm talking about roughly contain 350k polys and were no problem for beast.
     
  23. LtCalumbo

    LtCalumbo

    Joined:
    Jan 28, 2014
    Posts:
    32
    Hi there, same problems. Stuck on Light Transport with 1 job to go.

    However, I noticed I had objects with unlit shaders that I forgot to hide before the bake. Hid them and now the baking seems to be working. on stage 12/15 right now. Think there's a connection there?
     
  24. essimoon2

    essimoon2

    Joined:
    Nov 13, 2013
    Posts:
    195
    Not sure if it's a variation of this issue but recently I often get stuck at the "bake reflection probes" step when I have no reflection probes in the scene,.Adding a reflection probe fixed the issue for me, though :/
     
    LtCalumbo likes this.
  25. LtCalumbo

    LtCalumbo

    Joined:
    Jan 28, 2014
    Posts:
    32
    Same here
     
  26. Harold_83

    Harold_83

    Joined:
    Nov 25, 2014
    Posts:
    45
    Im getting hung up on 7/11 Light Transport | 90 jobs and I have all the other settings on low.
     

    Attached Files:

    • GI.JPG
      GI.JPG
      File size:
      54.8 KB
      Views:
      1,332
  27. essimoon2

    essimoon2

    Joined:
    Nov 13, 2013
    Posts:
    195
    Are you getting any errors? Or is your Ram maybe full? I noticed in most of my issues that the Ram usage was at 95% which seemed to cause the issue. I found 2 processes im my task manager called "JobProcess" which were both around 3 GB each and thus consumed most of my 8 GB ram.

    I'd really appreciate an official statement concerning this matter. It prevents most of my bakes from succeeding and I can't combine many of the high quality features (like final gather, high lightmapping parameters, higher resolution...) without getting errors. It looks like a major performance leak to me, never saw a process eating up that much ram while not completing its job.

    It would be really useful to know if a fix/ performance improvement can be expected anytime soon. :)
     
  28. KEngelstoft

    KEngelstoft

    Unity Technologies

    Joined:
    Aug 13, 2013
    Posts:
    1,366
    Hi! Just found this thread - there is a lot of stuff to cover because so many different issues were piled into one thread. It is way easier for us to keep track of the threads you make a new thread per issue rather than hijacking existing threads.
     
  29. KEngelstoft

    KEngelstoft

    Unity Technologies

    Joined:
    Aug 13, 2013
    Posts:
    1,366
    Hi @radiantboy! It sounds like you are either using a very high resolution or just have an amount of geometry in your scene that is above the ordinary. Memory usage during some of the stages can grow a lot if you have too high settings, and the OS will start swapping to the harddrive which is a lot slower than RAM. It also sounds like you are manually setting the maximum virtual memory size, which sounds dangerous, as the system will crash if it is exceeded. I think you posted a bugreport with your scene, would you mind posting the case number here so we can follow up?
     
    radiantboy likes this.
  30. KEngelstoft

    KEngelstoft

    Unity Technologies

    Joined:
    Aug 13, 2013
    Posts:
    1,366
    PIG is short for Precomp Input Geometry :) The pig error message has been improved in the next patch release so it is actually humanly readable.
     
  31. Silver_dragon

    Silver_dragon

    Joined:
    Mar 28, 2015
    Posts:
    1
    KEnglesoft, sorry but is all about the same problem basicaly, Baking lights is not working. I have the same issue, I had even tryed different computers since in some of them, baking lights gives me BSOD or just restarts the computer, in some of them only showing the errors descrived previously. No matter if is a directional light, or point lights.

    Not having this feature is a BIG problem, hope you guys can fix it, is the only problem i found in unity 5 at the moment. Keep the good work
     
    SirBedlam and GoGoGadget like this.
  32. srmojuze

    srmojuze

    Joined:
    Mar 18, 2013
    Posts:
    127
    FWIW certain parts of GI precompute/baking is noticeably improved by a nice fast SSD. Besides raw CPU power and 16GB++(?) of RAM. Will post screenshots later of nice GI stuff and a "patchiness" bug I found.
     
  33. KEngelstoft

    KEngelstoft

    Unity Technologies

    Joined:
    Aug 13, 2013
    Posts:
    1,366
    @Silver_dragon did you report this?

    We are working as fast as we can on fixing the issues that have been reported.
     
  34. lmbarns

    lmbarns

    Joined:
    Jul 14, 2011
    Posts:
    1,628
    Getting this error in the latest patch release of Unity 5 from Friday.........just upgraded project from 4 to see how pretty it would be.

    There are 4m vertices in my scene, it's a VR vis sim, runs at 60+fps with culling in Unity 4x, but it's definitely a doozy. Already shipped just wanted to poke around 5 after attending the Seattle Roadshow Saturday.
     
    Last edited: Mar 30, 2015
  35. GoGoGadget

    GoGoGadget

    Joined:
    Sep 23, 2013
    Posts:
    864
    The scene I reported (which apparently you guys couldn't reproduce any errors on) had the same issues that @Silver_dragon is mentioning (GI not baking, tons of different errors spammed, BSOD with certain values) - not sure what else we can do if you guys can't reproduce the issues on your machine?
     
  36. radiantboy

    radiantboy

    Joined:
    Nov 21, 2012
    Posts:
    1,633
    Hi guys, Unity got in touch 2 days ago about the bug and level I submitted, good news!!

    "We have found several issues occurring in your scene and have sent them for a resolution with our developers. We cannot say when the resolution will be publicly available."

    Awesome, I think maybe the next update of Unity5 will have less GI issues :-D

    Ive been working on the game in darkness until this is better hehe. Long Live Unity :D

    Gaz
    PS I have messaged KEngelstoft in private already
     
    Last edited: Mar 31, 2015
    montyfi, protopop and GoGoGadget like this.
  37. KEngelstoft

    KEngelstoft

    Unity Technologies

    Joined:
    Aug 13, 2013
    Posts:
    1,366
    There must be some hardware or OS differences that causes only some machines to BSOD. We are looking into it.
     
    radiantboy and GoGoGadget like this.
  38. Darkman007

    Darkman007

    Joined:
    Apr 2, 2015
    Posts:
    1
    Hi to all. Have same problem with

    Failed writing to: 'C:/Users/.../AppData/LocalLow/Unity/Caches/GiCache/ae/ae7b941d7ba55d760fb99fe2e8d65d9c._comp_light.exr.tmp'.


    and

    'Compositing' job failed with error code: 6 ('Failed writing or importing the composited texture file.').

    only when i try to choose other location for GiCache to another disk :) If i choose my system local folder C:/Users/ ... there gonna be work....

    But after change directory i just restart unity and - it's works fine with other directory!
     
  39. montyfi

    montyfi

    Joined:
    Aug 3, 2012
    Posts:
    548
    I have the same problem, baking stays forever on 7/11 Light Transport | 7 jobs
    Baked Resolution: 5
    Indirect Resolution: 1
    I started from default resolution 50, windows 8.1 crashes, reduced to 25, the same. After reducing to 5 Windows stops crashing, but process continues endlessly.

    To Unity, why put 50 as default resolution if seldom computer can do the job?

    P.S. Resolution 2 and Non Directional seems just finished.
    Anyone know where I can find some comparison images, just to see what I'm missing, setting resolution to 2 and using non directional?
     
  40. KEngelstoft

    KEngelstoft

    Unity Technologies

    Joined:
    Aug 13, 2013
    Posts:
    1,366
    There is no good default resolution, since users can choose what they want a unit to be... Meters, centimeters, inches, light years, nautical miles. You have to set a resolution that makes sense for your scene and the scale of your content.
     
  41. radiantboy

    radiantboy

    Joined:
    Nov 21, 2012
    Posts:
    1,633
    Hi guys, I have been trying GI (using 5.0.1) on my smaller scenes, MUCH smaller. It all seems to work pretty perfectly, the results are insane. When I try the latest Unity 5.0.1 on the scene I am having trouble with (which is huge) I get red errors in the console which just point me to a mesh (lots of them) but with no actual error message, still nice to know what is causing the issues though. A bake wont complete it just keeps bringing them errors up and never proceeds.

    It turns out my PC turning off may not strictly be Unity related, it's simply that calculating the GI is the most intense thing a computer can do right now (beowolf cluster on standby) and it pushes up the temperature of my CPUs to the point (100C+) where the PC turns itself off to stop total melt down, which is nice :) But the fact is my PC has turned itself off twice even when Unity is not running since summer started :-(... Time to rip half the front off my pc and replace it with fans :) It's already a virtual wind tunnel in there.

    I think this 5.1 beta coming up any day may solve a lot of the stuff but who knows, for now I recommend forgetting your huge scenes and learning the black art of GI on your really small scenes, I must say it has blown my mind how good it is. My game has gone from looking like a budget PS2 game to a budget PS4 game ! Yay..
     
  42. lmbarns

    lmbarns

    Joined:
    Jul 14, 2011
    Posts:
    1,628
    Grrr 2nd project I can't get lighting working in u5...I figured the first project was simply too big, but now I'm in a scene with 1 small 1 room building and a car and it's crashing when baking with 780 ti gpu, on a decent desktop. Running the latest Unity patch release.

    I even hid the car and am trying to bake and it's 40+ minutes for a single building + dozen primitives with 100k total polys on desktop????!?!?! CPU usage set to medium.

    The console just spams "pig" (calling me names?) and "Failed Opening GI File: hex string". (image attached)

    Failed Opening GI File: '3e/3e1e4e2b0fd9d6830125345975721c2c.ppg'

    Grrr.
     

    Attached Files:

    • gi.png
      gi.png
      File size:
      44 KB
      Views:
      1,233
    Last edited: Apr 9, 2015
  43. KEngelstoft

    KEngelstoft

    Unity Technologies

    Joined:
    Aug 13, 2013
    Posts:
    1,366
    Hi! The pig error message should be a lot more readable in 5.0.1patch1. It means that a precomp input geometry file couldn't be loaded, which your other errors are also indicating. This really should not happen, would you mind reporting this using the bugreporter?
     
  44. lmbarns

    lmbarns

    Joined:
    Jul 14, 2011
    Posts:
    1,628
    Arg I thought the patch release page had the latest Unity version....upgrading to 5.0.1 now.
     
  45. lmbarns

    lmbarns

    Joined:
    Jul 14, 2011
    Posts:
    1,628
    U 5.0.1f1 is still throwing the "Failed Opening GI File: hex string" errors when I try baking.

    edit:: It's also destroying the meshes in the scene (in play mode only, goes back to normal when I stop play mode) after it does finish "baking"..... (image attached)
     

    Attached Files:

    Last edited: Apr 10, 2015
  46. KEngelstoft

    KEngelstoft

    Unity Technologies

    Joined:
    Aug 13, 2013
    Posts:
    1,366
    Wow that is a spectacular looking bug, that busted mesh... Would you mind filing a bug report with that?

    5.0.1patch1 with the improved message will be out April 15th is all goes well.
     
  47. lmbarns

    lmbarns

    Joined:
    Jul 14, 2011
    Posts:
    1,628
    Yeah at some point today I'll submit one.

    It's still calling me names in 5.0.1f1 ("pig")

    edit:: also getting another error in the mix:

     

    Attached Files:

  48. KEngelstoft

    KEngelstoft

    Unity Technologies

    Joined:
    Aug 13, 2013
    Posts:
    1,366
    Yeah, sorry about that. The improved message made it into the 5.0.1p1 release, which is out now http://unity3d.com/unity/qa/patch-releases
     
    shkar-noori likes this.
  49. Harold_83

    Harold_83

    Joined:
    Nov 25, 2014
    Posts:
    45
    Now the lighting is broken. It was working fine before. I went to a scene that I previously baked. Now Im getting botches of shadows on certain meshes and those white and green pixelated errors. When I try to crank up the Rez on one mesh it moves to another mesh. AGGGHHHHh!!!!
     
    Last edited: Apr 17, 2015
  50. KEngelstoft

    KEngelstoft

    Unity Technologies

    Joined:
    Aug 13, 2013
    Posts:
    1,366
    Are you getting artefacts, even without compression enabled?