Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 12 Next capture
2021 2022 2023
1 capture
12 Jun 22 - 12 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 /
  • Help Room /
avatar image
0
Question by MKayJay · Jun 05, 2016 at 07:02 AM · texturesuv mappingatlas

Can anyone clarify my confusion about Textures, materials and atlases?

I am trying to increase performance of my game by reducing draw calls, and as such I've started to make texture atlases for the textures where it makes sense.

My scenario is this:

I have a mesh, that I want to use several times, but with a different texture. So I figured I'd put all the textures into one atlas. Now the problem is that the UVs of the mesh will always be the same for all of the "instances" of it, which means it will always display the same texture, unless I give each instance a different material, and handle tiling and offset for each material.

  • My understanding is that if I use a unique material for each copy of the mesh, I will have gained no performance, is this true?

if true, then the only solution I see, is to go to my 3D application and make several versions of the same object with different UVs, which will be quite a chore, as I have lots of different meshes I need to do this with. If this is indeed the solution, is there an easier way to do this, preferably non-runtime?

Thanks for your time!

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

Answer by Raresh · Jun 05, 2016 at 12:51 PM

You will only gain performance by using the same material with the same mesh with the same scale. Other than that, you will drive the draw calls number up, which after a while might become enough to slow down your game.

Read up on Dynamic Batching for your case: http://docs.unity3d.com/Manual/DrawCallBatching.html

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 MKayJay · Jun 05, 2016 at 01:43 PM 0
Share

Thanks for your response Raresh :-)

I'm still a bit confused though- If I only save draw calls by using the same material on the same mesh, what is the point of making Texture atlases?

According to the manual, that you linked (Thanks for that, it was a nice read :-) ) it says the following: Unity can automatically batch moving objects into the same draw call if they share the same material and fulfill other criteria. The other criteria listed however, does not include that it has to be the same mesh.

Do you see my confusion?

I've considered looking into editor extensions and write an extension that can offset the UV mapping for me, but I'll refrain from doing that, until I know more on the subject- I'd hate to spend time on it, if it doesn't make any sense to do so :-)

Thanks for your time.

avatar image Raresh MKayJay · Jun 05, 2016 at 01:45 PM 0
Share

Texture atlases are for saving time on loading certain textures. Imagine a map like one from Battlefield. You would put all the textures for that map in an atlas, and load it when you need it. After that you unload it. It's just to save time and memory, as textures require more of both than other types of assets.

avatar image
1

Answer by Nhauste · Jun 05, 2016 at 04:22 PM

The less materials you have in your scene, the faster your game will be. So yes, using the same material for multiple objects is a good way to reduce draw calls (batches). Unfortunately, you'd have to modify your meshes UVs to fit with the texture atlas you've made.

Comment
Add comment · Show 1 · 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 MKayJay · Jun 05, 2016 at 06:13 PM 0
Share

Thanks for your input. It's basically the same I gathered from reading about dynamic batching, as Raresh posted.

I appreciate your input. I'll look further into this, and maybe make an editor extension that allows me to do it easily in Unity.

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

46 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 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 avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

Distorted/Warped Textures On Character Model After Bundling For Tabletop Simulator/In A Build 1 Answer

Why is texture sliding on different iphones? 0 Answers

Optimally adding textures to the Unity atlas 0 Answers

Mesh broken up into several pieces, how do I apply texture? 2 Answers

ProBuilder: texture UVs mess up badly 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