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
3
Question by roberto_sc · Feb 01, 2012 at 07:46 PM · shaderinstantiaterenderingperformancerenderer

Low Performance when drawing many objects

I'm making a demo where there is a stadium filled with supporters (fans, audience, as you wish). I've been having performance issues with this, so I ended up making each supporter as a billboard, that is, a rectangle formed by 2 triangles. I even took out the texture, so it's a stadium filled with 10.000 white rectangles.

When they are disabled I get 60fps, enabled I get 35fps, a 41.6% fall.

Rendering Profiler doesn't show many differences between supporters on/off (using the default 'fastest' configuration). Triangles count and draw calls almost don't change, batched comes from zero to 3550. However, CPU Profiler indicates that the performance fall comes from rendering.

I instantiate those rectangles in the Start method of script like this:

 var go = (GameObject) Instantiate(audience, position, rotate);

I'm using the Difuse shader.

What is causing this, or how could I investigate further?

Comment
Add comment · Show 1
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 Shutter · May 06, 2016 at 07:37 AM 0
Share

Although your question is quite old, I would wish to know whether you ended up solving the performance problem and how. $$anonymous$$y guess from your question is that you were suffering from performance in the Drawing phase of the rendering, since you said that draw calls were already low.

2 Replies

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

Answer by Eric5h5 · Feb 01, 2012 at 08:36 PM

Having 10000 individual objects will kill the framerate, yes (whether they have a texture or not will make little or no difference). You probably have vsync on, so it's likely the performance drop is greater than 41.6%. Rather than separate objects, it should be just one object, like a particle system.

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 Shutter · May 06, 2016 at 07:32 AM 0
Share

Although this answer is some years old, I would like to further question: but in that case of merging all objects into one, wouldn't the change to be expected be in drawcalls? The OP already had low drawcalls due to Unity's batching.

avatar image
1

Answer by anszwa · Feb 01, 2012 at 08:52 PM

Create an empty game object and put the single objects in it, maybe seperate them in a couple of groups in order of which objects you can see at the same time on screen. Then assign the "combine children" script, which you can get at standard assets-scripts, on the empty game objects, which has the effect that all children of it get combined to one mesh at game start. so you only have one draw call at each group which is much better for performance.

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 roberto_sc · Feb 02, 2012 at 07:50 PM 0
Share

@anszwa Thank you for explaining this procedure, I didn't know it, but I already had a low draw call count, Unity seems to have made a smart batching system to lower draw calls of similar objects. In my tests you can see batched co$$anonymous$$g from zero to 3.5k, making draw count be almost the same with/without the audience. Anyway, I used the combine script and had no performance improvement.

avatar image anszwa · Feb 09, 2012 at 07:28 PM 0
Share

Can you upload your project, so that we can have a look on the problem?

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

8 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

Prevent mesh normals for being normalized when building for mobile? 0 Answers

Trying to Reduce Overdraw: How can I clip select screen areas? 1 Answer

Can the Cull option in shader improve perfomances ? 2 Answers

Rendering a plane is dropping 10 fps 0 Answers

Alpha channel vs modeled shape performance 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