black lightmaps

hi,

somehow, i really seem to struggle with enlighten… :frowning: 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…

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.’).

Try cleaning cache(Under edit/preferences) and bake again. Currently, there are too many bugs regarding GI system.

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. :frowning:
submitted a bug (667024)

While the lightmaps are baking black, just make a horror game for now, it looks spooky :slight_smile:

1 Like

Thanks for reporting, we’ll take a look.

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.

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.

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…

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.

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