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 mohammadkhatri · Mar 23, 2013 at 03:40 PM · materialperformanceoptimizationdraw call

Draw Call Optimization

Hello guys.. I have a scene with 3 cubes of same material and 3 sphere with same material but other than the one of cube.. So basically I have ***

2 materials and 6 objects

**.. Both materials have same shader 'Deffuse'..one with color and other with texture*.. If I put only 3 cubes then there is only one draw call..sounds good.. :) But If I put only 3 sphere then there are 3 draw call..sounds bad.. :( Why this is Happening..? Thnx..

Comment
Add comment · Show 2
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 robertbu · Mar 23, 2013 at 03:57 PM 0
Share

Are you making any changes to the materials at runtime...change the color for example? Any runtime material changes will create a new material instance for an object and therefore break batching.

avatar image Graham-Dunnett ♦♦ · Mar 23, 2013 at 03:58 PM 0
Share

Are these static or dynamic objects? How many vertices do the spheres have? There is a limit to the number of vertices that can comprise a dynamic batch, but you can read about that at http://docs.unity3d.com/Documentation/$$anonymous$$anual/DrawCallBatching.html.

3 Replies

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

Answer by dubbreak · Mar 23, 2013 at 05:28 PM

See this question: Draw calls using same material

In short: the sphere has too many vertices to batch regardless of whether they use the same material (if you are using the default sphere it has 526 verts).

If you check the Draw call batching section of the manual it states: "Batching dynamic objects has certain overhead per vertex, so batching is applied only to meshes containing less than 900 vertex attributes in total."

3 draw calls is nothing on any platform. The reason it doesn't batch is because with many vertices the batching has more overhead than another draw call. For some platforms you'll want to stay under 100 draw calls.. but it's not like you have to aim for 1 draw call.

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
0

Answer by mohammadkhatri · Mar 28, 2013 at 05:51 AM

thanks :)

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 dubbreak · Mar 28, 2013 at 06:00 AM 0
Share

Glad to help. If it solves your problem please make it as the answer (which will close the question as resolved).

avatar image mohammadkhatri · Mar 28, 2013 at 06:07 AM 0
Share

Done .

can u help me with this que. ?

http://answers.unity3d.com/questions/426376/i-am-using-xcode-46-and-trying-to-deploy-my-applic.html

avatar image
0

Answer by jmunozar · May 09, 2014 at 03:59 PM

this is one year old but theres a package in the asset store that combines the materials from similar objects into one material hence reducing drawcalls drastically.

checkout: http://forum.unity3d.com/threads/236787-ProDrawcallOptimizer-reduce-the-number-of-drawcalls-drastically-on-your-game?p=1585109#post1585109

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

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

13 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

Related Questions

MaterialPropertyBlock (MPB) - Does it effect performace if MPB has property that shader doesn't have? 0 Answers

Setting Material Textures at runtime for the rest of the game 0 Answers

Should i bake the skinned mesh? 1 Answer

Lesser Materials : how much better performance ? 1 Answer

Why did my render time increase after lowering the vertex count? 2 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