0
\$\begingroup\$

In Unity, when you have MipMapping selected, will this cause the full size texture to always be brought into memory? I have a game which runs on high end mobile devices with ultra-high resolution textures, but I have complaints of it crashing on smaller/old devices. Will this fix it, or is there a more fitting way to address this problem?

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

If you're just looking to make your game compatible with some older devices consider using Quality Settings . Go to Edit->Project Settings->Quality Settings to set up each level and instruct Unity to use full size textures/half size etc.... Then add a Menu Scene that will load first allowing the User to select the settings he wants for his devices.

|improve this answer|||||
\$\endgroup\$
0
\$\begingroup\$

Only enabling mipmaps will not solve your problem. Mipmaps are generated by the hardware at runtime in order to avoid using large scale textures that are on objects that are far away from the camera and do not need that level of detail at that point. It is advisable to create smaller textures.

|improve this answer|||||
\$\endgroup\$
0
\$\begingroup\$

When utilising standard texturing with mipmapping you not only are loading the entire texture in memory but also an extra 1/3 (one third) of the total texture memory for the mipmaps. Read the How It Works section in the wikipedia page.

I don't think Unity releases info about the low level implementation of their texturing system, so we should assume they use standard texturing and the above holds true.

That said, it is common practice to have multi-resolution textures for different devices. This not only reduces RAM usage but also disk storage, which is also very limited on older hardware.

|improve this answer|||||
\$\endgroup\$
  • \$\begingroup\$ Well, it only reduces disk storage if you distribute different copies of the software to older devices. Depending on the platform, that's generally somewhere between "complicated" and "impossible." The RAM optimization alone is worth it though. \$\endgroup\$ – jhocking Mar 11 '15 at 12:32
  • \$\begingroup\$ Adding onto this, there's an interesting technique for generating builds with different asset resolutions described in this video: youtube.com/watch?v=rMCLWt1DuqI&t=2m18s \$\endgroup\$ – DMGregory May 10 '15 at 14:37
0
\$\begingroup\$

Mipmaps won't help you. Instead, you need to load different assets based on something like iPhoneGeneration. And even then, you would need to make sure your assets are in Resources and not actually part of the scene, because everything in a scene is loaded immediately when that scene loads. In other words, swapping a texture in a scene wouldn't prevent that texture from loading in the first place.

|improve this answer|||||
\$\endgroup\$

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.