Search Unity

  1. How can our website serve you better? Give us your feedback. Take our survey and let us know.
    Dismiss Notice

Texture issues in standalone build (even while resources folder is < 2GB)

Discussion in 'Editor & General Support' started by am_GA, Oct 29, 2018.

  1. am_GA

    am_GA

    Joined:
    Oct 4, 2018
    Posts:
    17
    Hi,

    I believe I'm having similar issues to what has been previously documented here and here.

    The issue is that seemingly random textures fail to load / glitch out, displaying some graphics-card-dump looking nonsense.

    The difference here is that my Resources folder is nowhere near the 4GB limit:




    Used Total: 1.54 GB Unity: 32.5 MB Mono: 1.1 MB GfxDriver: 1.50 GB FMOD: 1.2 MB Video: 0 B Profiler: 1.7 MB
    Reserved Total: 1.59 GB Unity: 70.9 MB Mono: 1.3 MB GfxDriver: 1.50 GB FMOD: 1.2 MB Video: 0 B Profiler: 12.0 MB
    Total System Memory Usage: 1.75 GB

    Textures: 726 / 1.50 GB
    Meshes: 6 / 42.0 KB
    Materials: 11 / 19.0 KB
    AnimationClips: 32 / 137.0 KB
    AudioClips: 0 / 0 B
    Assets: 1746
    GameObjects in Scene: 51
    Total Objects in Scene: 264
    Total Object Count: 2010
    GC Allocations per Frame: 12 / 0 B


    Here's an asset (png image with transparency) in Editor:



    versus the same asset in standalone Build (x86_64):


    Here are my image settings (all assets are png, all same settings):


    Build Settings > Player Settings...



    Software:
    Windows 10 Pro
    Unity 2018.2.10f1 (64bit)

    Hardware:
    Dell Precision Tower 3420
    Processor: Intel Core i7-7700 CPU @ 3.6GHz
    RAM: 16GB
    Graphics: NVIDIA Quadro K1200

    I'm hesitant to spend the time either 1) implementing AssetBundles into the project or 2) resizing every single texture in the project to be a multiple of 4 (as per compression warnings in texture settings), as I'm not sure I'm actually dealing with a large amount of assets here, thus the problem should lie elsewhere.

    I guess if anything I'd just like to hear from anyone who's had this particular issue (while under 4GB) and managed to solve it.

    Thanks a lot.
     
  2. am_GA

    am_GA

    Joined:
    Oct 4, 2018
    Posts:
    17
    Just updated gfx drivers with same results. Also tested standalone on another PC (with NVIDIA GeForce GTX 1080) with pixel perfect identical corruptions, confirming the issue definitely has to do with the Unity build process and not the machine(s).
     
  3. am_GA

    am_GA

    Joined:
    Oct 4, 2018
    Posts:
    17
    I've updated to v2018.2.15f

    When building with LZ4 and LZ4HC compression, the following error occurs:

    Serialized file size of 5.68 GB (6097327280 bytes) exceeds maximum. File name: /Users/<PATH_TO_APP_ROOT>/Temp/StagingArea/Data/resources.assets. Serialized files over 4.00 GB (4294967295 bytes) cannot be loaded by the player. Some likely ways to reduce this are utilizing asset bundles, re-balancing asset locations, or limiting their serialized size e.g. limiting the maximum texture sizes.
    UnityEngine.GUIUtility:processEvent(Int32, IntPtr)


    However with "Default" compression I get no errors (but the texture issue remains).

    Would love if someone could confirm or deny if implementing asset bundles would solve this issue when resources are under 4GB and no error message regarding serialized resources size occurs. I ask because doing so will cost a lot of time. Thanks a lot.
     
  4. AcidArrow

    AcidArrow

    Joined:
    May 20, 2010
    Posts:
    7,936
    Your Resources folder may be less than 2gb (I'm guessing you are using jpegs or something?), but when they are compressed for the GPU appropriate format, they are over 4GB it seems as per the warning in the last message.
     
  5. am_GA

    am_GA

    Joined:
    Oct 4, 2018
    Posts:
    17
    Okay yeah, even with default compression and no warnings/errors, the
    resources.assets.resS
    file inside the app bundle is 6.08GB. Asset bundles it is. Thanks for the response.
     
unityunity