Search Unity

  1. Unity Asset Manager is now available in public beta. Try it out now and join the conversation here in the forums.
    Dismiss Notice

black lightmaps

Discussion in 'Unity 5 Pre-order Beta' started by kryptopath2, Jan 22, 2015.

  1. kryptopath2

    kryptopath2

    Joined:
    Jul 19, 2013
    Posts:
    104
    hi,

    somehow, i really seem to struggle with enlighten.. :( i have a scene with some buildings. all objects have the standardshader. when i bake the lightmap it turns out all black.

    without lightmap:


    with lightmap:


    strangly when i start the process it sort of freezes at calculating the reflection probes. i only have access to the lighting-window, when i click somewhere else i hear the typical windows "bing" with the lightingwindow slightly flashing at the edges. i can see the lightmaps, and they have the expected shadows. but not in the scene view or in play-mode.
    happens in 18 and 20...
     
  2. kryptopath2

    kryptopath2

    Joined:
    Jul 19, 2013
    Posts:
    104
    getting 2 errors while baking:

    Failed opening file: 'C:/Users/********/AppData/LocalLow/Unity/Caches/GiCache/0e/0e936b5f13c6efae4dd5c6aab4e8fc78.osi'.


    'Compositing' job failed with error code: 4 ('Failed reading Indirect file.').
     
  3. Gokcan

    Gokcan

    Joined:
    Aug 15, 2013
    Posts:
    289
    Try cleaning cache(Under edit/preferences) and bake again. Currently, there are too many bugs regarding GI system.
     
  4. kryptopath2

    kryptopath2

    Joined:
    Jul 19, 2013
    Posts:
    104
    thanks.. clearing the cache solved the problem with the errors.
    but using beta21 unity completely crashes while baking the lightmaps.. disabled precomputed realtime GI and final gather. :(
    submitted a bug (667024)
     
  5. Meltdown

    Meltdown

    Joined:
    Oct 13, 2010
    Posts:
    5,822
    While the lightmaps are baking black, just make a horror game for now, it looks spooky :)
     
    kryptopath2 likes this.
  6. KEngelstoft

    KEngelstoft

    Unity Technologies

    Joined:
    Aug 13, 2013
    Posts:
    1,366
    Thanks for reporting, we'll take a look.
     
  7. Nition

    Nition

    Joined:
    Jul 4, 2012
    Posts:
    781
    Hey, I have this exact same issue. Version 5.0.0f2. Project was upgraded from Unity 4. All lightmaps turn out black as above. Errors also the same as above:

    'Compositing' job failed with error code: 4 ('Failed reading Indirect file.').
    Failed opening GI file: '59/59a216eec37a463c90188707a39090fb.osi'.
    'Compositing' job failed with error code: 4 ('Failed reading Indirect file.').
    Failed opening GI file: '59/59a216eec37a463c90188707a39090fb.osi'.

    And so on.

    Will try clearing cache and report back.
     
  8. Nition

    Nition

    Joined:
    Jul 4, 2012
    Posts:
    781
    Reporting back. Clearing the cache stopped me getting the errors while the light map baked.

    However I still got errors at the end, which meant it still came out black:
    Could not access TextureImporter at path Assets/StreamingAssets/{path to my map}/Lightmap-0_comp_light.exr in the Assets folder.

    I tried moving the scene out and StreamingAssets and into another, normal Assets folder, and that time it worked. Whether that was because I moved it or because it just worked the second time I can't say for sure.
     
  9. Joachim_Ante

    Joachim_Ante

    Unity Technologies

    Joined:
    Mar 16, 2005
    Posts:
    5,203
    Generally you can't put scenes into the streaming assets folder. Thats not what it is for.

    It's for dumb data that doens't get imported...
     
  10. Nition

    Nition

    Joined:
    Jul 4, 2012
    Posts:
    781
    Yeah I know, this was a dumb special case.

    Well, I agree that putting scenes into StreamingAssets is usually a dumb and pointless idea. I do have to disagree that you can't put scenes there. Before this one error I don't think there was anything the actually wouldn't work about it.
     
  11. SpiriTx

    SpiriTx

    Graphics QA

    Joined:
    Apr 12, 2012
    Posts:
    252
    Hey,

    I've checked out your case.
    As you mentioned, errors don't repro after clearing the GICache, so that's all good.
    Lightmaps generated in the scene are indeed black, but due to geometry not being static. After I've marked it static, it baked fine. Please try that