• Unity
  • Services
  • Made with Unity
  • Learn
  • 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
  • Forums
  • Answers
  • Feedback
  • Issue Tracker
  • Blog
  • Evangelists
  • User Groups

Navigation

  • Home
  • Unity
  • Industries
  • Made with Unity
  • Learn
  • Community
    • Forums
    • Answers
    • Feedback
    • Issue Tracker
    • Blog
    • Evangelists
    • User Groups
  • Get Unity
  • Asset Store

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 The-Oddler · Nov 29, 2012 at 10:42 AM · dynamic batching

Dynamic Batching Vertex Limit

Hi,

The documents state the following:

 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.

So when does the 900 vertex limit apply? When only one or two of the listed three is used (vertex pos, normal or single uv)? Or when none of them is used? And if it's none, then what can you use?

Any additional information about this vertex limit is welcome!

Thanks

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

Answer by Graham-Dunnett · Nov 29, 2012 at 11:32 AM

Vertex attributes mean position, uv, normal, colour, etc. Count the number of attributes that you shader uses. In the example the shader uses 5 attributes, and 900/5 = 180. If you had some whacko shader that used 100 attributes, then you could only batch models that have 9 or fewer vertices.

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 The-Oddler · Nov 29, 2012 at 11:56 AM 0
Share

Aha, this makes sense. Also clears up how they got the number :D

avatar image NoseKills · Feb 05, 2015 at 09:59 PM 0
Share

I'll comment here since this doesn't seem to be the case exactly (anymore? with current Unity versions at least), adn since this is one of the most visible Google hits for this topic.

300 seems to be the max vertice count that gets dynamic batching with any kind of shader. Please someone correct me if I'm wrong

avatar image
2

Answer by loopyllama · Nov 29, 2012 at 11:22 AM

I would use those limits as a rough guide. The docs are trying to tell you that adding more attributes to the model counts against the limit. In the inspector you can turn off tangents, etc to help reduce the amount. Any additional attributes will inflate the cost. Also the engine will tri-strip your model so the vertex count will be inflated from your 3d package. Uv seams will cause an increase too.

So what does all of this mean? This means if you are trying to get a model under the count, load it up into an empty scene in Unity and click Stats. Notice the vertex count. If it is close to 900, duplicate it and see if it batches in the Stats window. If it doesn't rework the mesh and delete attributes and repeat the test.

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 The-Oddler · Nov 29, 2012 at 11:56 AM 0
Share

I knew about the uv-seam-vetex-adding, as do sharp edges (I'm using blender.) As far as I know you can't see the exact vertex count in your 3D program (Blender & Max), though when imported in Unity the count is shown.

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.

Welcome to Unity Answers

The best place to ask and answer questions about development with Unity.

To help users navigate the site we have posted a site navigation guide.

If you are a new user to Unity Answers, check out our FAQ for more information.

Make sure to check out our Knowledge Base for commonly asked Unity questions.

If you are a moderator, see our Moderator Guidelines page.

We are making improvements to UA, see the list of changes.



Follow this Question

Answers Answers and Comments

12 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

Related Questions

Dynamic Batching not working on seperate objects 1 Answer

Why scale break a batch? 1 Answer

Huge texture atlas and dynamic batching of particle systems 0 Answers

Dynamic Batching Failing in Simple RTS game 1 Answer

Dynamic batching after SetActive false and true? 0 Answers

  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges