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
4
Question by krubba · Dec 22, 2013 at 06:52 PM · lodgroupstatic-batching

LODGroups still statically batch?

i've been experimenting to see how to get best performance on mobile with a large scene with lots of objects. Currently playing with LODGroups, which is pretty slick. Making my massive forest of trees use LOD groups almost tripled my frame rate, but even better was marking them all as static , which made the performance fantastic.

So my question is, does unity still do static batching even though the meshes of individual objects are switching and being turned off independently? Sure seems to be working that way, so I'm curious how. Because if that is possible, can I manually turn renders of individual static objects off/on at runtime? I've tried this before but couldn't get it to work, which I thought made sense since all static objects are baked into one mesh, aren't they?

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
4

Answer by krubba · Dec 23, 2013 at 01:11 AM

Ok, let me just answer my own question. My memory must be failing me, because now i tried deactivating a single object that is part of the combined mesh and it disappeared just fine.

I think I read that it's because of how the mesh data is sent to GPU. There's 2 sets of mesh data, ones the complete data, verts, normals, etc, and another that's just an index. Turning off an object must turn it off in the index, and then gpu knows not to render the one object. And this is how the culling would work, being able to turn on/off objects based on whatever culling is in action.

And LODGroup is probably same idea, i.e. gpu has full mesh data for all static objects, including high and low res meshes, and the mesh index is updated every frame and passed to GPU to tell it which mesh to turn on/off.

Took an hour or so to figure this out, sure would be nice if the documentation was a bit more comprehensive...

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

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

LodGroup property access 1 Answer

How to use Level of Detail in 2D Game ? 1 Answer

StaticBatchingUtility combine meshes in runtime 1 Answer

Add LOD models to LODGroup programmatically 1 Answer

How to get the LODGroup camera percetange through code 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