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 /
This question was closed May 16, 2013 at 06:45 PM by Julien-Lynge for the following reason:

The question is answered, right answer was accepted

avatar image
0
Question by MOLB · Jul 04, 2012 at 08:34 AM · meshperformancelag

How to increase performance with a lot of meshes (and large meshes)?

Hi

I would like to know if there is any way to increase performance when the scene contains a lot of meshes, with a lot I mean a couple of thousand. But of course they are not all in the rendering frustum. The size of the objects can be everything from 0.1 0.1 0.1 to 1000 1000 1000. But like I said there will only be a quite small amount of the objects rendered... But what about the other objects? Not only do they slow down the time to load the level (although the time to load the level is quite fast), but might cause lag while playing the game. So if there are any ways to increase performance when it comes to meshes, I would appreciate if you would post your solution here. Even if you only know a little bit, you're welcome to post solution as well.

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 Kryptos · Jul 04, 2012 at 09:36 AM 2
Share

Size of object doesn't matter. But the number of vertices and tris does.

avatar image MOLB · Jul 06, 2012 at 09:54 PM 0
Share

I know that, but I was wondering if there is a "hidden gem" that could make it even faster. If it can go faster then I don't see any problem with that, as long as it doesn't affect the quality. I have a very good computer so it is fast already. This question was a little bit off-topic... But I'll be fine with it as it is now.

1 Reply

  • Sort: 
avatar image
5
Best Answer

Answer by flamy · Jul 04, 2012 at 09:05 AM

First of all number of objects doesnt matter much compared to the draw calls you are getting in your game. You have to control the draw calls. Dynamic batching can be applied in this case by using same material for multiple objects(note that there should be no animation and the size of mesh should be small)

if the dynamic batching doesnt work, you can use static batching by marking the object as static, this could be useful for big objects, but needs a Unity PRO license. And you can find the static check box in the inspector at the top right.

Batching: Static batching and Dynamic batching.

if the objects cannot share the same material or texture, you can always do that from code by combining different textures and form a single one and assigning it to a material tht will be shared by different objects. For more assistance on this check this funciton. Also check the below forum links, Optmize a game in unity

http://answers.unity3d.com/questions/276212/what-is-the-simple-way-of-applying-texture-atlas-t.html, Optmize a game in unity and you can find several other links to get a more clear idea on this.

other than batching you can check for costly shaders that is attached to the objects (especial reflective shaders since number of objects are high).

If you are having textures or a audio files attached to a script using editor, try to avoid them and load it using Resources.Load function. Because the texture or audio file attached to the object will remain in memory until the game object or script instance is deleted.

If you are using OnGUI more, avoid drawing objects that doesnt need update multiple times per frame like label, or a plain texture and enclose in a if loop like the below,

 if(Event.current.type == EventType.Repaint)
 {
 
 }

These are the general optimization techniques i follow. It is hard to tell more since you didnt post any thing related to memory usage, draw calls or a profiler screenshot.

anyway check this link Optmize a game in unity for more info.

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

Follow this Question

Answers Answers and Comments

6 People are following this question.

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

Related Questions

Editor lags when coming out of play mode...? 0 Answers

Re-meshing Static Objects as one mesh? 1 Answer

Random lag spikes any time processor intensive tasks a scene 0 Answers

Android Performance REALLY Laggy 2 Answers

Terrible Lag When Starting a Scene Which Eventually Resolves Itself... Graphics Card Issue or Unity? 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