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
0
Question by bpears · Jan 02, 2014 at 03:01 AM · texturematerialresolution

1 Big texture, 2 materials?

If I need 2 different materials, and use the same texture in both, is there a difference compared to using separate textures for the materials? One material shader is much more complex than the other material shader.

Example: 2 materials, 1 texture(4096 resolution) VS 2 material, 2 textures(2048 resolution).

The things using these materials/texture(s) will be in view always at once, but I cannot just use one material in my situation.

thank you

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

2 Replies

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

Answer by Invertex · Jan 02, 2014 at 05:58 AM

sparkzbarca's answer is partly incorrect actually. Both dimensions should be power of 2 values, but they don't need to be the same value. For example, there is nothing wrong with having a 1024x2048 or even 128x8192 texture, these are still power of 2 textures, and is how sprite sheets are handled, they are almost never square, but rectangle.

To answer OP's question properly, it depends on what OP would like to do with the objects that have those materials on them. If for example 1 object is in the scene for most of the time, but the object with the other material is spawned in frequently, it would make sense to have it on the same texture atlas. As the game wouldn't need to keep doing a texture load every time you spawned that object, since an object in the scene is already using that texture file. Or, if they are both usually in the scene together, it makes sense as well. Especially if they are part of the same object/prop/prefeab/etc...

So the answer is that most of the time it is more efficient to bundle the textures like that if you know the whole texture is going to be used in the scene most of the time.

Comment
Add comment · 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
1

Answer by sparkzbarca · Jan 02, 2014 at 04:19 AM

umm how can you possibly do that unless your wasting huge amounts of texture space.

The issue is that textures should be powers of 2 (or square shaped)

so to go from 1 texture to more than 1 effectively your next amount would be 4

to have it 2 textures wide you need it 2 textures high, the next after that is of course 9 textures

or any texture should have X^2 textures in it, with 1^2 of course being 1 still

a 4096 X 4096 texture is 4 times as big as a 2048X2048

just like

2X2 is 4 times as big as 1X1

so to answer your question there is no way to effectively store 2 equally sized textures in 1 texture, split them into 2, or add 2 more.

Mark as answered and have a nice day!

Comment
Add comment · Show 2 · 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 bpears · Jan 02, 2014 at 04:44 AM 0
Share

Oh crap.. I completely brain farted on power of 2.

avatar image bpears · Jan 02, 2014 at 06:02 AM 0
Share

@Invertex, yes that is what I was trying to get at, rather than specifically texture resolution. I was mostly inquiring on performance of 2 mat + 1 text vs 2 mat + 2 tex, with mat's being vastly different shader wise. So thank you for addressing that for me. :)

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

20 People are following this question.

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

Related Questions

new Color() not working properly? 1 Answer

Multiple textures in one material 0 Answers

Transparent block changes transparency when other blocks are placed 0 Answers

Visual/Texture anomoly .... Never seen this before, image attached 1 Answer

Runtime mesh generation material problem (Distort on textures when i scaled mesh) 0 Answers


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