Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 14 Next capture
2021 2022 2023
2 captures
13 Jun 22 - 14 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 Foulcloud · May 22, 2021 at 02:07 AM · performance optimization

Performance of non deforming skinned mesh versus multiple mesh renderers (like robot or turret)?

Title says it all. Anyone have any experience comparing the two? Maximum 14 mesh or bones.

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

2 Replies

· Add your reply
  • Sort: 
avatar image
1

Answer by andrew-lukasik · May 22, 2021 at 09:20 AM


It's a simple question with no simple answer. Because it depends both on the specifics of your game, mesh and bone complexity, number of mesh variants, rendering backend in place and hardware you're targeting.


If by non-deforming skinned mesh you mean no interpolations between vertex transformations, then it results in a slightly reduced workload PER VERTEX (so higher the vertex count the higher the saving is... as compared to fully deforming mesh).

Multiple mesh renderers flattens number of vertex transformations and can potentially be beneficial but only IF there is an efficient batching mechanism in place (GPU instancing and number of variants is kept low or handles as per-instance data). Otherwise, if you have none of that, it will result in increased number of batches and no saving what's however.

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 Foulcloud · May 24, 2021 at 04:35 AM

Yes, these are great points which I was aware of but just being lazy on my end. However, I got off my lazy behind and did some actual benchmarking. Interesting results for my situation. I compared using two different articulated turrets. One was an optimized skinned mesh and the other was a multi mesh hierarchy. Both had the same joints and functions. Testing was done with 60 of these units visible and running on PC. All my animation is done through code (no animator on these objects).

Skinned mesh: 1 material, 1 skinned mesh renderer, around 8000 verts. No batching or gpu instance (will not work for skinned mesh).

Multi mesh: 3 materials, 7 mesh renderer, around 14000 verts. GPU instancing off, no batching happening. Around 25% better cpu load and framerate than the skinned mesh.

Multi mesh: same as above except with gpu instancing on. Around another 5% improvement in cpu load and framerate.

There are two caveats to this that may be due to me. The models were not the same - but the multi mesh was heavier as in more verts and more materials, otherwise very similar. The second thing is that I may be overlooking something I can turn off in the skinned mesh / rig in the modelling program. I did it from scratch though and pretty basic (that is all I am capable of ha!). Bones were parented to vert groups but no weight painting or any "deformations" present. I am a noob at Blender though so maybe there is something I need to turn off.

My tests over the years have always show a huge load for skinned mesh. This and physics (when used a lot) are usually my top two cpu suckers. So in summary, some objects like complex turrets, robots might be better suited to not using a skinned mesh.

I have some robots in my current project and contemplating moving these over. They do use animations and lots of complex humanoid type movements. Reading up, my plan is to keep the skinned mesh and animator but simply turn off the actual rendering. then I would just parent my individual mesh renderers to the bones. Kind of faking it but I have a feeling it could work well.

Comment
Add comment · Show 3 · 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 andrew-lukasik · May 24, 2021 at 10:31 AM 1
Share

I've been in similar situation few years ago with mobile vr and your post mirrors my conclusions back then.

Btw. for shallow hierarchies (turret + static base, or similar) you may want to consider moving "look at"-type transformations etc. to a vertex shader ("look at" shader code example). You can encode bone id in (uint) uvw.w component (from code) or (uint) floor( uv.x ) (easy to edit manually) and provide target position or direction in material property block per INSTANCE_ID. With some coding this will generate basic skinning within a single draw call for N meshes.

avatar image Foulcloud andrew-lukasik · May 24, 2021 at 04:13 PM 0
Share

Really cool. Once I wrap my head around my current challenges I will look into this. Also thanks for all the feedback. Unity community is great!

avatar image FiveFingerStudios · Feb 06 at 04:00 PM 0
Share

Very interesting results....thank for sharing.

I was just thinking about making an industrial machine model with lots of gears and was thinking of using a skinned mesh and bones to reduce it down to one draw call....now I'm wondering if it would be better to just use multiple mesh renderers instead...

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

121 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 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

Can I force unity to "weld" or "attach" a vertex of common faces, just like 3ds max? 1 Answer

what is more important for performance in Unity? UV count or the Vertice count 1 Answer

Do non-rendered gameobjects use memory? 1 Answer

Performance: Update vs Animation 4 Answers

Android & IOS Performance Difference 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