Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 12 Next capture
2021 2022 2023
1 capture
12 Jun 22 - 12 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 farooq03245149691 · Feb 15, 2017 at 07:28 AM · combinemeshesdestructible

How to reduce Drawcalls while having a lot of meshes in your scene?

Hi, Im making a farming simulator. And ive reached a stage where i have to Destroy or harvest crops. The problem that i am facing is that there are a lot of objects(meshes of the crops) in my scene. Because obviously a lot of crops make a field. Adding these meshes to my scene increases my Drawcalls to about 1.5K which is alot. Now i have tried to combine these meshes into a single mesh and i have succeeded so far. But In that case I Only have one mesh collider attached to the combined mesh. Which destroys the whole mesh when the mesh collider of my harvester collides with the mesh of the combined mesh. I donot want this. I want to destroy only those crops which collide with my harvester. Is there a work around? What should i do? Any help will be Appreciated!!

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 Kossuranta · Feb 15, 2017 at 01:03 PM 0
Share

I honestly have no real experience or knowledge, but what I would try is using simple sprites for something like that. Two sprites where other is rotated 90 degrees and they are set up like X-formation. Then grouping up stack of these that will be removed at once when harvested and adding box collider to that group. If you combine meshes I doubt there is any easy or efficient way to remove parts of it.

Also as side note you shouldn't destroy at all as Instantiating and Destroying is really inefficient. Ins$$anonymous$$d of that you should use objectpool where you just disable/enable objects.

1 Reply

· Add your reply
  • Sort: 
avatar image
0

Answer by AurimasBlazulionis · Feb 15, 2017 at 02:38 PM

This is what static and dynamic batching is about. It tries to combine the meshes.

If you are building the game for PC and modern Android (GLES 3.0+), you can also use GPU instancing. It will be able to draw the same meshes efficiently. For it to work, the meshes have to be not batched, have same mesh and materials. Shader also has to support it, the standard one seems to work.

Disable dynamic batching and in profiler, open frame debugger, all the grass should have instanced mark.

Try to have the same material on every object.

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

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

6 People are following this question.

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

Related Questions

destrucatable pillar 2 Answers

Using Mesh.CombienMeshes. 0 Answers

[C#] Using CombineMeshes and preserving originals 0 Answers

Gather all the Meshes into 1 1 Answer

Merging meshes 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