Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 12 Next capture
2021 2022 2023
1 capture
12 Jun 22 - 12 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 Ehren · Apr 23, 2010 at 07:51 PM · meshgraphicsperformance

Combining meshes for independently moving objects

Is there a way to combine meshes on child objects when the child objects can move independently of one another?

Let's say I have four walls that all share the same material. I can make them children of a single parent object, apply the CombineChildren script to the parent, and get a single draw call instead of four.

But now let's say one of the walls needs to move. If I move one wall in the above scenario, the auto-generated mesh doesn't update. Is there any way to solve this?

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 duck · Apr 23, 2010 at 07:57 PM

Unity iPhone has support for this, and it happens automatically if models share the same material. It's called dynamic batching.

This isn't present in regular Unity however.

Edit: This has now been introduced for all platforms in Unity 3.0!

You can read about dynamic batching in the Manual here: DrawCall Batching The most important thing to note is that dynamic batching only works for objects which have fewer than 300 vertices.

An interesting alternative to this is that it's actually possible to achieve this using bones.

Have a look at MikaMobile's great explanation of it on this forum thread where he describes animating a set of billiard balls as a single mesh (and hence 1 draw call), with each ball controlled by a separate bone.

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 Eric5h5 · Apr 23, 2010 at 08:48 PM 0
Share

Also, using a skinned mesh with bones is more efficient than dynamic batching anyway, since dynamic batching has computational overhead every frame and is limited to 300 triangles per independent object (because otherwise the overhead would overpower the savings from reduced draw calls).

avatar image ic · Feb 26, 2011 at 09:35 PM 0
Share

What if they have different materials?

avatar image
2

Answer by Eric5h5 · Apr 23, 2010 at 08:51 PM

See CombineChildrenBones on the wiki for one method of combining objects into a combined skinned mesh with bones, although it could be improved. (The note on that page about being slower than separate draw calls is either due to an older version of Unity iPhone, or something to do with the script, because my own observation of skinned mesh usage is that it's distinctly faster than both separate calls and dynamic batching.)

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

No one has followed this question yet.

Related Questions

Re-meshing Static Objects as one mesh? 1 Answer

What is a reasonable number of draw calls relative to one hardware configuration ? 6 Answers

Wild fluctuations in performance when built into an exe... 1 Answer

Fixing mesh normals 1 Answer

How to subdivide a mesh into 4 quadrants? 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