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 KurtGokhan · Feb 08, 2014 at 10:30 AM · modelbatchingdrawcallsmeshcombine

Trying to reduce draw calls but...?

Hi. Since I don't have much time I am trying to mess less with modelling or optimization. But it seems like I miss something because when I import a model and add it to scene, my drawcalls grow huge. So I looked up so called mesh combining and other stuff. Although I couldn't combine meshes in Unity, I combined them in modelling engine and it seems to work well. Now the problem is I have a pretty complex object. When I drag this object in an empty scene, it has 12 drawcalls (Since it has 12 materials makes sense). For each new instance of it, drawcalls increase by 7 (isn't that weird?). But when I put this object in my actual scene, drawcalls increase by 36 for each new instance. I disabled casting and receiving shadows, why should it do this. Also why doesn't batching work? They are all the same object. Here is a screenshot of the object. I got it from 3d Warehouse for educational purposes.alt text

tree.png (40.6 kB)
Comment
Add comment · Show 9
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 highpockets · Feb 08, 2014 at 10:38 AM 0
Share

Did you mark it as static??

If you didn't mark it as static, it won't batch. $$anonymous$$eep in $$anonymous$$d that even after you mark them as static, they will show higher draw calls in the stats window before pressing play

avatar image AlkisFortuneFish · Feb 08, 2014 at 10:45 AM 0
Share

Highpockets, it should still dynamically batch, provided it fits certain criteria and the moon is in the right phase.

avatar image AlkisFortuneFish · Feb 08, 2014 at 10:47 AM 0
Share

Sir$$anonymous$$urt, what shaders do you use for your 12 materials and how many lights are in your scene?

avatar image highpockets · Feb 08, 2014 at 10:58 AM 0
Share

I find it far fetched that all those leaves are under the 900 limit

avatar image KurtGokhan · Feb 08, 2014 at 10:59 AM 0
Share

Shaders are Diffuse. $$anonymous$$y scene has 4 lights. Also I was wondering why static batching doesn't work and I just noticed it requires Unity Pro.

Show more comments

2 Replies

· Add your reply
  • Sort: 
avatar image
0
Best Answer

Answer by AlkisFortuneFish · Feb 08, 2014 at 11:23 AM

Yes, even if it casts no shadows, in forward rendering one pass is made to render one pixel light, vertex lights and spherical harmonics lights and then an additional pass for every extra pixel light.

If the model has more than 65k verts I would forget about dynamic batching.

If you atlas the textures and use the same material, you should be able to merge most of the tree geometry, so that your model takes fewer than 12 drawing calls per light.

You should also consider exactly what you said, putting the tree in another layer and setting the lights' culling masks accordingly.

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

Answer by KurtGokhan · Feb 08, 2014 at 11:29 AM

Thanks for all help. Here is the steps I took to reduce some draw calls. - When exporting from modelling engine, I was exporting standalone edges so I unchecked it (silly me) and vert count is now 47k and material count is 8. - I changed shader to Vertex-lit, dragged the shininess to the end. I have almost same look as diffuse shader. - Draw call count is 8 now. For every new instance draw call increases by 5. I guess 3 of the materials have right vertex count to batch.

You should turn that to answer.

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

20 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

Related Questions

Understanding draw calls 0 Answers

Batching problem. (objects with shared material are not being batched) 2 Answers

Is texture atlasing useless when you are constantly changing materials? 2 Answers

Is it possible to utilize iphone dynamic batching with "traditional" animated sprite techniques? 1 Answer

Dynamic batching of animated models 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