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 Rodolphito · Sep 01, 2014 at 05:59 AM · meshproceduralstaticbatchinglod

Static Batching with LOD Meshes/GameObjects & Other Questions

I want to buy a Unity Pro License, but before I do I would like to ask some questions to make sure that what I am trying to do will work with the Unity Pro features.

I am procedurally generating a terrain (set boundaries) at startup. The terrain consists of multiple meshes, all different, using the same material. I have the project set up on Unity Free Version, and when I see the 'stats' it says i have 200-300 drawcalls, depending on how many chunks of the terrain are visible. I also have many levels of detail for the chunks, but since I do not have Unity Pro I am rendering all the chunks at 1 constant LOD. My question is, can many procedurally generated meshes with LODs be statically batched at runtime? Also, at runtime, I would like to make certain chunks 'unstatic' to be able to move them and eventually destroy them. Most chunks will remain static, but when a certain event happens, i would like to detach certain chunks from the terrain by marking them as not static and then giving them a rigidbody to let them fall. (not to be confused with unity terrain, this is custom meshes.)

TL;DR: Can Procedural Meshes with LODs be statically batched at runtime and can I toggle static batching on them via the static flag?

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

1 Reply

· Add your reply
  • Sort: 
avatar image
0

Answer by rutter · Sep 01, 2014 at 06:03 AM

You can use static batching at runtime, but it doesn't work in quite the way you're expecting.

The "static" checkbox doesn't really exist as such, once you're in a built player. You can check the value, but setting it won't really do anything.

Instead, you use the StaticBatchingUtility class to prepare a group of statically batched objects. This is actually how the editor does it during the build process. There are a few limitations about material atlasing, vertex count and so on, if you really want to scrape out every bit of performance that you can, but for the most part it "just works".

I haven't done much testing between LOD grouping and static batching, unfortunately. I can find some reading on that topic, but you might have to do some searching for more.

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

3 People are following this question.

avatar image avatar image avatar image

Related Questions

Materials disappear on Mobile when more then one is set to static batching. 0 Answers

custom staticBatchRoot for build time static meshes? 1 Answer

Simple LOD not working correctly. 0 Answers

Problem moving static batch root when using StaticBatchingUtility.Combine 1 Answer

Procedural meshes: static batching seemingly inoperative. Cause? 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