Image resizing in Unity Vs. Photoshop

I’ve written a blog post about resizing textures in Unity vs. Photoshop, and I’ve posted some pictures and my own conclusions.

I’d love feedback on this (either here or on the blog), especially if you think I’m using the Max Texture Size option incorrectly.

http://blog.hanfordlemoore.com/2009/02/28/unity-image-resizing-experiments

~Hanford

I don’t remember what filtering Unity uses to limit the texture sizes, but I don’t think it’s a very good filter (probably just bilinear).

I don’t know what filtering Photoshop uses for resizing either, but very likely it’s something better than bilinear (e.g. bicubic, Mitchell, Lanczos etc.).

Yeah, someday we should use a better filter as well.

It would be nice to see an improvement here–most of our games ship out with 50-75% of the total textures limited in size by import settings.

Agreed, I run up against this a lot too and it would be nice to see Unity use better filtering, bicubic at least.

Yeah, I can’t express enough how cool it is to be able to save your hi res originals in the assets folder and be able to edit them in full resolution, save them, and see them updated in the game at their shippable size, and not have to worry about the step of shrink and export.

This is why I say in my blog post that my plan is to shrink with Unity up until late beta when the art is finalized.

I imagine that if Unity were to change their scaler to bicubic, file sizes for games would drop significantly because people could use smaller textures that look better.

Ditto for me. It’s one of the big productivity pluses for Unity as far as I’m concerned. I haven’t noticed any particular degradation in quality, but I also didn’t do a direct comparison with PS. Thanks Hanford for bringing this to my attention.

For a lot of textures typically used in 3D games, the difference isn’t particularly noticeable, especially when using texture compression. When you use highly detailed textures, though, then more advanced resizing techniques like bicubic obviously make a difference, and indeed would be nice to have.

–Eric

In the Resize Image dialog you can choose between Nearest Neighbor, Bilinear and 3 kinds of Bicubic.

Something that would be handy for unity iPhone at least would be the option to make it square, since only square textures get compressed there…

That would be a seriously bad idea. The resulting quality is commonly between ugly and totally useless as you make the pixel non square if you make a nonsquare texture square.

also that requirement is known well enough that people can communicate it to their artists, so I don’t think that too many people actually have iphone assets that don’t meet this very basic requirement (because independent if compressed or not, the texture always must be power of two. question is what unity does with it if it is not and not compressed, either auto texture atlas or texture expansion I guess)

I agree, you should not make squared a texture that is not squared. You lose a crazy ammount of detail.

Pardon me for digging up this thread, but it would be really great to have a bicubic downscale as an alternative to bilinear.

Bilinear is cause of appearing crisp borders and too distinguishable pixels. And the effect is even worse on a normal-map. It can completely destroy appearance of good and detailed texture. So I have to manually rescale some textures in photoshop and to keep two variants - a source and a downscaled texture. Unity’s advantage - using of a psd as a texture doesn’t make sence in theese cases. It’s just like saving texture to dds manually like in other engines. Please, please, find a time to fix it - this small defect which brings to nothing brilliant idea of psd-format textures.

unity provide function for bi-linear sampling using GetPixelBilinear function not for bicubic so is there a way of achieving bicubic using unity ?