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
1
Question by digbrand1977 · Feb 21, 2014 at 02:21 AM · draw calls

How to reduce draw call when use skinned mesh, one material but has multiply copy?

I know combine mesh to 1 material can reduce draw call. Now I have one skinned mesh ,is a man model and his bones.It has only 1 material and only 1 draw call.I copy it to 10 instance,and now display 10 draw calls. Is there idea to reduce to 1 draw call,when i copy it 10 times?

Comment
Add comment · Show 1
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 digbrand1977 · Feb 21, 2014 at 02:18 AM 0
Share

$$anonymous$$y mode has only 600 tris and 523 verts,only one diffuse shader. But Dynamic batching not work to it.I don't know why.

4 Replies

· Add your reply
  • Sort: 
avatar image
2

Answer by rutter · Feb 21, 2014 at 02:22 AM

From the manual: Draw Call Batching

Only objects sharing the same material can be batched together.

...

If you need to access shared material properties from the scripts, then it is important to note that modifying Renderer.material will create a copy of the material. Instead, you should use Renderer.sharedMaterial to keep material shared.

...

Currently, only Mesh Renderers and Particle Systems are batched. This means that skinned meshes, cloth, trail renderers and other types of rendering components are not batched.

Comment
Add comment · Show 2 · 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 whydoidoit · Feb 21, 2014 at 02:35 AM 0
Share

I know that's what the doc says but I was sure it got added in 4.1. Can't find the reference however.

That said it will only batch 180 verts if the model has normals etc.

avatar image digbrand1977 · Feb 21, 2014 at 02:56 AM 0
Share

as rutter said: Currently, only $$anonymous$$esh Renderers and Particle Systems are batched. This means that skinned meshes, cloth, trail renderers and other types of rendering components are not batched.

$$anonymous$$y mesh is skinned meshes,and only diffuse material,so is there any way to reduce draw call? $$anonymous$$y game have 100 man in model,how can I do?

avatar image
1

Answer by Kiloblargh · Feb 21, 2014 at 06:03 AM

Do a 2-camera LOD setup where the near camera renders from foreground to [whatever] units and the far camera renders from [whatever] to background. Put a skinned mesh renderer on a layer that the close camera renders and separate jointed body parts on a layer that the far camera renders. This will reserve the draw calls for where they're needed most.

You can also do something with SkinnedMeshRenderer.Bakemesh; which the docs are no help at all in explaining, so I don't know what to do with it either.

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
1

Answer by whydoidoit · Feb 21, 2014 at 06:29 AM

You can make all of those SkinnedMeshes a single draw call but it is difficult.

Basically you can combine all of the meshes together yourself and apply the bone weights then merge the bones from the models into the new SMR and delete the renderers on the individual objects. In this way all of the animations and movements will work - however, adding and removing things from this big mesh is going to be cumbersome. I use this approach for crowd scenes where I know the people are close together and they don't need to be destroyed.

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 vfxjex · Aug 06, 2020 at 08:56 PM

have you tried this option for batching a skinned mesh instancing? https://blogs.unity3d.com/2018/04/16/animation-instancing-instancing-for-skinnedmeshrenderer/

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

22 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

Related Questions

Another draw call question 1 Answer

Does Graphics.Blit affect performance much when used in image effects? 1 Answer

Using light probes with sprites breaks batching? 0 Answers

Unskinned meshes of the same material won't batch 1 Answer

Increasing Prefabs lowers FPS (frame rate) 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