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 Ben Holmes · Apr 29, 2011 at 07:26 PM · iosoptimizationcombinevbo

Combining Meshes

I am in the process of optimizing a game and I am seeing a lot of createVBO calls as well as a higher number of VBOs than I would expect. I have been looking into combining meshes to help solve these issues, but I have some questions about how this works.

Reading the Unity documentation on combining meshes it sounds like it is only really used for meshes which don't move, rotate, or scale.

Is this true?

Is there a way for me to combine dynamic meshes?

When I have Dynamic batching enabled for iOS shouldn't it batch meshes which share the same material automatically?

EDIT It turns out that editing meshes directly (meaning changing verts, normals, uvs, etc.) causes unity to recreate the object's VBO which is slow. So this kind of thing should not be done except during initialization.

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
0

Answer by sneftel · Apr 29, 2011 at 09:55 PM

Meshes which are moving relative to each other can't be straightforwardly combined, because different vertices are being transformed by different transformation matrices. Dynamic batching happens automatically, but only for very low-poly meshes, because of the overhead of dynamic batching large numbers of vertices.

How many VBOs are you seeing? On the whole it's better to have fewer, but it's not the most crucial element of performance in most scenes.

Comment
Add comment · Show 4 · 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 Ben Holmes · Apr 29, 2011 at 10:09 PM 0
Share

I have about 100 VBOs at any given time, but my scene is very simple. $$anonymous$$ost of my meshes are below 300 polys (which according to documentation is the limit), but I'm not seeing as much batching as I would expect.

avatar image sneftel · Apr 29, 2011 at 10:12 PM 0
Share

The limit is 300 vertices, not 300 polygons. And that takes vertex duplication into account -- that is, it's what Unity says your vertex count is, not what $$anonymous$$ax/$$anonymous$$aya says it is.

avatar image Ben Holmes · Apr 29, 2011 at 10:14 PM 0
Share

right, sorry. But my meshes are still well under that limit.

avatar image DavidDebnar · Jul 10, 2011 at 04:47 PM 0
Share

try to create Vector3 array, set it to mesh vertices, and apply it to the gameObject, you want to know, how many verices it has.

avatar image
0

Answer by Amin_it · May 30, 2011 at 06:10 AM

i have this problem too;

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

3 People are following this question.

avatar image avatar image avatar image

Related Questions

My player swipes faster on iOS then android 1 Answer

How to Smooth X Axis Movement on Mobile Devices? 2 Answers

iOS performance: Mesh.DrawVBO counts 0 Answers

Unity as a Library iOS combine Target SDKs (device & simulator) 0 Answers

Combining Mesh at Runtime via Script causes temporary FPS drop 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