Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 13 Next capture
2021 2022 2023
1 capture
13 Jun 22 - 13 Jun 22
sparklines
Close Help
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
avatar image
0
Question by frevd · Aug 29, 2013 at 03:13 AM · how many

How to safely manage 100 large JPEGs in a picture viewer app

So here is my problem, and I need a conceptional solution for it.

I'm having 100 JPEGs to show in a picture viewer app. Every JPEG is up to Retina resolution so might have 2880x1800. My Asset folder is 100 MB, which is the total size of the compressed JPG files. I put all those textures into a Resources folder and enabled automatic compression in the texture properties. Now I made a test build for Android and got a shocking 1.3GB large APK. Question - why can't textures not be saved in a compressed manner like they can on disk? Why do 100MB of input files result in a Gigabyte of APK, which is also compressed?? I do understand that the factual VRAM usage would be several Gigabytes of course, but why the package? The only solution for me would be to host the JPEGs on a server and load them (even though that leads to ugly breaks in interactivity of several seconds whenever a texture gets initialized due to single-threading in unity). And if I do that - how does unity manage the memory when I load texture after texture (but unloading objects once no longer displayed)? Will I run into problems which will make the app crash after some textures were loaded? How in the world can such an app be realized at all? I'm seriously thinking about using PhoneGap and create a stupid HTML-App, since it apparently is much more capable than unity to manage such a task, even though animations would be more difficult. Any ideas how to safely do that in unity? Many thanks, frevd

Comment
Add comment · Show 8
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image getyour411 · Aug 29, 2013 at 03:23 AM 0
Share

Did you look at your build log and see if there are other unintended elements in Resources (or subfolders of Resources) that is artificially driving your size up?

avatar image sooncat · Aug 29, 2013 at 04:24 AM 0
Share

try to check texture Import settings: 1.disable Read/Write Enable 2.disable Generate$$anonymous$$ip$$anonymous$$pas

avatar image frevd · Aug 29, 2013 at 10:31 AM 0
Share

Oh right, thanks for the hint. The build takes an hour or so, so I didn't try often. Read/write was disabled and the $$anonymous$$ip$$anonymous$$aps I need to display pictures in various sizes, even though using GUI.DrawTexture. However, Textures are NPOT (not square and not power-of-2).

The log file says:

 Textures -1346028.3 kb 100.6% 
 $$anonymous$$eshes 0.0 kb -0.0% 
 Animations 0.0 kb -0.0% 
 Sounds 0.0 kb -0.0% 
 Shaders 0.0 kb -0.0% 
 Other Assets 480.8 kb -0.0% 
 Levels 25.1 kb -0.0% 
 Scripts 10.8 kb -0.0% 
 Included DLLs 4.9 mb -0.4% 
 File headers 2.0 mb -0.2% 
 Complete size -1338458.1 kb 100.0% 
 
 Used Assets, sorted by uncompressed size: 
 46.5 mb -3.6% Assets/Resources/_Torre_16.jpg 
 ... 
 31.6 mb -2.4% Assets/Resources/2012_04_03__caracas_00326.jpg 
 ...
 21.5 mb -1.6% Assets/Resources/Floor_Plans_All.jpg 
 ... 
 14.0 mb -1.1% Assets/Resources/2011_05_06__caracas10_00592.jpg ... 
 9.6 mb -0.7% Assets/Resources/UTT_$$anonymous$$C_Section_La_Ceiba.jpg 
 ... 
 
 *** Completed 'Build.Player.AndroidPlayer' in 2396 seconds 

Something is wrong here definitely.

avatar image robertbu · Aug 29, 2013 at 11:35 AM 1
Share

Ugly hack: There should be a way to include files with the build such that they appear at the Application.persistentDataPath of the build on Android (I can on iOS). If so, then you can use the WWW class to load the images.

avatar image frevd · Aug 29, 2013 at 12:40 PM 1
Share

Okay, seems the problem is the NPOT thing.

http://forum.unity3d.com/threads/54954-NPOT-Textures

Show more comments

0 Replies

· Add your reply
  • Sort: 

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this Question

Answers Answers and Comments

17 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

Removing segments 1 Answer

How can i make the ball in a Pong game move without using rigidbody function and bouncy (Physics Material) 0 Answers

Loading a font via WWW 0 Answers

How do you destroy more than one prefab clone? 1 Answer

How to climb Ledges? 0 Answers


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges