• 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 Mahamed9628 · Jun 06, 2012 at 09:28 PM · optimizationlow fpsvegetation

optimizing huge amount of objects

Hey, I'm still here, that's my question: why FPS falls down to 2, if I have about 3000 game objects? They are far away from a camera, they are culled (per-layer) and invisible, so it's just 50-60 draw calls. They are trees and various vegetation, but I don't want to make an one mesh from them: every of them will have some script and animation. But now they don't have anyt$$anonymous$$ng except meshes and materials (same for all), they're culled, and it's only 2 fps. What should I do to optimize t$$anonymous$$s? Note: without joining to one mesh!

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
0

Answer by rutter · Jun 06, 2012 at 09:30 PM

every of them will have some script and animation

If you have several thousand objects, but are pretty sure that rendering isn't your bottleneck, then it's most likely the scripts or other components attached to those objects.

If you have Unity Pro, the profiler is invaluable in diagnosing t$$anonymous$$s sort of problem. If not, you can try removing components one-by-one to see if any of them are a performance hotspot.

Comment
Add comment · Show 7 · 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 Mahamed9628 · Jun 07, 2012 at 07:25 AM 0
Share
avatar image Mahamed9628 · Jun 07, 2012 at 07:41 AM 0
Share
avatar image rutter · Jun 07, 2012 at 07:42 AM 0
Share
avatar image Mahamed9628 · Jun 07, 2012 at 07:48 AM 0
Share
avatar image Mahamed9628 · Jun 07, 2012 at 07:56 AM 0
Share
Show more comments
avatar image
0

Answer by Mahamed9628 · Jun 07, 2012 at 10:48 AM

My experiments go well. For each tree I added script, w$$anonymous$$ch check distance between tree and camera every 2 seconds, and if distance is less than 100, it starts drawing cycle. Drawing cycle - function, w$$anonymous$$ch in cycle FOR calls method Grap$$anonymous$$cs.DrawMesh, and then waits (yield WaitForSeconds(0.01). There is no update func. Drawing cycle goes on only if distance is less than 100. But here is some bug: with 0.01 trees flick. I'll try 0.001 or any other value. FPS is about 90-100. Good result.

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 Mahamed9628 · Jun 07, 2012 at 10:57 AM 0
Share
avatar image Mahamed9628 · Jun 07, 2012 at 03:25 PM 0
Share

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

Unity profiler Gfx.WaitForPresentOnGfxThread 2 Answers

Low FPS when launching the built apk first time 0 Answers

How to optimize custom grass? 1 Answer

Is UI ruining my fps on some of android devices? 2 Answers

Great FPS Dilemma Even With Low Tris & Low Batches 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