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
1
Question by pyro · Nov 30, 2010 at 11:55 AM · iphonedynamicbatchingdrawcalls

Why isn't dynamic batching working?

I have a scene with a Mesh that has 183 vertices (from the Unity statistics window) and when I duplicate it, it creates another drawcall. They all use the same material and nothing is being instanced. Is there anything else I need to do to get dynamic batching to work? I thought the only conditions were the mesh needed < 300 vertices and they shared the same material.

Comment
Add comment · Show 1
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 pyro · Nov 30, 2010 at 02:20 PM 0
Share

I think it's something with my mesh.. recreating it from scratch and i'm getting it to batch again. Oh well..

3 Replies

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

Answer by pyro · Dec 03, 2010 at 02:09 PM

Just to close this here's some other things to check for why dynamic batching isn't working:

1) Check the UV's on the model, if something has 60 vertices and somehow 300+ UV's mapped it's probably not going to batch

2) Check how they're layered, if the two objects that share the same material have another object with a separate material layered between them, it has to break it up into another draw call

3) Check if a material is instanced, if so it's not going to dynamically batch. (If you modify a material directly through script it makes it into an instance)

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 DavidButtress · Dec 07, 2011 at 12:12 AM 1
Share

Just wanted to say thanks about the info about seperate objects on different layers. This just solved a big problem I was having and haven't seen this info anywhere else, thanks!

avatar image
2

Answer by laurent · Mar 18, 2011 at 11:14 AM

2) the batch gets split only if the batch uses alpha transparency

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
2

Answer by nerophon · Sep 20, 2012 at 03:31 PM

How to Make Objects Dynamically Batch in Unity

they must share the same material

the material must not be instanced (check material name in debug inspector)

batching is applied only to meshes containing less than approx 900 vertex attributes in total (check mesh properties for some idea about this; for starters turn off normals & tangents to reduce it)

the textures must not include alpha

scale breaks batching

lightmaps break batching

multipass shaders break batching

layering other objects in between objects trying to batch can break batching

if you are instantiating the object in code, you may be instancing the material; try re-applying the material asset through .sharedMaterial

even within single-pass shaders, some can batch higher vertex attribute counts than others... in particular if you use a shader that colors vertices you’ll be adding attributes

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

2 People are following this question.

avatar image avatar image

Related Questions

Batching problem when using multiple materials in one model 1 Answer

Dynamic Batching + VertexLit + PointLight = 1 Draw call? 1 Answer

Is it possible to utilize iphone dynamic batching with "traditional" animated sprite techniques? 1 Answer

Android / iPhone deployment.. 2 Answers

Dynamic batching of animated models 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