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
2
Question by ankush kushwaha · Feb 20, 2013 at 05:05 AM · optimizationbatchingdrawcallscpusharedmaterial

Batching problem. (objects with shared material are not being batched)

I am working with unity3d pro 4.0.1. (iOS pro version ) . I am currently facing many performance issues for iOS (may be due to lack of graphics optimizations and CPU optimizations).

I have created some low resolution objects (into MAYA) and characters (maximum 1.3k vertices for each) which share a common material . I have used an common "ATLAS TEXTURE" for each object so that I can share a material between maximum number of objects as possible. It worked really great to minimize my DRAW-CALLS.

But my scene need to display many copies of a particular objects (or coins) (may be about 40-60). System issues one draw-call for each coin. Here, I need batching for the coins. I have used "static batching" by making coin's prefab static. but when I run my game scene with 10 coins on screen the number "SAVED BY BATCHING" under "STATS" showing me zero ( 0 ) means no object is being batched by the system .

Is it possible that no any objects or their copies in same scene sharing same material don't be batched ??

I have also some objects with animations . Some times they are being batched and sometimes not . What may be the issue ?

Does machine determine by its own way and decide which objects to be batched ??

Even a little help or clue will be highly appreciated :-) .

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

Answer by ankush_Kushwaha · Jan 12, 2014 at 07:57 AM

There is some verts limit for batching . If an object will comprise of more than that vert limit than that object won't be batched by Unity. Just try to reduce your verts per object you will be getting your object batched. Try to reduce your coin's verts it will definitely be batched. I dont know the actual limit but you can do google to get the limits.

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
3

Answer by robertbu · Feb 20, 2013 at 05:16 AM

The problem may be mesh complexity. If the number of "vertex attributes" exceeds a limit, thy will not be batched. From the reference: "Batching dynamic objects has certain overhead per vertex, so batching is applied only to meshes containing less than 900 vertex attributes in total. If your shader is using Vertex Position, Normal and single UV, then you can batch up to 300 verts and if your shader is using Vertex Position, Normal, UV0, UV1 and Tangent, then only 180 verts."

Your can read more here.

In addition, if you change any material properties at runtime, then you get a new material instance and they will not batch.

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

10 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

Related Questions

Batching Nightmare, What affects dynamic Batching!? 0 Answers

Batching on moving objects[Solved] 1 Answer

How to make common material for CPU optimization? 1 Answer

Understanding draw calls 0 Answers

Why is the CPU usage so high? 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