1. Help us improve the editor usability and artist workflows. Join our discussion to provide your feedback.
    Dismiss Notice
  2. Unity 5.6 is now released.
    Dismiss Notice
  3. Check out all the fixes for 5.5 in patch releases 1 & 2.
    Dismiss Notice
  4. Get further faster with the Unity Plus Accelerator Pack, free for new Unity Plus subscribers for a limited time. Click here for more details.
    Dismiss Notice
  5. Learn how you'll soon be able to publish your games to China in four simple steps with Xiaomi. Sign up now for early access.
    Dismiss Notice

Texture problem : Graphical Corruptions - Need Help

Discussion in 'General Graphics' started by Noss1325, Apr 5, 2016.

  1. Noss1325

    Noss1325

    Joined:
    Mar 5, 2015
    Posts:
    2
    Hello all,

    As stated on the title, I have a real weird problem showing on textures. After looking everywhere in my scene, and in Unity forums, I still can't figure out how this happens.

    Here is the result of my scene in Unity Editor, like I expect to have in build :
    [​IMG]

    Here is the result when I simply build :
    [​IMG]

    • I tried this on Unity 5.3.3f1, and 5.3.4f1, and builds on PC 64x.
    • The graphical corruption only occurs in build, never in editor.
    • Corruptions shows up only on textures using Unity 5 Standard Specular.
    • In my scene, I used only Unity 5 Standard (simple and specular) Shaders. And I only have one custom script for camera control (a simple free cam).
    • All textures are DTX5 compressed.
    • The more I add textures in the scene, the more I can see corruptions showing up randomly. I obtained this result while having about 500 textures in the scene.

    And this is one of the texture (shown broken in build) properties when selected in Unity :
    [​IMG]

    Is this a Unity known bug ? Please I need help on this.
     
    Last edited: Apr 5, 2016
    radiantboy and uiniti like this.
  2. uiniti

    uiniti

    Joined:
    Feb 4, 2015
    Posts:
    74
    Finally (joke,I wish you had not to deal with this bug) another person with this problem.
    We have had this issue since 5.3.0 and still having it on 5.3.4p1.

    We think it may be caused by a problem with Unity while it builds the assets because it happens on several different materials from standard to speedtree and sometimes we have spotted other textures in the place of the one where there were artifacts.

    Our resource.assets.ress is 4.7GB. On 5.2 it was 2.5GB. We don't know why and we think it may cause by surpassing the limit of 4GB as there was a similar limit on Unity 4.x but lower, unfortunately we couldn't find any mention of that in the manual.

    Building only the main scene doesn't present artifacts where are usually shown: the resource.assets.ress size i 3.4GB.

    We managed to make a build with the file size lowered to 4.3GB and there seems to be less textures having these problems.
     
  3. cblarsen

    cblarsen

    Joined:
    Mar 10, 2007
    Posts:
    267
    Did you guys make an error report to Unity Tech?
    It looks to me like some rendertextures used internally by Unity for lighting get pushed out of graphics card memory when there are a lot of other textures. So with less memory on the graphics card it would happen even sooner.
     
  4. Noss1325

    Noss1325

    Joined:
    Mar 5, 2015
    Posts:
    2
    Seeing your answer made me have the same thought :)

    Well, same thing happens here, but not sure it has to do with build size since I did builds of other scenes with a size of 8Gbytes without any problem. Moreover, each time you want to lower build size, you remove more meshes, which envolves having less textures in the scene.

    Not yey, I wanted to start by forums. I will do if nobody can help by the end of the day.
    Here is my PC config :
    • Graphics : NVIDIA GeForce GTX 970 with 4096Mbytes Type: GDDR5.
    • Memory : 16 GBytes DDR4.
    • CPU : Inter Core I7 6700K.
     
    uiniti likes this.
  5. uiniti

    uiniti

    Joined:
    Feb 4, 2015
    Posts:
    74
    yes we did few days ago.

    I don't know but as I said, building the main scene only doesn't present any problem.

    We have this problem on several configurations GTX 970, GTX 750ti, GTX 560 and another one I don't recall
     
  6. Alloc

    Alloc

    Joined:
    Jun 5, 2013
    Posts:
    91
    Have any of you been able to solve this issue?

    I filed a bug report but so far no response, not even an acknowledgement of the issue. Another QA guy told me though they weren't able to repro and if someone knew how to repro this issue it might help (but I assume by "repro" they mean with a lightweight project, not a multi-GB full project where "anything" could cause the issue).
     
    uiniti likes this.
  7. uiniti

    uiniti

    Joined:
    Feb 4, 2015
    Posts:
    74
    having resource files below 4GB "solved" it.
    Our ticket has been marked as resolved because we used this workaround even it the issue is still there. I'm very disappointed.
     
  8. Alloc

    Alloc

    Joined:
    Jun 5, 2013
    Posts:
    91
    Yeah, if it's not a mobile platform or at least Windows it seems like support is a lot worse :(

    Anyway, are you talking about single resource file size limit to 4 GiB or all the resource files together below 4 GiB? We never had a single file above that limit but still experienced this issue.
     
  9. uiniti

    uiniti

    Joined:
    Feb 4, 2015
    Posts:
    74
    a single resource file below 4.
    The game is on Windows
     
  10. Alloc

    Alloc

    Joined:
    Jun 5, 2013
    Posts:
    91
    Hm, ok, we never had a single one over 4. Wonder if it's really the same issue then.
    Also, are you saying you actually got the issue on Windows? So far I thought this was OSX only?
     
  11. Alloc

    Alloc

    Joined:
    Jun 5, 2013
    Posts:
    91
  12. uiniti

    uiniti

    Joined:
    Feb 4, 2015
    Posts:
    74
    My issue happened on Windows 10, Directx 11 and an Nvidia card.
     
  13. igrir

    igrir

    Joined:
    Jan 24, 2014
    Posts:
    9
    I had an issue similar like this, but it wasn't deferred rendering (I posted about the issue here http://forum.unity3d.com/threads/broken-output-color-on-mac-build.406799/). And yes, it was OSX only problem. I've found the biggest resource file is resources.assets.resS and it's under 4 GB. Still don't know why.

    UPDATE
    Was resolved! Tried to build the Mac using x86_64 architecture output
     
    Last edited: May 27, 2016
  14. radiantboy

    radiantboy

    Joined:
    Nov 21, 2012
    Posts:
    488
    I am having the exact same problem here, I have an asset that is 5.2 gig. Building on windows with Unity 5.4.2f1. It really sucks not being able to make a build to test anywhere... Anyone know if this got accepted as a bug again? I will re-report if not, we need a fix.
     
  15. radiantboy

    radiantboy

    Joined:
    Nov 21, 2012
    Posts:
    488
    I will see if x86_64 solves it for me!!! that 4 gig limit could well be a 32 bit thing, in fact Im almost certain now, fingers crossed, thanks for the tip!.
     
  16. radiantboy

    radiantboy

    Joined:
    Nov 21, 2012
    Posts:
    488
    Damn 64 bit does not fix it.
     
  17. radiantboy

    radiantboy

    Joined:
    Nov 21, 2012
    Posts:
    488
    Nor does an update to 5.5 beta ;-(
     
  18. AlteredPlanet

    AlteredPlanet

    Joined:
    Aug 12, 2013
    Posts:
    371
    Having the same problem, resource assets under 2gb still no fix

    Does having a uncompressed texture in the resources foldoer creates a problem?
     
    Last edited: Nov 4, 2016
  19. ShilohGames

    ShilohGames

    Joined:
    Mar 24, 2014
    Posts:
    1,414
    You are not alone. I recently ran into the same problem:
    https://forum.unity3d.com/threads/textures-messed-up-in-windows-build.440675/

    If I have more than 4GB of textures in my Windows build of my game, then some of the textures will be all messed up, even though the textures look perfectly fine when playing the game through the Unity Editor.

    I am guessing there is a 32bit addressing bug in the Unity standalone build, so it cannot locate past 4GB of textures in the build. I temporarily "solved" the issue by using an asset called "Build Report Tool" to track down a list of the largest textures in my project, and then I deleted all of the textures that I did not need in my game at this time. As soon as I had less than 4GB of textures in my build, then all of the broken texture problems were magically fixed.
     
    Last edited: Nov 14, 2016
    radiantboy and llJIMBOBll like this.
  20. ShilohGames

    ShilohGames

    Joined:
    Mar 24, 2014
    Posts:
    1,414
    The issue does not seem to be related to total assets in the Resources folder. The issue seems to be a hard limit of 4GB on the total textures in the build. Grab the "Build Report Tool" asset. When you build your project, it will show you total texture size in the build under "Size Stats". It will say Textures, Sounds, Meshes, etc under "Used Assets Size Breakdown" on the "Size Stats" section. If the total size of Textures exceeds 4GB, you will run into the problem.
     
  21. llJIMBOBll

    llJIMBOBll

    Joined:
    Aug 23, 2014
    Posts:
    326
    I'm not sure how to issue a Ticket, or maybe should @some Unity Dev Here :D
     
  22. llJIMBOBll

    llJIMBOBll

    Joined:
    Aug 23, 2014
    Posts:
    326
    @Aras @Joe_Robins @antenna tree

    Please view the posts above, there seems to be a 4GB texture limit on 64bit Builds.
     
  23. ShilohGames

    ShilohGames

    Joined:
    Mar 24, 2014
    Posts:
    1,414
    Yeah, the problem here is that the bug only shows up in large projects. It is hard to make a small repro case to submit as a bug report when the problem literally only happens in large projects. Somebody from Unity needs to comment on these threads. I did submit a bug report, but I did not submit my entire project since the source for that project is over 30GB. I just submitted links to the forum threads.
     
  24. karl_jones

    karl_jones

    Unity Technologies

    Joined:
    May 5, 2015
    Posts:
    2,211
  25. radiantboy

    radiantboy

    Joined:
    Nov 21, 2012
    Posts:
    488
    does that mean this wont be "fixed"? we should move to asset bundles? damn really cant be bothered doing that lol.
     
  26. karl_jones

    karl_jones

    Unity Technologies

    Joined:
    May 5, 2015
    Posts:
    2,211
    radiantboy likes this.
  27. radiantboy

    radiantboy

    Joined:
    Nov 21, 2012
    Posts:
    488
    Thanks i will give that a read, I am presuming there is some automated way to make asset bundles, and some convenient way to still work with the files etc and not have to make them each time, and certainly to not have to load things from code. Seems like a bit of a workaround that could cause us to focus on this and not the fun part of making the game, indeed it has already stalled everything for me just weeks before I was due to release a demo, now I cannot. Anyway time to learn asset bundles I guess :)))

     
    Last edited: Nov 19, 2016
  28. karl_jones

    karl_jones

    Unity Technologies

    Joined:
    May 5, 2015
    Posts:
    2,211
  29. radiantboy

    radiantboy

    Joined:
    Nov 21, 2012
    Posts:
    488
    karl_jones likes this.
  30. AlteredPlanet

    AlteredPlanet

    Joined:
    Aug 12, 2013
    Posts:
    371
    karl_jones likes this.
  31. radiantboy

    radiantboy

    Joined:
    Nov 21, 2012
    Posts:
    488
  32. radiantboy

    radiantboy

    Joined:
    Nov 21, 2012
    Posts:
    488
    anyone ever get around this? seems silly I have waited a year to make a build and I still cannot!!! I find the Asset Bundle Graph Tool is basically unusable too right now. Unity has so many bugs stopping me move forward, and it has wrecked ALL animations in my game too.. tough times to be a unity dev ;-(
     
  33. Deckard_89

    Deckard_89

    Joined:
    Feb 4, 2016
    Posts:
    71
    @radiantboy Does this limitation only apply to textures in a resources folder or is it anywhere in the project hierarchy?

    p.s. Don't worry, you probably know how it is with development on Unity by now, it goes in cycles, ups and downs. You're probably in the soul-crushing "stuff not working" period, but the light will return lol, the exciting, creative phase will come back around again.

    That animation thing... I seem to remember reading somewhere that a new version of Unity introduced an extra bone for humanoid rigs (another spine bone I think) to more closely resemble something like 3ds Max biped for example. Perhaps this is related?
     
  34. radiantboy

    radiantboy

    Joined:
    Nov 21, 2012
    Posts:
    488
    Hey man :) Thanks for the words of encouragement, looking forward to getting back into that exciting phase for sure!! Unity can demoralise at times, but of course it can do the exact opposite too most of the time!..

    The 4 gig thing is basically when you make a build, if any of your .asset files exceed 4 gig of textures then I think it happens.

    Animation, im not sure someone just told me to try reimporting the avatars. I would assume if they added another bone, they would not break backward compatibility with existing animations, or they would wreck every game out there. I dont see anyone complaining about it, so I am assuming it is just my project got messed up somehow (not that suprising the amount of times unity has crashed and forced reimports). I believe new animations I have recently imported work, Im gonna try reimporting the avatars on broken anims and see if it works.
     
  35. Deckard_89

    Deckard_89

    Joined:
    Feb 4, 2016
    Posts:
    71
    If that's the case, I'm due a headache as well...
     
  36. radiantboy

    radiantboy

    Joined:
    Nov 21, 2012
    Posts:
    488
    Yep, anyone with any largish game will get it, still happening in unity 2017 beta 1. If you use asset bundles apparently it goes away, I am just waiting for the asset bundle graph tool to mature a bit to try that route again, but it appears that it is not that easy to use for huge projects currently imho. It would be great if it could automatically just build assets from a single scene, but it doesnt appear to work that way.

    Thankfully my anims are fine after a reimport, so only 2 bugs stopping me build right now, this one with the graphical corruption, and another that hangs during building light phase when making a build.
     
  37. radiantboy

    radiantboy

    Joined:
    Nov 21, 2012
    Posts:
    488