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 /
avatar image
0
Question by vandrewm · Jun 23, 2011 at 10:34 PM · boneskinnedmeshrenderer

Applying different boneWeights to SkinnedMeshRenderer creates unwanted vert stretching

I've got a SkinnedMeshRenderer mesh object in my scene and a secondary mesh with the same number of verts, but slightly different vert positions. As long as I don't change the weight table of the object, I can replace the mesh vertices just fine. In addition, I can put 0.0 on already populated weights(in 3ds max) and it too will work just fine. However, when I set the weight table (in 3ds max) to "Delete Zeroed Weights" or try to add new weights for a vert the mesh gets distorted in unity when the new boneWeights are applied.

I've checked the boneWeights array; they are both the same length. Bone names haven't changed and vert indexes are preserved. I've tried recalculating bindPoses; it seems to cause more issues. Not really sure what bindPoses does anyway. The new mesh is working with the animation if I just add it to the scene as a new gameobject.

Has anyone dealt with this issue before and can point me in the right direction?

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
0
Best Answer

Answer by vandrewm · Jun 24, 2011 at 01:14 PM

Ah, thanks Dreamora for the answer, but I happened to figure it out this morning after spending 8 hours on this yesterday.

I wasn't calculating the bind poses to the right transform, this is what caused everything to go crazy.

 bindPoses[x] = smr.bones[x].worldToLocalMatrix * [yourgameobject].transform.localToWorldMatrix;

I hope this helps anyone who might come across this.

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 Dreamora · Jun 24, 2011 at 01:21 AM

  1. Check that you never use more than 4 weights (unsure what max does if you delete zeroed weights and if it resorts the weight array prior export or alike)

  2. Check the quality settings on how many weights you allow at all and ensure that the lowest index weight is always the "most important one

That should help to make it work.

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

3 People are following this question.

avatar image avatar image avatar image

Related Questions

Swap mesh parts i.e. attach one skinned mesh to another via bone 1 Answer

Reduce number of bones on runtime 0 Answers

How to deform a game object using a skinned mesh and bones? 1 Answer

Skinned Mesh Renderer Importing as Mesh Renderer 2 Answers

Moving bones without moving mesh 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