Baking GI lightmaps generates several 'Failed to read baked texture errors'.

This was entered as issue http://fogbugz.unity3d.com/default.asp?645661_h7ipelvkq6nmeg0c against Beta 11 on Nov 11th. It still occurs for me on every bake with Beta 12 through to the current Beta 16.

I didn’t add repro’ steps to the case but did add the light-map textures in question and performed some analysis on the logs.

What is interesting to me is the bogus error report,

Failed opening file: ‘/Users//Library/Caches/com.unity3d.UnityEditor/GiCache/70/70202090d0d090e060804050f0a0b0e0.rgb’. Failed to read bake texture: 70202090d0d090e060804050f0a0b0e0

The file on disk is actually,

/Users//Library/Caches/com.unity3d.UnityEditor/GiCache/72/7229dd9e6845fabec58a0bd853b6644e.rgb

Note the additional zeros in the file path.

72/7229dd9e6845fabec58a0bd853b6644e.rgb has become 70/70202090d0d090e060804050f0a0b0e0.rgb with zeros inserted after each hex digit.

This could be just a formatting issue in the path string used to show the error, or perhaps a construction issue in the path used to attempt to read the bake texture.

Either way I attached sample .RGB images that had the issues to the original case.

What gives? Even though there’s no repro’ steps, beyond perhaps baking the Church scene in the Unity Asset Store ‘Church & Graveyard’ asset, I’m sure a Unity Dev can easily look at the code path leading to

/Users/builduser/buildslave/unity/build/Editor/Src/GI/Enlighten/BakeTextureManager.cpp Line: 127

and go ‘doh!’.

This should be fixed in beta17.

Thanks for the update.

FWIW the issue still reproduces in b17 at the same location.
(Filename: /Users/builduser/buildslave/unity/build/Editor/Src/GI/Enlighten/BakeTextureManager.cpp Line: 127).

Actually I’ve yet to be able to bake this scene successfully with recent builds of Unity 5 :frowning: on Mac OS X. Haven’t tried the Windows build yet. I will today.

Windows works fine it only affects Mac OS X! Well for me anyway.

So I baked the scene using the 64-bit version of the Unity editor on Windows 7 on the same hardware. Worked fine. The 32-bit version of the Unity editor had memory allocation issues. The Mac version of the Unity editor, which is 64-bit I believe, continues to have the texture baking errors originally reported.

The fix for hashing on Mac went into beta18, so it makes sense why you are still seeing errors on beta17. Please let me know if beta18 works for you.

Beta 18 baked with no console errors on Mac OSX. Thanks!

1 Like