Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Static Batching Alternatives ?

Discussion in 'General Graphics' started by MoribitoMT, Dec 9, 2018.

  1. MoribitoMT

    MoribitoMT

    Joined:
    Jun 1, 2013
    Posts:
    301
    Hi,

    I am building large open world scenes to IOS/ANDROID, however due to static batching my final build sizes are hug, is there a alternative solution to static batching ?

    - I atlassed all textures
    - I combined meshes strategically due to maps
    - Still static batching killing the project size
     
  2. bgolus

    bgolus

    Joined:
    Dec 7, 2012
    Posts:
    12,329
    The alternative is to not use static batching?

    If you're already combining manually meshes, you're getting most of the benefits of static batching already. The reason why it uses do much memory is that it combines all of the meshes marked static into one giant mesh (or several giant sub meshes) so there's no mesh reuse. One thing static batching has over manual combining is it can still cull individual game objects from the combined mesh, something not possible with manually combined meshes.
     
    MoribitoMT likes this.
  3. MoribitoMT

    MoribitoMT

    Joined:
    Jun 1, 2013
    Posts:
    301
    If do not use static batching, batching ( draw calls ) increase so much, my manual batching not very effective..
     
  4. bgolus

    bgolus

    Joined:
    Dec 7, 2012
    Posts:
    12,329
    Static batching is trading memory usage for performance. You can not use static batching and use less memory, and thus less performance. There aren't really any alternatives to that fact. Manual merging reduces some CPU overhead for a less rendering performance. It's all trade offs.
     
    MoribitoMT likes this.