Does Unity Care is a texture of power of two

1.

I`ve heard rumours that future graphics cards are not longer bound to the pow 2 rule, but current Graphics cards uses a power of two texturesizes to work with them. 2, 4 , 8, 16 ... 128, 256, 512 ... 4096.Texturesizes with power of two are 64x64, 256x256 etc. . But also 512x256 or 1024x128. When the graphics size is different a power of two the graphcis card reservers the ram for next higher power of two size. Let`s say you have a texture of 2500x1032. That`s around 7.38 Mb. Then the graphics card reserves the size of 4096x2048. Which is of course much more than what your texture really has. Around 24 Mb. The worst case scenario is a 2049x2049 which uses 144 MB ram then, compared to a 2048x2048 that only uses 12 mb ram.


The compression format DDS is also a special chapter. It`s the only texture compression format that works directly in the graphics card. And it is also bound to the pow2 rule. When the texturesize is not pow 2 , then the DDS algorythm fails. And so you cannot use DDS compression.

Also, will the suggestion to set 'Scale NonPower2 sizes up' eliminate any negative impact that this will have, or is there another solution?

It fixes the above issues. But beware with big textures. They become even bigger by that. I would suggest never to go above 2048. Best method is to use pow 2 texturesizes as the main solution though

2.

Also PVRTC has different requirements than DXT.
DXT does not require square and it requires multiply 4 texture lengths
PVRTC requires square textures that have power of 2 lengths

3.

It is possible to use other (non power of two) texture sizes with Unity. Non power of two texture sizes work best when used on GUI Textures, however if used on anything else they will be converted to an uncompressed RGBA 32 bit format. That means they will take up more video memory (compared to PVRT(iOS)/DXT(Desktop) compressed textures), will be slower to load and slower to render (if you are on iOS mode). In general you'll use non power of two sizes only for GUI purposes.

Non power of two texture assets can be scaled up at import time using the Non Power of 2 option in the advanced texture type in the import settings. Unity will scale texture contents as requested, and in the game they will behave just like any other texture, so they can still be compressed and very fast to load.

http://unity3d.com/support/documentation/Manual/Textures.html

So in essence, yes, Unity does care as it will automatically assign properties to the texture unless you override it to do differently. When using a compressed format, you'll see that all textures are scaled automatically to a square power of 2 texture size. With a compressed format, this is done automatically because compression rates typically will only work well with power of 2 sizes. If they are not, they will be practically double the size, which is why this is automatically done for you.

Also, compression and power of 2 sizes can be hardware dependent, as well as the algorithm used (such as PVRTC on iOS). Non Power of Two (NPOT) texture capability can vary, say from the PowerVR chipset in the iPhones to something else on an Android phone.

Power of 2 textures nowadays are typically requested by the Game Engine strictly for mip-mapping purposes. If the texture is not in the dimensions of power of 2, then processing for mip-mapping won't be able to take place.

Conclusion:

Texture had better be power of two sizes

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章