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

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

Discussion in 'Unity 5 Pre-order Beta' started by seattlebluesky, Dec 4, 2014.

  1. seattlebluesky

    seattlebluesky

    Joined:
    Sep 2, 2014
    Posts:
    170
    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/<username>/Library/Caches/com.unity3d.UnityEditor/GiCache/70/70202090d0d090e060804050f0a0b0e0.rgb'. Failed to read bake texture: 70202090d0d090e060804050f0a0b0e0

    The file on disk is actually,

    /Users/<username>/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!'.
     
  2. KEngelstoft

    KEngelstoft

    Unity Technologies

    Joined:
    Aug 13, 2013
    Posts:
    1,366
    This should be fixed in beta17.
     
  3. seattlebluesky

    seattlebluesky

    Joined:
    Sep 2, 2014
    Posts:
    170
    Thanks for the update.
     
  4. seattlebluesky

    seattlebluesky

    Joined:
    Sep 2, 2014
    Posts:
    170
    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 :( on Mac OS X. Haven't tried the Windows build yet. I will today.
     
  5. Jonny-Roy

    Jonny-Roy

    Joined:
    May 29, 2013
    Posts:
    666
    Windows works fine it only affects Mac OS X! Well for me anyway.
     
  6. seattlebluesky

    seattlebluesky

    Joined:
    Sep 2, 2014
    Posts:
    170
    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.
     
  7. KEngelstoft

    KEngelstoft

    Unity Technologies

    Joined:
    Aug 13, 2013
    Posts:
    1,366
    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.
     
  8. seattlebluesky

    seattlebluesky

    Joined:
    Sep 2, 2014
    Posts:
    170
    Beta 18 baked with no console errors on Mac OSX. Thanks!
     
    KEngelstoft likes this.