Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 13 Next capture
2021 2022 2023
1 capture
13 Jun 22 - 13 Jun 22
sparklines
Close Help
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
avatar image
3
Question by michael 4 · Feb 09, 2012 at 06:38 PM · textures

Does Unity Care is a texture is a power of 2?

This have been a topic of debate between my coworkers with no clear answer.

For optimization/performance purposes does UNITY care if a texture is a power of two or not. It seems that it re sizes the texture internally. My opinion is that it does not, but other people I work with think otherwise. It would be nice to get a final answer for this.

Thanks

Comment
Add comment
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

1 Reply

· Add your reply
  • Sort: 
avatar image
1
Best Answer

Answer by dannyskim · Feb 09, 2012 at 07:06 PM

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.

Comment
Add comment · Show 4 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image michael 4 · Feb 09, 2012 at 07:11 PM 0
Share

Ok, so did I understand correctly that Unity can create the texture as a power of two by manually setting it in the editor. And it will behave the same as if it was already a power of 2 externally. And if the setting is not set in the editor it will be converted to the uncompressed format?

avatar image dannyskim · Feb 09, 2012 at 08:03 PM 1
Share

From my experience, yes that's how it works. As stated, when you set the Texture Type to advanced, those options show up in the importer. NPOT textures will exhibit the behavior that you stated.

avatar image roberto_sc · May 19, 2015 at 03:43 AM 0
Share

@dannyskim Performance/memory-wise, what's the difference of having a NPOT texture imported using "Nearest POT" versus having the POT version of this texture with blank spaces using tiling & offset to make it look right?

avatar image dval · Jan 13, 2016 at 03:49 AM 0
Share

The above link should be updated to This Page.

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this Question

Answers Answers and Comments

7 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

Everything is blurry. 0 Answers

shaders question (3DS Max involved) 0 Answers

2D Texture Depth? (From script) 0 Answers

Import (Plz Help) 1 Answer

Instantiating material due to calling renderer.material during edit mode. 1 Answer


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges