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 trs9556 · Sep 04, 2013 at 01:00 AM · mobileperformancedrawcallsexplosionefficient

Efficient way of having 1 draw call but allowing for debris physics [Mobile]

I'm making a tower defense game and I'm just going around doing some random optimization.

I noticed a hand full of my vehicle enemies have anywhere from 3-10 draw calls which is unacceptable for mobile development. I can easily combine the mesh into one, this isn't a problem. Where my issue is, is I add force/torque to a hand full of the objects per vehicle for when they "die" so that they explode. This adds a really beautiful and random explosion. Looks awesome and I don't want to take this away.

So I can't have this 1 draw call because of the debris, but at the same time 10 draw calls is outrageous.

I can think of a few work arounds. For example I can combine any meshes I'm not using for physics. This isn't horrible but isn't the best (will still leave me with more then 1 draw call). I also can combine the mesh for displaying the enemy when it's alive and then when the enemy dies I can spawn a prefab of a dying effect that isn't 1 mesh. This way I'm not ALWAYS showing ~10 draw calls per enemy, only when it's dying.

I'm asking this question basically looking for advice. There has to be an efficient way of doing this while still keeping your game beautiful.

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

Answer by Jamora · Sep 04, 2013 at 06:43 AM

Random optimizations aren't very rewarding in their time spent/performance gained ratio. You should really use the Unity profiler (or any profiler) to identify the bottlenecks and work on those. Changing random parts of the code that 'look' like they could cause lag could, in the worst case actually cause more lag.

Here's Unity's Practical Guide to Optimizing Mobiles; an interesting read.

One way I know of getting one draw call for your debris is by using the same material on each mesh. If they have different textures, you should create a texture atlas of the textures. (The other way is using CombineMeshes, but that doesn't work for you in this case.)

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

17 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 avatar image avatar image avatar image avatar image avatar image

Related Questions

Unity 4.6 GUI vs NGUI Performances (mobile and pc) 1 Answer

Vertices limit for iOS? 0 Answers

Help with performance 1 Answer

Many draw calls w\ low verts VS little draw calls w\ lots of verts 1 Answer

Using an instantiated pooled object for the first time causes frame 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