- Home /
best texture compression for unity 2D Casual game on iphone
Hi,
I know this question was already posted in some way or the other but i haven't found a clear answer yet, so sorry if it might seem redundant :(
I am working on a 2D casual puzzle game (think bejeweled) with an orthographic camera and I look for a solution for the following problem:
Which settings do I need for textures to get no quality lost on iOS?
Which source-format is the best or does it matter at all, as long as it is uncompressed?
Which settings do I have to use for the textures: Gui, Texture or Advanced and which compression is the best one for normal and alpha textures?
Which material setting do I have to set for the prefab if the texture should be:
- self-illuminated
- a non power of two (backgrounds/splashscreens, etc.)
- with alpha
Are there some other things I have to be aware of or do you have any other best practices on how to use textures efficiently on iphone? I already tried a lot of combinations and searched for some hours now but I still dont get a 100 percent quality on iphone, so I am really looking forward for some help. Btw: It is possible to get a 95-100 percent quality, isn' it?
Thanks in advance!
Answer by Statement · Mar 11, 2011 at 07:05 PM
I'd say it depends a lot depending on how the texture looks. It's no universal "right or wrong" answer since the different compressions excel under different circumstances. To get true lossless quality you'd have to go with RGBA 32 bits. Then again, it's not much of a compression. I think you need to fiddle around with your settings to give you the best trade off for quality vs compression.
On the other hand, if you use less colors in your logo (say 4 unique colors) you could probably use PVRTC 2 bits and have it lossless. If I understood the format correctly, it uses two bits (4 values) to layer on top of a mipmap version to reconstruct the image. I certainly don't know the compression in depth but you could easily see if this is the case.
So my point is that different textures benefit from different compressions. You might get lossless quality on some compressions given you have designed your textures in certain manners. So fiddle either with the texture settings or fiddle with the texture colors. You might end up with a few textures using PVRTC 2 bits, some using PVRTC 4 bits, a few using RGBA 32 bits and so on.
It should be said that I haven't tried iPhone development with Unity so this is just what I gather from the documentation.
Thanks for your answer and I understand that there is no right and wrong because it depends on the source image, so lets say I have two different kinds of main texture categories:
16 bit 960*640 background photo-like png textures with no alpha 16 bit power of two png textures with alpha for gui and gameplay elements
which compression/setting do you guys normaly use for these kind of textures because I haven't found a combination with no artifacts/quality lost yet, although I think went to all compression methods/filter modes.
the quality loss is even visible in the editor or in standalone pc builds, so I don't think it is solely iOs related. Is there something else I might have overlooked?
16 bit alpha encodes 4 bits per channel (16 distinct levels of red, blue, green and transparency). You'll need to take this into account when you want to create the best looking images for that compression method. $$anonymous$$ake sure you don't generate mip maps for GUI, that is just wasteful and might produce sub-quality. Try point filtering and clamp borders. $$anonymous$$aybe you could provide us with a screenshot of source and result texture?
Answer by Jessy · Mar 11, 2011 at 07:28 PM
There aren't that many options, so start at PVRTC 2bpp, and move to bigger formats until it looks good enough. Depending on the texture, though, RGB 16 bits might look worse than either PVRTC option. If you got to that point, then your only options are to use the full 24/32 bits, or scale it back to PVRTC 4bpp.
Your answer
Follow this Question
Related Questions
Best Unity configuration for 2D games on iPhone 1 Answer
World space to pixel space accuracy 1 Answer
Retina textures on 4.3 2D Sprite Packer? 0 Answers
2d game for iphone, use pixel perfect or not? 0 Answers
2D concepts in Unity 2 Answers