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 /
  • Help Room /
avatar image
0
Question by DorianF · Nov 16, 2016 at 11:17 AM · batchingdrawcalls

Batching problem : more batches than materials on a fully static model

Hi,

I'm trying to reduce my number of batches (or drawcalls) in my GearVR project. I'm using Unity Free, so no dynamic batching for me.

I have a 3D model I made using Sketch Up, I've tried to keep my number of different materials as low as possible to avoid CPU overhead. The whole model is marked as static (everything static : occluder, occludee, navigation, batching...). I'm not messing with any material of my model through script (so, no, I'm definitely not making clones of the materials at runtime)

At runtime, I do see that static batching helps reducing the number of batches : the "saved by batching" number shows that the batching magic kicks in. Yet I have way too much batches, and I don't understand what goes wrong, but something definitely does : I have a grand total of 50 materials, all using the standard shaders (and changing shaders doesn't change a thing on the batches side), yet depending on where my camera is, disabling my model can reduce the number of batches by roughly 150 (out of 170). How comes?

Note : I only have one camera I only use the standard shader, but they all only use the Aldebo field with the Opaque rendering mode, except 2 materials that use Transparent rendering mode. I use occlusion culling I use light baking (no precomputed realtime GI, baked GI with low parameters for testing purposes)

Thanks in advance for your help.

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 DorianF · Nov 16, 2016 at 11:22 AM

Oh, one thought... I just remembered reading that having a mesh with multiple materials was bad, but no one ever explained why.

Exporting from Sketch Up tends to do that sometimes... I'm guessing that could be the reason, I'll try to do some testing and keep this thread updated...

Comment
Add comment · Show 1 · 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 DorianF · Nov 16, 2016 at 04:11 PM 0
Share

Well, the more test I do, the less I understand batching. I can't make sense out of anything I've tried so far...

I made 2 graphically identical models. I just tried to have some mesh with 2 materials in one, and only one in the other one. I actually failed to do that.

I now have 2 models with 2 identical cubes, with a different texture on each side of the cube. The 2 models are made of 3 meshes, the only difference between them is in their hierarchy.

I made 3 copies of both of these models into an empty Unity scene (a total of 2*2*3 cubes = 12). I've made all of them static and I baked the light.

In my opinion, I should have 7 batches, 1 for each side of one cube, all other faces of all other cubes should be saved by batching since they are copies of the first cube. The remaining one batch would be for the (dynamic) skybox.

I actually get 13 batches. Playing around some more, I've found out that the distance between the camera and the cube could induce additionnal batches. I guess I'm gonna have to search for answers in my quality settings...

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

77 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 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 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 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 avatar image avatar image avatar image avatar image avatar image

Related Questions

Static batching break : objects belong to different static batches 0 Answers

Trouble with Dynamic Batching 0 Answers

LOD batching 0 Answers

Different number of batches in Stats and Frame Debugger counts (222 in stats, 55 in debugger) 1 Answer

Why do I have this jump in draw calls / Batching not working? 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