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
5
Question by JFBillingsley · Aug 05, 2013 at 09:18 PM · androidiphonegraphicsmemory

Does using "half res" in the quality settings reduce texture RAM usage?

I'm looking into ways to make my game work better on older mobile devices (both iOS and Android). We have lots of textures for 2D graphics and they're definitely the biggest memory consumers.

One thing that I keep seeing pop up over and over is that if I enable mipmaps on those textures, I can just change the quality settings on game load to use full, half, quarter, or eighth res textures. While this does seem to affect the visual quality on the device, in the profiler the textures are still using the same amount of RAM. For instance I have a 2048 square texture at 16 bit with mipmaps enabled, which is 10.7MB. The memory consumption for this texture is ALWAYS 10.7MB, regardless of the quality settings.

I've heard conflicting reports about whether or not all the mipmap levels of the texture are actually loaded into RAM. Some say they are, some say they're not. So.... which is it? When I reduce the texture quality, are the top-level mipmaps actually being discarded from RAM and the profiler fails to report that? Or is it just that the top-level mipmaps aren't sent to the GPU, but the textures still consume the full amount of memory? I would love to hear an official word on this because I can't seem to find any.


EDIT: I've profiled the actual memory usage on Android and it seems that it really DOES reduce memory usage. In which case the Unity profiler is... maybe not lying but perhaps just missing out on an important aspect of the memory usage. I'm using 4.1.5f1 though the 4.2 changelog doesn't mention anything about this. Perhaps then this should be chalked up as a profiler bug.

Comment
Add comment
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

1 Reply

· Add your reply
  • Sort: 
avatar image
0

Answer by Joyrider · Aug 05, 2013 at 11:34 PM

Hmm, I'm guessing you're using Unity's QualitySettings, but doing so, and thus using mipmaps for 2D graphics, tend to take up more memory (about 33%). Mipmaps are a rendering pipeline optimization to increase rendering speed and reduce aliasing artifacts, not a memory optimization. So using mipmaps and getting to choose which one to display will just affect rendering speed, not reduce memory usage. Mipmaps is only about GPU bandwidth. As such when using mipmaps you check to see which of the mipmaps to send to the GPU (only 1 level per texture), if the object moves and takes up less screenspace, you'll just change the mip that is sent to the GPU for rendering accordingly.

The only way of reducing the memory footprint would either be to reduce all textures before build and make an old-phone-specific version of your game or to have 2 sets of textures (which means a bigger app), with the lower resolution as default, and do some texture swapping at runtime to get the higher resolution ones on more recent phones.

Don't know if anyone has another suggestion, but that is all I can come up with at the top of my head.

Comment
Add comment · Show 3 · Share
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 JFBillingsley · Aug 05, 2013 at 11:37 PM 1
Share

I must've edited it while you were typing your reply, sorry! I've read many places that the QualitySettings.masterTextureLimit DOES impact texture loading as well, as it will only load mip levels from that level down (so 0 is full res, 1 is half res etc), and my memory profiling seems to confirm that.

avatar image Joyrider · Aug 06, 2013 at 12:50 AM 0
Share

hmm, never used masterTextureLimit :) I'll try it out when I have a moment

avatar image JFBillingsley · Aug 06, 2013 at 12:51 AM 1
Share

In the editor, that setting is exposed in Edit > Project Settings > Quality, then choosing the "texture quality" (full res = 0, half res = 1 etc.)

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

15 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

Related Questions

The quality on mobile device is very low 2 Answers

Memory Managmenet 1 Answer

GUI Texture Fade in/out (Android) 1 Answer

GUI Texture Resolution 0 Answers

Why does my game require so much rendering power? 1 Answer


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