1
\$\begingroup\$

I made a application where a bunch of images are loaded and placed in 3d. The total amount of images in the asset folder are about 10.000 images. Only 1100 random of these images get actually used in the application. This is different eachtime on startup. The total size of the Assets folder is 3.2GB.

See the Image below for confirmation:
enter image description here

Now when i build the application the application wont display any of the images in 3D space... :( So i went to investigate, and i found out that my resources.assets file is over 10GB in SIZE!! And i found out that unity cant really handle a resources.assets file more then 4GB. See the proof below: enter image description here

So i have no idea what happens here or what to do about it.. All suggestions are welcome!
If more explaination or details are needed let me know.

Edit:
Maybe the image import settings are useful to know.. I just used the default settings.. See image below:
enter image description here

\$\endgroup\$
3
\$\begingroup\$

Check your Build Report: When you have finished your build in Unity go to Console > Open Editor Log. Search the document on Build Report You'll see a nice overview (in percentage) of data usage divided in categories. Most of the time the textures are the biggest load!

Reducing the 'image' size scales down your Texture dimensions as well. Down your 'max size' to 1048 or 512 could help. I'm also used to using the best quality images but it's most of the time just an overkill.

Also the 'Crunch Compressing' works pretty good. (in my short experience with Unity) I see it's not ticked.

The Unity Docs explain Crunch compression very well: Crunch is a lossy compression format on top of DXT or ETC Texture compression. Textures are decompressed to DXT or ETC on the CPU and then uploaded on the GPU at runtime. Crunch compression helps the Texture use the lowest possible amount of space on disk and for downloads. Crunch Textures can take a long time to compress, but decompression at runtime is very fast.

If you haven't check your build report please do so, it's very helpful to see where it could be going wrong :)

\$\endgroup\$
1
\$\begingroup\$

When you put an image in your project, regardless of the import settings, the full image is saved in the Assets folder. So if you take an image that has a size of 100MB, and import it to be small and low quality, this will only appear in your final app and not in your Assets folder.

Also regardless of how many images you use in your app, all images exist in the Assets folder. What Unity Cloud does, is take everything that is part of the project, and then it decided if it should include an image to the final build, or to scale down an image.

So if you have a 1GB project but you use half of the assets there, and they all are imported as low quality, the final build could be even less than 100MB.

How to solve this? Either build the project yourself, or remove assets that you are absolutely sure you are not gonna include them in your project. 10.000 images are a lot for most project, so there is a chance you are doing something wrong. If I'm mistaken, and you need them all, then you simply cannot use Unity Cloud for this project.

You can also resize the images to more manageable sizes, but I suspect that's going to be too cumbersome.

\$\endgroup\$
  • \$\begingroup\$ yeah but the weird thing is that the original images have a size of around 50kb each. But when i import them unity makes them bigger? or atleast the textures \$\endgroup\$ – FutureCake Jul 26 '18 at 22:49
  • \$\begingroup\$ an other thing, what exactly is Unity Cloud? \$\endgroup\$ – FutureCake Jul 26 '18 at 22:55
  • \$\begingroup\$ @FutureCake the size increase is not surprising. Built games use GPU compression formats, which are optimized for random read patterns but aren't as efficient at reducing data size as non-GPU formats like PNG or JPEG. \$\endgroup\$ – DMGregory Jul 27 '18 at 2:11

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.