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 Freaking-Pingo · Jun 29, 2013 at 12:31 PM · meshperformanceoptimizationskinned mesh renderercombined skinned mesh renderer

Substract mesh from Skinned Mesh Renderer

Hi there Uniteers, I am in need of your help. In the process of optimizing our game performance, we have decided to look into combining all skinned mesh renderers into a single skinned mesh renderer containing all the other Skinned Mesh Renderer.

By using the script provided by duhprey and modified by Marble on the Unity Community forum, I managed to combine all our skinned mesh renderers into one:

Forum post about combining skinned mesh renderers

But combining all Skinned Mesh Renderers into one arises a problem. When attempting to disable a single "Character" (such as, when an enemy has been slain), it is not possible to disable the renderer, because all the other meshes will also get disabled, because they are all attached to one single Skinned Mesh Renderer.

So my big question is then: How can I disable a "Character" from a combined skinned mesh renderer?

I have two ideas:

1: When combining the skin mesh renderer, I will leave a copy of the original skin mesh renderer on the GameObject (Of course disabled). Whenever the GameObject is destroyed, I'll take the copy of the original skin mesh renderer, extract the mesh data, and substract it from the main Skinned Mesh Renderer, but:

  • I don't know how to do this, and I can't seem to find enough information to assist me. Any tips and tricks on how to proceed with this?

  • During such mesh manipulation runtime, is that to heavy?

2: Another solution would be to simply just move the GameObject out of sight (Underneath the terrain) but:

  • This approach seems very dirty

  • Would eventually lead into problems.

So, I am in doubt on how to proceed, and assistance would be appreciated.

Comment
Add comment · Show 3
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 powdered_swords · Jun 29, 2013 at 04:16 PM 0
Share

If you absolutely must combine all your characters for optimisation then the easiest and quickest way to activate/deactivate areas would be to keep a copy of the triangle array for each character($$anonymous$$esh.trangles) before you combine them. Search and remove that array from the main list when you want to deactivate that character and insert it when you want to reactivate it.

avatar image Freaking-Pingo · Jun 29, 2013 at 04:56 PM 0
Share

Hmm, sounds reasonable. What about perfomance in such case? Something I have to worry about, if we are talking rational meshes with maximum of 300 verts?

avatar image powdered_swords · Jun 29, 2013 at 05:00 PM 0
Share

If it's not a function that is run every update and it doesn't cause noticeable lag spikes then optimisation is pretty much a non-issue. Either way removing a section of int values from and array isn't very costly.

0 Replies

· Add your reply
  • Sort: 

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

16 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

Related Questions

Is there a Per-Mesh-Profiler somewhere? 2 Answers

Optimize mesh for runtime performance 0 Answers

Performance issues with mesh processing 1 Answer

Combining meshes doesn't reduce triangle count 0 Answers

What's the best way to optimise thousands of instances of the same mesh? 2 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