• 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 Raziaar · Mar 29, 2012 at 07:38 AM · performancebatching

How to approach combining of large numbers of objects to lower draw calls?

I am creating a board game based off of one called Acquire designed by Sid Sackson. The game centers around a game board, money, card stock, and 108 tiles.

Currently I have created the code that will generate my 108 tiles and arrange them on the board(don't have the board modeled yet). I instantiate a generic Tile prefab, locate the mesh objects for that tile model and assign a MeshFilter and mesh to the new prefab for the tile. These objects will remain off the game board until they are placed.

http://i.imgur.com/IRY1L.png

I eventually want to change the boring tiles into actual hotel building pieces... and design enough of them for each hotel chain that they can be sort of modular. That means I might require a different model depending on the hotel chain(and random building style) and any adjacent tiles.

How can I approach this in a manner of keeping draw calls to a minimum? Before I reduced the vertex count of my tiles, I was getting around 110 draw calls for the above image. I reduced the vertex count so Unity would automatically batch them, but I'm trying to plan for the future when my tile pieces might have 500 or more polygons each.

I tried using Mesh.CombineMeshes and having the parent object be responsible for all the geometry, but I ran into issues where it would have some of my geometry missing and it wouldn't all fit into a single mesh because it was beyond 65000 vertices. What kind of structuring approach can I work with here to allow for much higher detailed tiles(think actual building models) and keep those draw calls very low?

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

1 Reply

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

Answer by sebas77 · Mar 29, 2012 at 10:40 AM

Ok I try to help, what I am going to say it is engine independent, so at least it should help. Usually the engines batch for texture/material/shader, so if you have 110 textures the engine does not have any option than make 110 draw calls. Reduce number of textures/materials/shaders (sharing them between the model) and you will reduce the number of draw calls.

your problem about the 65000 vertices it is probably because Unity is limited to 16bit index buffer, in that case there is no much to do, except sharing the vertices as much as you can.

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 Raziaar · Mar 29, 2012 at 01:06 PM 0
Share

I suppose one thing I could do also, is to mark the items as static once they are placed on the board.That way I can animate them to the board as I want to, and then have them all share their draw calls.

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

If you’re new to Unity Answers, please check our User Guide to help you navigate through our website and refer to our FAQ for more information.

Before posting, make sure to check out our Knowledge Base for commonly asked Unity questions.

Check our Moderator Guidelines if you’re a new moderator and want to work together in an effort to improve Unity Answers and support our users.

Follow this Question

Answers Answers and Comments

4 People are following this question.

avatar image avatar image avatar image avatar image

Related Questions

[Closed] Manually Batching GUI Texture Objects? 0 Answers

How to get batch working for multiple on screen characters with bone based animation (iOS)? 1 Answer

Why do even non-overlapping (distant) transparent objects break dynamic batching based on Z-depth? 0 Answers

[NGUI performance] how to balance rendering batch vs UIPanel.LateUpdate ? 0 Answers

batching and editing building with pieces 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