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 benk0913 · Jul 07, 2013 at 01:06 PM · scenemodelinstancelevel designoptimizing

Alot of instances or large models?

Okay, I am designing a large open scene, now I've got a small question, is there a difference between placing alot of instances of planks, scrap metal and wood logs for example to design a house and placing the planks and logs and everything in the model itself and placing it as a combined 1 instance in lagging. Does many gameobject instances makes more lags than one gameobject instance which have the same count of polygons as the instances..

It sounds pretty silly but still might be important.

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 Jessy · Jul 07, 2013 at 03:40 PM 0
Share

http://hyperboleandahalf.blogspot.com/2010/04/alot-is-better-than-you-at-everything.html

1 Reply

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

Answer by D4rt · Jul 07, 2013 at 01:37 PM

The bigger issue is if the objects have different materials.

If the materials are the same then Unity knows how to batch these objects so that they only take one draw call. Of course it's slightly more optimized to just have one mesh though anyways. This does come with a side note that apparently the free version has rather limited batching abilities.

If the materials are different, it doesn't matter if it's one mesh or several. Anyways it's going to eat as many draw calls as there are materials.

I suggest that you concentrate on minimizing the amount of materials you use.

Comment
Add comment · Show 3 · 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 benk0913 · Jul 07, 2013 at 04:37 PM 0
Share

$$anonymous$$any thanks, by the way, if I duplicate one object with the same material and set it as a floor or a fence for example, will it draw as many calls as different materials being used for each object?

avatar image D4rt · Jul 07, 2013 at 06:20 PM 0
Share

Only the material will affect this altough, as I said the dynamic batching is somewhat limited. Here is the documentation for you.

http://docs.unity3d.com/Documentation/$$anonymous$$anual/DrawCallBatching.html

$$anonymous$$eep in $$anonymous$$d that batching requires you to have the same material instance, meaning that you should combine the textures into one big one. This is extra work however so I would think twice before doing it. Do you really need this optimization? You should get away without it if you don't have too many different objects in the scene. Finish what you are doing first and then optimize is a good rule of thumb.

Don't forget to mark the answer as correct if you were satisfied.

avatar image benk0913 · Jul 08, 2013 at 01:01 PM 0
Share

Thats not what I asked, I think.. I asked if for example I have 5 materials mt1 mt2 mt3 mt4 mt5 and 5 objects, obj1 obj2 obj3... Now is there a difference between setting mt1 for all of the five objects and between - setting each material for each object.

Will it load the material first and then set it? Or will it load the material every time it needs to be set on a gameobject?

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

18 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

Related Questions

MMD How to export model and animations to Unity as 3rd person controller? 2 Answers

Multiple world spaces? 0 Answers

Snapping models 3 Answers

What is the best approach to building a non terrain FPS level? 2 Answers

Trying to configure my avatar in unity 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