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 dyankov · Jul 01, 2014 at 05:39 PM · renderingperformancestaticdrawcalls

Can an animated object become static again?

I have a game with many blocks, which animate as they appear on the screen. It's a simple animation, just scale from 0 to 1. Before I implement the animation I had no problem with draw calls - they were 3-4.

However after I implemented the animation the draw calls count equals the number of visible cubes on the screen, which would be between 500 and 1000.

The cubes animate their scale from 0 to 1 for less than a second, after that they are completely static, but the draw calls don't drop. My question is - can I tell Unity that this object will not be animated any more so it doesn't need any extra draw calls?

Thanks!

Comment
Add comment · Show 2
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 deltamish · Jul 01, 2014 at 05:52 PM 0
Share

No Unity does static batching to all static objects that is it combines all objects into one so even if you unchecked static batching and make the cubes as static once they are animated it wont be much help as it would take more memmory to recalculate it as static

avatar image deltamish · Jul 01, 2014 at 05:53 PM 0
Share

But you could play around with camera culling layers

1 Reply

· Add your reply
  • Sort: 
avatar image
0

Answer by RemoteBrainSoft · Jul 02, 2014 at 12:09 AM

Static batches are created in the editor before the project is played (see http://docs.unity3d.com/Manual/DrawCallBatching.html). This means you can't create a static batch while the project is running.

If your cubes vertices are simple enough (again, see http://docs.unity3d.com/Manual/DrawCallBatching.html), Unity will create a dynamic batch for you (even after the animation is over).

More advanced options include the use of skinning to get all the cubes drawn in less calls. You will need to have a separate bone for each cube and combine the cubes meshes.

If all the cubes use the same scale, another option is to scale the cubes in the shader instead of the GameObjects transform.

Hope this helps

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 dyankov · Jul 02, 2014 at 07:20 AM 0
Share

Good info in general, but doesn't answer my question :/ Thanks

avatar image deltamish · Jul 02, 2014 at 10:10 AM 0
Share

Hi The answer is no you cant change it to static but you can play around with culling layers

Anyways what shader are the cubes using and what are you trying to achieve (1000 boxes are pretty large) Please give us a better info so that we can help you

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

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

Related Questions

Alpha channel vs modeled shape performance 0 Answers

Drawcalls or Batched, which is more important to performace? 1 Answer

Question on iOS iPhone4 GPU Frame Time 0 Answers

A node in a childnode? 1 Answer

How to maintain the speed of the game on different android devices... 2 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