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 JayemJigga · Feb 18, 2016 at 07:21 PM · meshmesh rendererskinned mesh renderer

Make one skinned mesh with weighted bone values take on the bone movement of a main skeleton?

My problem is i am getting a model that has been bone weighted in, this is a piece of armor. When i step through the piece of armour it has only 23 binding poses while the main body i am attaching it to has 29 .. this seems to pinch a bunch of the verticies into a center after i assign the 29 bones from the body mesh to it . 80% of the armour looks fine but the chunks that are moving with the body are all pinched into the center.

Any Ideas?

     public void SetMaterialForSkinnedMesh(SkinnedMeshRenderer renderer, MeshFilter filter, k.RarityType rarity)
     {
        // renderer.rootBone = body.rootBone;
         renderer.sharedMesh = filter.sharedMesh;
 
         Transform[] bones = new Transform[renderer.sharedMesh.bindposes.Length];
 
         for (int i = 0; i < renderer.sharedMesh.bindposes.Length; i++)
             bones[i] = boneMap[i];
 
          renderer.bones = bones;
 
 //         for (int i = 0; i < renderer.sharedMesh.bindposes.Length; i++)
 //         {
 //             renderer.sharedMesh.bindposes[i] = renderer.bones[i].worldToLocalMatrix * transform.localToWorldMatrix;
 //         }
 
         renderer.sharedMaterial = Game.Instance.Materials[rarity.ToString()];
     }
Comment
Add comment · Show 2
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 Cherno · Feb 18, 2016 at 07:51 PM 0
Share

$$anonymous$$ight be because of weightless bones don't get added to Skinned$$anonymous$$eshRenderer bone array.

avatar image FortisVenaliter · Feb 18, 2016 at 10:07 PM 0
Share

This could also be an issue when generating or exporting the models from your program. For example, when skinning in $$anonymous$$aya, there's an option to 'remove unused influences' that causes a problem like this in Unity. Check your source assets.

1 Reply

· Add your reply
  • Sort: 
avatar image
0

Answer by JayemJigga · Feb 19, 2016 at 12:41 AM

Solved My Issue, This was due to the model coming in with 23 bones .. through code i was assigning it 29 of the bones from my main body. After Making a dictionary of the main bones from the body i was applying the mesh to, i then only applied the bones that mattered for this specific skinned mesh. After doing that it moved perfectly fine with the model.

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

4 People are following this question.

avatar image avatar image avatar image avatar image

Related Questions

How to generate a track / path mesh using waypoints,How do I generate a track / path mesh using waypoints 0 Answers

Disabling Mesh renderer on collision 1 Answer

Resizing cube mesh 1 Answer

Why isn't my mesh updating properly? 2 Answers

Mesh Collider with model that uses armature. 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