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 · Jun 19, 2013 at 11:02 AM · textureprefabperformancerendermodular

Texture render performance - one 1024px, vs two 512px - for modular models?

Better to render one bigger texture, or broken up textures? I mean, for example a modular model, with several mesh pieces, and occlusion culling. Wouldnt it be better to break up textures, to have one per mesh piece, since with occlusion culling, some meshes, may not be rendered? And since only a part of the texture would be for that part, you would be waistfully rendering a large texture over and over? But then again, it would be the same texture over and over if it was just one large texture.

I hope that didnt sound too all over the place...

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
2
Best Answer

Answer by Tarlius · Jun 20, 2013 at 11:34 AM

There is a hidden benefit to using one texture for all of them that is batching, which will result in fewer draw calls (and better performance/fps) when they all need to be rendered at the same time. However, if some of the objects will be completely culled a large amount of the time, the gain may not be so noticeable.

I would imagine that for a car, for example, breaking up the tires from the main object would not be worthwhile, since although from some angles they won't be seen, they will come into view very frequently.

However, for a large building, you would usually split the exterior from the interior.

If you have a case that is less obvious, you will probably be better off testing it with the profiler.

Comment
Add comment · Show 10 · 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 · Jun 20, 2013 at 11:52 AM 0
Share

Thanks for reply. In my case it is buildings, but player will usually not see a lot of the pieces. I wonder if it would be worth breaking the floors into side pieces.

avatar image Tarlius · Jun 21, 2013 at 05:15 AM 1
Share

Thats the thing- if the all share the same material, they will be batched and thus only take one drawcall, which is why there will be a balance somewhere.

You could make your ui with 100 different prefabs, but if they all share the same material, one draw call.

However, if you have two objects that will never be drawn at the same time, it won't matter if they use the same material, so you could reduce the texture size and save graphics memory by uploading it to the card (done behind the scenes) when it comes into view.

I think in an ideal world, you would have everything using one material. However, in the real world, you can only fit so much onto one texture, so you'll have to use nastier-looking compression/etc, so you'll have a quality trade-off somewhere. Also, theres no point having that high-detail boss that only appears in the game once on the same texture as that barrel that is in every level (etc)

Edit: Note that by UI I mean if you use a library like EZGUI/NGUI/etc, which combines ui textures into an atlas for you, not the built in one which is terribly inefficient, particularly on mobile devices.

avatar image whydoidoit · Jun 21, 2013 at 10:21 AM 1
Share

Just to note that batching is subject to the 65k vertex limit - it is not guaranteed that automatic batching will batch everything with the same material to 1 draw call, also this process does take processing resource.

avatar image Tarlius · Jun 22, 2013 at 12:38 AM 1
Share

The prefab itself doesn't have "its own" drawcall. Its decided by the material. 100 prefabs, one material -> one drawcall total.

I didn't know about the vertex limit! Learning odd little things is why I do this, tyvm :D

avatar image Tarlius · Jun 27, 2013 at 06:59 AM 1
Share

Different prefabs using the same material. I meant the second way; sorry if it wasn't clear!

Show more comments

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

16 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

Related Questions

Tiled GPU perf warning? 1 Answer

How to apply a texture to a prefab? 2 Answers

Eyes animation texture problem 0 Answers

Crash from texture memory? 2 Answers

how to texture two instances of a character 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