Reducing image size to increase performance?

In the continuing effort to increase performance of my iPhone game, I’ve decided to reduce the size of my images.

Can I just change the import settings and reduce max texture size? Or do I have to physically scale the image assets (before importing) to see performance benefits?

Thanks!

Import settings is meant to be enough.
take ibn ming that unity will process the image anyway: compression etc.

Keep in mind that image size has very little effect on performance, but is mostly about memory usage.

–Eric

Even if you’re swapping materials constantly to fake 2D animation?

Once the textures are uploaded, they’re uploaded, and the size won’t make any difference. If they had to be re-uploaded every time you changed a material, that method of animation would be unusably slow.

–Eric

Sure on that Eric?

So far I was under the impression that on FFP texture switches are the most costly operation you have at hand, which actually can only get worse if the texture is not already uploaded as that totally stalls the gpu.

The cost of this switch are one of the reasons behind the significant FPS drop with raising drawcalls, as you at some point just hit the bottleneck of how many times per second you can switch the texture for rasterization

change UVs, not materials.

I can’t say I have measured precisely the performance of texture switching or texture size, but these are my findings in my project.

My game makes heavy use of tiling, but this made the fps sink. I combined the textures (3) into an atlas map and obviously lost tiling capability. I added geometry to compensate for tiling. But now, even with all the extra geometry, I get steady 60 fps again. The drawcall-to-gain ratio was too much to attribute this only to draw calls; texture switching had to have its impact.

Another thing is to make sure the texture size is not too big or too small. I got a noticeable performance increase by slightly increasing the size of a texture (in the texture atlas) as to better match pixel-to-texel. This cannot always be accomplished with mip-mapping or power-2 textures, since the gap can be quite big.

A note on scaling… scaling the source file from your image editor can sometimes be much better than letting Unity scale on import. There are way too many options and features and tradeoffs, that in some cases, scaling from image editor has its benefits. For example, in photoshop you would use different scaling filters depending on what filter you will use in realtime (bilinear, none, etc)

You should animate atlas sprites via UV. There’s a script on Unify to do just that. You loose draw calls due to material changes, but hopefully avoid texture switching (maybe unity guys can verify this).

Anyway, all this may or may not help you, but its more info.

Well, the problem with animating sprites via UVs is that I’m not a 3d modeler, and know next to nothing about UV mapping. Nor do I own any 3D modeling software (other than the free version of SketchUp).

doing uv animation through a modeller is a long winded and troublesome task.
You better do it through coding, thats a multi liner.

you could as well use SpriteManager if you have no experience with the materia.

Yes, you’re right. Using same texture will avoid OpenGL ES texture state switch.

Smaller textures (width and height) should help since you are having to traverse fewer pixels when you create the texels (textures pixels) during render-time. Maybe Unity does something to handle this change but typically smaller textures do help with performance.